Foundations of Machine LearningRegressionFoundations of Machine LearningRegressionSimple linear regression (简单线性回归)Evaluating the modelMultiple linear regression (多元线性回归)Polynomial regression (多项式回归)Regularization (正则化)Applying linear regressionFitting models with gradient descent (梯度下降)Linear RegressionLesson 3 - 2Simple linear regressionSimple linear regression can be used to model a linear relationship between one response variable and one explanatory variable
Suppose you wish to know the price of a pizza
Linear RegressionLesson 3 - 3Observe the dataLinear RegressionLesson 3 - 4import matplotlib
pyplot as pltX = [[6], [8], [10], [14], [18]]y = [[7], [9], [13], [17
5], [18]]plt
figure()plt
title('Pizza price plotted against diameter')plt
xlabel('Diameter in inches')p