modeva.TestSuite.interpret_coef#
- TestSuite.interpret_coef(features: str | Tuple[str] = None)#
Extracts and visualizes the coefficients of linear model features.
This function retrieves the coefficients from the model’s main effects and creates both a tabular and graphical representation of the coefficients. The coefficients can be filtered to show only specific features of interest.
- Parameters:
features (str or tuple of str, default=None) – Specific features whose coefficients should be displayed. If None, coefficients for all features will be shown. Can be either a single feature name (str) or multiple feature names (tuple).
- Returns:
A result object containing:
key: “interpret_glm_coef”
data: Name of the dataset used
model: Name of the model used
inputs: Input parameters
value: Dictionary containing:
”Name”: List of feature names
”Coefficients”: List of corresponding feature coefficients
table: pandas DataFrame of feature names and coefficients
options: Dictionary of visualizations configuration for a horizontal bar plot where x-axis is coefficients, and y-axis is the feature names. Run results.plot() to show this plot.
- Return type:
Examples