Lecture 3 Flashcards
Regression
Using supervised learning to predict continuous outputs
Cost Function
Tells us how well our model approximates the training examples
A Model
A function that represents the relationship between x and y
Optimization
A way of finding parameters for the model while minimizing the loss function
Linear Regression
aka ordinary least squares;
Given input feature x we predict output y;
Follows basic y = mx + e equation with m as the parameter and e the measurement or other noise;
supervised learning
Why use Least Squares Linear Regression?
It minimizes the squared distance between measurements and regression line and is easy to compute (even by hand)
What do you do when your least squares minimization line doesn’t pass through the origin?
Introduce a bias term (intercept labeled as ‘b’).
This gets you y = mx+b+e
Curve Fitting
Finding a mathematical function (constructing a curve) that has the best fit on a series of data points
Smoothing
When you don’t look for an exact fit but for a curve that fits the data approximately
Perfect Fit
Fits the data precisely; goes through all data points
Best Fit
May not be the perfect fit; should give the best predictive value
Fit
The accuracy of a predictive model;
the extent to which predicted values of a target variable are close to the observed values of that variable
R^2
How the fit is expressed for regression models;
The percentage of variance explained by the model
Underfitting Performance
Performs badly on both training and validation sets
Overfitting Performance
Performs better on the training set than on the validation set