dabl.plot.plot_coefficients

dabl.plot.plot_coefficients(coefficients, feature_names, n_top_features=10, classname=None, ax=None)[source]

Visualize coefficients of a linear model.

Parameters
coefficientsnd-array, shape (n_features,)

Model coefficients.

feature_nameslist or nd-array of strings, shape (n_features,)

Feature names for labeling the coefficients.

n_top_featuresint, default=10

How many features to show. The function will show the largest (most positive) and smallest (most negative) n_top_features coefficients, for a total of 2 * n_top_features coefficients.