EstimatorReport.feature_importance.coefficients#
- EstimatorReport.feature_importance.coefficients()[source]#
Retrieve the coefficients of a linear model, including the intercept.
Examples
>>> from sklearn.datasets import load_diabetes >>> from sklearn.linear_model import Ridge >>> from sklearn.model_selection import train_test_split >>> from skore import EstimatorReport >>> X_train, X_test, y_train, y_test = train_test_split( ... *load_diabetes(return_X_y=True), random_state=0 ... ) >>> regressor = Ridge() >>> report = EstimatorReport( ... regressor, ... X_train=X_train, ... y_train=y_train, ... X_test=X_test, ... y_test=y_test, ... ) >>> report.feature_importance.coefficients() Coefficient Intercept 152.4... Feature #0 21.2... Feature #1 -60.4... Feature #2 302.8... Feature #3 179.4... Feature #4 8.9... Feature #5 -28.8... Feature #6 -149.3... Feature #7 112.6... Feature #8 250.5... Feature #9 99.5...