5
$\begingroup$

Say you're given a dataset where the response $y$ is continuous. The only prediction you're after is whether $y \geq C$, i.e., where the response is greater than some value.

In this case, would it be better to

(1) Use a regression algorithm that produces a continuous output, and then manually check if the response is $\geq C$?

(2) Use a classification algorithm. To do this, we must first preprocess the training data so the samples with $y_i \geq C$ are set to $1$ for binary classification and 0 otherwise.

It seems that both are feasible, but which is better, or what are the advantages/disadvantages of both?

$\endgroup$
2
  • 1
    $\begingroup$ Regression will tell you not only if it is bigger than C but also how much bigger it is, this is an important piece of information. $\endgroup$ Jul 29 '20 at 5:42
  • 1
    $\begingroup$ @user2974951. I'm assuming you don't care about how much bigger it is and just that it's bigger or not. In other words you're given continuous data, but the only thing you care about is a binary answer. $\endgroup$
    – David
    Jul 29 '20 at 5:44
4
$\begingroup$

Interesting question. First of all, classic linear regression was developed for applications where the scatter is normally distributed. If you plot the residual distribution it should have the classic bell shape. When your data adhere to the these model prerequisites, your can just as well use linear regression. The confidence bounds for linear regression predictions are also known, it is advisable that you use these.

When your predictor variables come from discrete, or multimodal continuous distributions then you can benefit from a nonparametric classifier. For example the histogram classifier or the K-nearest neighbor classifier can be used. I presuppose that training a neural network for the prediction of $y$ would be somehow 'over-the-top'.

So my advice is to let your choice be given by the distributions of your data.

$\endgroup$
4
  • $\begingroup$ Why does nonparametric classifiers work better if the predictor variables come from discrete/multimodal distributions? $\endgroup$
    – David
    Jul 29 '20 at 17:18
  • $\begingroup$ For this types of distributions, the the prerequisites of linear regression are clearly not fulfilled. With a histogram classifier, a nonparametric criterion is used to determine the most likely outcome of $y$. $\endgroup$ Jul 29 '20 at 20:30
  • $\begingroup$ Ah. I've been under the impression that linear regression is compatible with discrete predictors. That seems to not be the case? $\endgroup$
    – David
    Jul 29 '20 at 23:42
  • $\begingroup$ You your most important predictor variable is a multimodal distribution with say 3 clear peaks, then linear regression is not an appropriate model to use. $\endgroup$ Jul 30 '20 at 7:24
2
$\begingroup$

As you write, either approach is feasible. I don't think you can give a general recommendation. In some situations, there may be more existing knowledge pertaining to one than to the other approach - for instance, if you are forecasting a time series, there is much more work on forecasting a continuous target variable (approach 1) than a binary one (approach 2).

So I would recommend that you try both approaches and see which one works better for your problem at hand. Just be sure to use an appropriate measure of "better" - not accuracy, that is.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.