Experiment#
- class Experiment(group_name: str, workflow: str, algorithms: Dict[str, AlgorithmWrapper], dataset_path: Path, workflow_args: Dict[str, Any], split_index: int, table_name: str | None, categorical_features: List[str] | None)[source]#
Configuration for a single experiment run.
- Parameters:
- group_namestr
Name of the experiment group for organization
- algorithmsdict
Dictionary of AlgorithmWrapper instances with standardized keys:
- Single modeldict
{“model”: wrapper}
- Multiple modelsdict
{“model”: wrapper1, “model2”: wrapper2, …}
- dataset_pathPath or str
Path to the dataset file
- workflow_argsdict
Arguments to pass to the workflow
- split_index: int
Index value used to select a DataSplitInfo instance from DataSplits
- table_namestr, optional
Name of table for database files
- categorical_featureslist of str, optional
Names of categorical features in the dataset
- Attributes:
namestrGenerate full descriptive name for logging and debugging.
- workflow: str
Name of the workflow file to use (without .py extension)
dataset_nameTuple[str, Optional[str]]Get the dataset name with optional table name.
- table_name: str
Name of the table (database files only)
algorithm_kwargsdictGet dictionary of instantiated algorithms.
algorithm_nameslistGet list of algorithm names.
workflow_attributesdictGet combined workflow and algorithm arguments to pass to Workflow.
- property algorithm_kwargs: dict#
Get dictionary of instantiated algorithms.
- Returns:
- dict
Mapping of keys to algorithm instances Example: {‘model’: LinearRegression()}
- property algorithm_names: list#
Get list of algorithm names.
- Returns:
- list
Names of all algorithms in this experiment Example: [‘linear’, ‘ridge’]
- property dataset_name: Tuple[str, str | None]#
Get the dataset name with optional table name.
- Returns:
- str
Dataset stem with optional table name Example: ‘data_table1’ or ‘data’
- property name: str#
Generate full descriptive name for logging and debugging.
- Returns:
- str
Name combining group name and algorithm names Example: ‘baseline_linear_ridge’
- property workflow_attributes: Dict[str, Any]#
Get combined workflow and algorithm arguments to pass to Workflow.
- Returns:
- dict
Union of workflow_args and algorithm_kwargs