deepcave.evaluators.epm.fanova_forest

# FanovaForest

The module provides utilities for creating a fANOVA forest.

It includes a FanovaForest wrapper for pyrfr. fANOVA can be used for analyzing the importances of Hyperparameters.

## Classes
  • FanovaForest: A fANOVA forest wrapper for pyrfr.

Classes

FanovaForest(configspace[, n_trees, ...])

A fANOVA forest wrapper for pyrfr.

class deepcave.evaluators.epm.fanova_forest.FanovaForest(configspace, n_trees=10, ratio_features=1.0, min_samples_split=0, min_samples_leaf=0, max_depth=64, max_nodes=1048576, eps_purity=1e-08, bootstrapping=True, instance_features=None, pca_components=2, cutoffs=(-inf, inf), seed=0)[source]

Bases: RandomForest

A fANOVA forest wrapper for pyrfr.

Properties

cutoffsTuple[float, float]

The cutoffs of the model.

percentilesNDArray[floating]

The percentiles of the data points Y.

all_midpointsList

All midpoints tree wise for the whole forest.

all_sizesList

All interval sizes tree wise for the whole forest.

boundsList[Tuple[float, float]

Stores feature bounds.

trees_total_variancesList

The total variances of the trees.

trees_total_varianceAny

The total variance of a tree.

trees_variance_fractionsDict

The variance fractions of the trees.

V_U_totalDict[Tuple[int, …], List[Any]]

Store variance-related information across all trees.

V_U_individualDict[Tuple[int, …], List[Any]]

Store variance-related information for individual subsets.

n_paramsint

The number of Hyperparameters to sample.

compute_marginals(hp_ids, depth=1)[source]

Return the marginal of selected Hyperparameters.

Parameters:
  • hp_ids (Union[List[int], Tuple[int, ...]]) – Contains the indices of the configspace for the selected Hyperparameters (starts with 0).

  • depth (int) – The depth of the marginalization. Default value is 1.

Return type:

Tuple[Dict[Tuple[int, ...], List[Any]], Dict[Tuple[int, ...], List[Any]]]

Returns:

  • Tuple[Dict[Tuple[int, …], List[Any]],

  • Dict[Tuple[int, …], List[Any]], – The marginal of selected Hyperparameters.