Can someone clarify the difference between a classifier and regressor again for me?
A classifier is used to predict a discrete categorical value. Think of it as predicting an enum.
A regressor is used to predict a real value. Think of it as predicting a float or double.
In the first demo in Get to know Create ML Components a regressor was used to predict a ripeness value.
A classification approach to the same problem would require you to define categories like “green”, “not ripe”, “ripe”, “over ripe”. This is an option as well, but you would not be able to compare the ripeness of two examples that got classified into the same category.
How about run time efficiency between the above mentioned classifier and regressor?
They should have similar prediction compute time if you are using a common feature extractor. For image models that feature extraction step will likely dominate inference compute. LogisticRegressionClassifier
and LinearRegressor
will both be doing a similar size matrix multiplication behind the scenes, particularly if you restrict yourself to a few classes. As the number of classes increase the classifier will become slower.