Regression Function
We'll cover the following...
Chapter Goals:
- Set up the regression function for the model
A. Classification vs. regression
There are two main uses of MLPs in industry: classification and regression. Classification refers to predicting a class for a data observation, given its feature data. Examples of classification tasks include:
- Classifying email as real or spam
- Classifying voters as Republican, Democrat, and Independent
- Classifying dolphins into a particular subspecies
The Deep Learning with Tensorflow section of Machine Learning for Software Engineers Lab goes over the details of using MLP models for classification.
The other main usage of MLPs in industry is regression. Regression refers to predicting a real number value for a data observation, given its feature data. Examples of regression tasks include:
- Predicting housing prices based on factors like region and national unemployment rate
- Predicting the weather in Celsius/Fahrenheit
- Predicting the number of points a basketball team will score in a game
For our project, we’ll be creating a regression model to predict weekly sales for the departments of each store.
B. Regression loss
For regression models, there are two main loss functions that can used to train the model: mean absolute error and mean squared error. Mean absolute error takes the average absolute difference between the labels (in this case, the actual value for the weekly sales) and the model’s predicted values. Mean squared error takes a similar approach, but uses the squared difference rather than the absolute difference.
...