deepcave.evaluators.mo_fanova¶
# fANOVA
This module provides a tool for assessing the importance of an algorithms Hyperparameters.
Utilities provide calculation of the data wrt the budget and train the forest on the encoded data.
- ## Classes
fANOVA: Calculate and provide midpoints and sizes.
Classes
|
Multi-Objective fANOVA. |
- class deepcave.evaluators.mo_fanova.MOfANOVA(run)[source]¶
Bases:
fANOVA
Multi-Objective fANOVA.
Calculate and provide midpoints and sizes from the forest’s split values in order to get the marginals. Override: to train the random forest with an arbitrary weighting of the objectives (multi-objective case).
- calculate(objectives=None, budget=None, n_trees=100, seed=0)[source]¶
Get the data with respect to budget and train the forest on the encoded data.
Calculates weighted fanova for multiple objectives.
Note
Right now, only n_trees is used. It can be further specified if needed.
- Parameters:
objectives (Optional[Union[Objective, List[Objective]]], optional) – Considered objectives. By default None. If None, all objectives are considered.
budget (Optional[Union[int, float]], optional) – Considered budget. By default None. If None, the highest budget is chosen.
n_trees (int, optional) – How many trees should be used. By default 100.
seed (int) – Random seed. By default 0.
- Return type:
None
- get_importances_(hp_names=None)[source]¶
Return the importance scores from the passed Hyperparameter names.
- Parameters:
hp_names (Optional[List[str]]) – Selected Hyperparameter names to get the importance scores from. If None, all Hyperparameters of the configuration space are used.
sort (bool, optional) – Whether the Hyperparameters should be sorted by importance. By default True.
- Returns:
Dictionary with Hyperparameter names and the corresponding importance scores and variances.
- Return type:
Dict
- Raises:
RuntimeError – If the important scores are not calculated.