3-2: Regression

This lesson covers more in-depth topics for supervised regression learning.

Parametric regression

Parametric regression leverages parameters in a given model to predict the outcome given some observations. In the example provided below, x is the observation of barometric pressure, the polynomial equation is the model generated by some machine learning algorithm to predict how much it's going to rain. The parameters in this case are the slope of the line, m, and the constant b.

parametric-regression

K nearest neighbor

We use the value k to select the nearest neighbor(s) for a historical data point to make a prediction. The slides from the lecture, below, demonstrate how, for a given query, we use this algorithm to select 3 of our nearest neighbors to predict the amount of rain given historical data. We take the mean of the nearest neighbors to generate our prediction.

k-nearest-neighbor

Training and testing

This section of the lecture covers how we treat our data for training and testing. Our training data should be separate from our testing data. The training data should be used with some machine learning algorithm, parametric or KNN, to generate a model. Once the model is generated, we can then use the testing data to make predictions.

training-testing