skewed perspective for datasets with many featureslinear models can be very powerful in particularif you have more features than training data pointsany target can be perfectly modeled (on the training setas linear function there are many different linear models for regression the difference between these models lies in how the model parameters and are learned from the training dataand how model complexity can be controlled we will now take look at the most popular linear models for regression linear regression (aka ordinary least squareslinear regressionor ordinary least squares (ols)is the simplest and most classic linear method for regression linear regression finds the parameters and that minimize the mean squared error between predictions and the true regression targetsyon the training set the mean squared error is the sum of the squared differences between the predictions and the true values linear regression has no parameterswhich is benefitbut it also has no way to control model complexity here is the code that produces the model you can see in figure - in[ ]from sklearn linear_model import linearregression xy mglearn datasets make_wave(n_samples= x_trainx_testy_trainy_test train_test_split(xyrandom_state= lr linearregression(fit(x_trainy_trainthe "slopeparameters ( )also called weights or coefficientsare stored in the coef_ attributewhile the offset or intercept (bis stored in the intercept_ attributein[ ]print("lr coef_{}format(lr coef_)print("lr intercept_{}format(lr intercept_)out[ ]lr coef_ lr intercept_- this is easy to see if you know some linear algebra supervised machine learning algorithms