<s> """<STR_LIT>""" <EOL> print ( __doc__ ) <EOL> import matplotlib . pyplot as plt <EOL> import numpy as np <EOL> from sklearn import datasets , linear_model <EOL> diabetes = datasets . load_diabetes ( ) <EOL> diabetes_X = diabetes . data [ : , np . newaxis , <NUM_LIT:2> ] <EOL> diabetes_X_train = diabetes_X [ : - <NUM_LIT:20> ] <EOL> diabetes_X_test = diabetes_X [ - <NUM_LIT:20> : ] <EOL> diabetes_y_train = diabetes . target [ : - <NUM_LIT:20> ] <EOL> diabetes_y_test = diabetes . target [ - <NUM_LIT:20> : ] <EOL> regr = linear_model . LinearRegression ( ) <EOL> regr . fit ( diabetes_X_train , diabetes_y_train ) <EOL> print ( '<STR_LIT>' , regr . coef_ ) <EOL> print ( "<STR_LIT>" <EOL> % np . mean ( ( regr . predict ( diabetes_X_test ) - diabetes_y_test ) ** <NUM_LIT:2> ) ) <EOL> print ( '<STR_LIT>' % regr . score ( diabetes_X_test , diabetes_y_test ) ) <EOL> plt . scatter ( diabetes_X_test , diabetes_y_test , color = '<STR_LIT>' ) <EOL> plt . plot ( diabetes_X_test , regr . predict ( diabetes_X_test ) , color = '<STR_LIT>' , <EOL> linewidth = <NUM_LIT:3> ) <EOL> plt . xticks ( ( ) ) <EOL> plt . yticks ( ( ) ) <EOL> plt . show ( ) </s>
