A doctor does not want an R² alone. They want to know how far out the model usually is, and whether that is any better than simply guessing the average.
Write clinic_report(columns).
load_diabetes(return_X_y=True, as_frame=True) and split it with train_test_split(X, y, test_size=0.25, random_state=0).columns.make_pipeline(StandardScaler(), LinearRegression()) on the training rows and predict the test rows.Return a dict, with every number a plain float:
"r2": the model's test R², rounded to 3 places."rmse": the model's test RMSE (square root of the mean squared error), rounded to 1 place."mae": the model's test mean absolute error, rounded to 1 place."baseline_rmse": the lazy baseline's test RMSE, rounded to 1 place.