modeva.TestSuite.interpret_effects_moe_average#
- TestSuite.interpret_effects_moe_average(features: str | Tuple, dataset: str = 'test', grid_size: int = 100, sample_size: int = 5000, random_state: int = 0)#
Analyze feature effects averaged across all mixture-of-experts clusters.
- Parameters:
features (str or tuple/list of str) – One or two feature names to analyze. If two features are provided, their interaction effect is analyzed.
dataset ({"main", "train", "test"}, default="test") – The dataset to use for the analysis.
grid_size (int, default=100) – Number of points to evaluate for creating the visualization grid.
sample_size (int, default=5000) – Maximum number of random samples to use for calculation efficiency. If None, uses all data.
random_state (int, default=0) – Random seed for reproducible sampling.
- Returns:
Contains averaged effect analysis results:
key: “interpret_effects_moe_average”
data: Name of the dataset used
model: Name of the model used
inputs: Input parameters
value: Weighted average effect values
table: Tabular representation of results
options: Dictionary of visualizations configuration for a line (1D numerical) / bar (1D categorical) / heatmap (2D) averaged effect plot. Run results.plot() to show this plot.
- Return type:
Examples