A forest predicts diabetes progression. For a handful of columns, which one moves its predictions the most, and which barely moves them at all?
Measure each curve's size as its range: the highest average prediction minus the lowest.
Task: write steepest_and_flattest(columns).
load_diabetes(return_X_y=True, as_frame=True).train_test_split(X, y, test_size=0.25, random_state=0).RandomForestRegressor(n_estimators=50, random_state=0) on the training rows.columns, run partial_dependence(model, X_train, features=[name], grid_resolution=10) and take its ["average"][0].[steepest, flattest]: the name with the biggest range and the name with the smallest.