pyGPGO.surrogates.RandomForest module¶
-
class
pyGPGO.surrogates.RandomForest.
ExtraForest
(**params)[source]¶ Bases:
object
Wrapper around sklearn’s ExtraTreesRegressor implementation for pyGPGO. Random Forests can also be used for surrogate models in Bayesian Optimization. An estimate of ‘posterior’ variance can be obtained by using the impurity criterion value in each subtree.
Parameters: params (tuple, optional) – Any parameters to pass to RandomForestRegressor. Defaults to sklearn’s. -
__init__
(**params)[source]¶ Wrapper around sklearn’s ExtraTreesRegressor implementation for pyGPGO. Random Forests can also be used for surrogate models in Bayesian Optimization. An estimate of ‘posterior’ variance can be obtained by using the impurity criterion value in each subtree.
Parameters: params (tuple, optional) – Any parameters to pass to RandomForestRegressor. Defaults to sklearn’s.
-
fit
(X, y)[source]¶ Fit a Random Forest model to data X and targets y.
Parameters: - X (array-like) – Input values.
- y (array-like) – Target values.
-
-
class
pyGPGO.surrogates.RandomForest.
RandomForest
(**params)[source]¶ Bases:
object
Wrapper around sklearn’s Random Forest implementation for pyGPGO. Random Forests can also be used for surrogate models in Bayesian Optimization. An estimate of ‘posterior’ variance can be obtained by using the impurity criterion value in each subtree.
Parameters: params (tuple, optional) – Any parameters to pass to RandomForestRegressor. Defaults to sklearn’s. -
__init__
(**params)[source]¶ Wrapper around sklearn’s Random Forest implementation for pyGPGO. Random Forests can also be used for surrogate models in Bayesian Optimization. An estimate of ‘posterior’ variance can be obtained by using the impurity criterion value in each subtree.
Parameters: params (tuple, optional) – Any parameters to pass to RandomForestRegressor. Defaults to sklearn’s.
-
fit
(X, y)[source]¶ Fit a Random Forest model to data X and targets y.
Parameters: - X (array-like) – Input values.
- y (array-like) – Target values.
-