3
$\begingroup$

I am interested in learning about when one would use neural networks for a regression problem over a more classical regression method such as least squares.

Is it mostly related to the complexity of the expected relationship between the output and input? Are complicated and strong non-linearity relationships with many dependent variables, and a large amount of data more suitable for neural networks?

$\endgroup$

2 Answers 2

1
$\begingroup$

Neural nets, (and other nonlinear regression algorithms like trees, Mars, svms, etc.) would be superior (predictive accuracy) when the data is inherently nonlinear.

You can get some nonlinear features in a linear regression by doing things such as manually squaring some terms, etc. , but you are the one deciding the terms.

Nonlinear regression is able to learn the structure / coefficients from your data, ie you aren't having to decide how to inject the nonlinearity in on your own.

$\endgroup$
5
  • $\begingroup$ Linear regression doesn't require normality; a single ('output') neuron can implement linear regression. $\endgroup$
    – seanv507
    Jan 1, 2019 at 1:00
  • $\begingroup$ Oops. I really meant for this question to be a NN vs. all other regression methods thread and not NN and other regression methods vs. least squares. $\endgroup$
    – 24n8
    Jan 1, 2019 at 1:12
  • $\begingroup$ No, it doesn't. This is a common misconception. Linear regression assumes a linear relationship between the predictor variables and the target variable, and estimates the coefficients of the predictor variables by minimizing the sum of squared errors of the residuals. It assumes that the errors have a finite variance, are independent, and a few other things, but makes no assumptions about the functional form of the distribution... $\endgroup$
    – jbowman
    Jan 1, 2019 at 3:43
  • $\begingroup$ However, if you want to make statements about the distribution of the estimates in finite samples, and all that's derived from knowing that (e.g., exact finite-sample hypothesis tests), then the Normality assumption becomes important. $\endgroup$
    – jbowman
    Jan 1, 2019 at 3:43
  • 1
    $\begingroup$ Yes, I am. Regardless of the error distribution, under a few simple assumptions ordinary least squares provides the BLUE (Best Linear Unbiased Estimator) by the Gauss-Markov theorem (en.wikipedia.org/wiki/Gauss–Markov_theorem). You only need to assume Normality if you want it to be the Maximum Likelihood estimator as well. $\endgroup$
    – jbowman
    Jan 1, 2019 at 4:24
1
$\begingroup$

There are really no clear answers to this questions in my opinion, but some more practical guidelines I have found to help decide in my own projects:

  1. You have a small amount of data for a very difficult problem; neural networks require large amounts of data to work well because in general when we talk about "neural networks" we are not discussing some super shallow network but a model comprised of many layers and units, leading to the need for a large amount of parameters to be estimated. In cases where you have minimal amounts of data I would not be surprised to see classical methods/linear based models outperform neural networks/other non-linear algorithms.
  2. You have time constraints or do not have access to the required amount of computing power. Neural networks take much longer to train in general but this is getting better through the use of GPU's and cloud computing. However, compared to say a GLM which is quite trivial to fit on most decent CPU's (and no hyper parameters to tune) there is still a large discrepancy in training times especially if you do not have access to such computing power.
  3. You have training data with complex features where feature engineering would be hard, if not, impossible. Take for example a regression problem where you are trying to predict the selling price of cars on your local classifieds based off the photo image taken and also the description given by the seller. These kinds of problems where you have non-tabular data are where neural networks really shine (highest performing) and it's mostly because the training data is not easily interpreted (and therefore, it's hard for us to manually try to find better representations for these types of data = feature engineering).

This does not mean that neural networks are not usable for tabular/structured data, they in general perform quite well given you have the data for it. However, in most cases I've seen other algorithms (mostly forests/gradient boosting/support vector machines) + clever feature engineering out perform neural networks in the cases where feature engineering is possible. Returning to the previous example, say you wish to predict the sales of cars but using characteristics of the car; stuff like color, body type, drive train, weight, gas mileage, MSRP, etc. These are variables that we understand quite well and are easily manipulated without breaking the underlying structure of the data. I'd also include time series forecasting as another area where neural networks seem to be outperformed by classical methods but that's not really relevant to your question.

  1. You know for a fact that the relationship between your features and your target is inherently non linear which too be honest, if you have thousands of variables is probably something that would be hard to know.

There are other more practical reasons too. Not many people understand what a neural network is nor do they have the math background. If you are aiming for a model that is easily understood, neural networks are probably not going to sit well with people who perhaps don't trust what they don't understand. In this case, you might just be forced to use a simple linear regression model (I've run into this a lot).

However, if you have the time, why not just try both approaches and through proper validation, see for yourself if the extra complexity + time required to fit neural networks gives enough (if any) improvement to your regression problem over a simple linear one? A linear model will not take very long to fit; start there and then try creating a neural network. If the improvements are substantial/significant, then perhaps your problem is better tackled with a more complex, non-linear model like a neural net.

$\endgroup$

Your Answer

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

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