COMPSCI 1MD3 Lecture Notes - Lecture 21: Scipy, Matplotlib, Mean Squared Error

14 views5 pages

Document Summary

Goal: come up with a rule that predicts the output values based on the values in the training data. If we have a set of data points (x1,y1),(x2,y2) we can find a function that predicts y from x. Find a line equation that fits the data. Where c is the coefficient and b is the intercept. Divide the data into two sets, a training set and a testing set. Run linear regression on the training data to get proposed coefficient and intercept. Use the proposed coefficient and intercept to predict the y value of the testing data from its x values. Measure how far the predicted y values are from the real y values in the testing data set. Linear regression tries to find proposed coefficients and intercepts that minimize the mean squared error. Is a measure of how well the regression model fits. R^2 = 0 implies that the model is no better fit than horizontal line.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents