Partial Dependencies¶
Tools to compute Partial Dependency¶
- orion.analysis.partial_dependency_utils.make_grid(dim, n_points)[source]
Build a grid of n_points for a dim
- orion.analysis.partial_dependency_utils.partial_dependency(trials, space, params=None, model='RandomForestRegressor', n_grid_points=10, n_samples=50, **kwargs)[source]
Calculates the partial dependency of parameters in a collection of
orion.core.worker.trial.Trial
.- Parameters
- trials: DataFrame or dict
A dataframe of trials containing, at least, the columns ‘objective’ and ‘id’. Or a dict equivalent.
- space: Space object
A space object from an experiment.
- params: list of str, optional
The parameters to include in the computation. All parameters are included by default.
- model: str
Name of the regression model to use. Can be one of - AdaBoostRegressor - BaggingRegressor - ExtraTreesRegressor - GradientBoostingRegressor - RandomForestRegressor (Default)
- n_grid_points: int
Number of points in the grid to compute partial dependency. Default is 10.
- n_samples: int
Number of samples to randomly generate the grid used to compute the partial dependency. Default is 50.
- **kwargs
Arguments for the regressor model.
- Returns
- dict
Dictionary of DataFrames. Each combination of parameters as keys (dim1.name, dim2.name) and for each parameters individually (dim1.name). Columns are (dim1.name, dim2.name, objective) or (dim1.name, objective).
- orion.analysis.partial_dependency_utils.partial_dependency_grid(space, model, params, samples, n_points=40)[source]
Compute the dependency grid for a given set of params (1 or 2)
- orion.analysis.partial_dependency_utils.reverse(transformed_space, grid)[source]
Reverse transformations on the grid to bring back to original space