December 2018
Intermediate to advanced
318 pages
8h 28m
English
We will use open source code available from the scikit-learn site for this case study. The link to the code is available as shown in the following code:
http://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py
We will import the following packages:
Since we will be using regression for our analysis, we import the linear_model, mean_square_error, and r2_score libraries, as seen in the following code:
print(__doc__)# Code source: Jaques Grobler# License: BSD 3 clauseimport matplotlib.pyplot as pltimport numpy as npfrom sklearn import datasets, linear_modelfrom sklearn.metrics import mean_squared_error, r2_score
We import the diabetes data and perform ...
Read now
Unlock full access