1

I'm kind a new for python scikit learning i develop a data mining algorithm using scikit learn classification methods and now i need to find its accuracy. first just need to know,

What is difference between classification and regression score in Python scikit learn?

Is there any other way that i can calculate accuracy of my prediction algorithm?

r2_score(y_test,predictions)
f1_score(y_test,predictions)

Regression score (%)== 66%
Classification score (%) == 75%
5
  • assuming you have some training and testing data, build you model on the training data then run something like algo = clf.fit() and then (Y_test == algo.predict(X_test)).mean() . This will give you your accuracy. check out sklearn.metrics.mean_absolute_error and sklearn.metrics.mean_squared_error Commented May 3, 2014 at 8:08
  • but i already evaluated my algorithm using r2_score(y_test,predictions) f1_score(y_test,predictions) i just want to know the Difference between classification and regression score? Commented May 3, 2014 at 9:26
  • Do you understand the difference between classification and regression at all? Commented May 3, 2014 at 9:52
  • 1
    This question doesn't make any sense to me, there are many ways to evaluate both regression and classification problems. Do you want to know the difference between r-squared and f1? If so, reading the documentation and/or wikipedia should answer that for you. Regardless, I don't see how this is a programming question suited for stackoverflow so I'm downvoting. Commented May 3, 2014 at 15:13
  • Classification trees have dependent variables that are categorical and unordered. Regression trees have dependent variables that are continuous values or ordered whole values. Commented May 4, 2014 at 3:51

1 Answer 1

1

Regression: the output variable takes continuous values.

Classification: the output variable takes class labels.

score will be calculated according to the result against continuous values and class labels

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.