Linear Models for Regression — Applied Machine Learning in Python

PHOTO EMBED

Sat Oct 28 2023 07:08:42 GMT+0000 (Coordinated Universal Time)

Saved by @elham469

# plot training score vs parameter alpha, with x on logscale
# use std over cross-validation folds for error bars
ax = res.plot(x='param_alpha', y='mean_train_score', yerr='std_train_score', logx=True)
# same for test set, plot in the same axes
res.plot(x='param_alpha', y='mean_test_score', yerr='std_test_score', ax=ax)
content_copyCOPY

https://amueller.github.io/aml/02-supervised-learning/05-linear-models-regression.html