Skip to content

Instantly share code, notes, and snippets.

@jfriedly
Created April 25, 2013 16:27
Show Gist options
  • Save jfriedly/5461100 to your computer and use it in GitHub Desktop.
Save jfriedly/5461100 to your computer and use it in GitHub Desktop.
How to tell if you should use regression or classification

For example, let's say you want to predict movie rankings when your data is all integers in the 1 to 10 range. Classification might seem like a natural choice here, because the values are discrete, but it's actually better to use regression here because classification treats misclassifying a 5 as an 8 equal to misclassifying a 5 as a 6.

In general, use regression anytime there's a linear scale for the data. Classification is good for when there's many dimensions that don't correlate with each other well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment