BrushEstimator#

class pybrush.BrushEstimator.BrushEstimator(**kwargs)[source]#

This is the base class for Brush estimators using the c++ engine.

Parameters are defined and documented in EstimatorInterface

Attributes:
best_estimator_pybrush.Program

The final model picked from training. Used in subsequent calls to predict().

archive_list[deap_api.DeapIndividual]

The final population from training.

data_pybrush.Dataset

The complete data in Brush format.

train_pybrush.Dataset

Partition of data_ containing `(1-validation_size)`% of the data, in Brush format.

validation_pybrush.Dataset

Partition of data_ containing `(validation_size)`% of the data, in Brush format.

search_space_a Brush SearchSpace object.

Holds the operators and terminals and sampling utilities to update programs.

Methods

fit(X, y)

Fit an estimator to X,y.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

predict(X)

Predict using the best estimator in the archive.

predict_archive(X)

Returns a list of dictionary predictions for all models.

set_params(**params)

Set the parameters of this estimator.

fit(X, y)[source]#

Fit an estimator to X,y.

Parameters:
Xnp.ndarray

2-d array of input data.

ynp.ndarray

1-d array of (boolean) target values.

get_params(deep=True)[source]#

Get parameters for this estimator.

Parameters:
deepbool, default=True

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:
paramsdict

Parameter names mapped to their values.

predict(X)[source]#

Predict using the best estimator in the archive.

predict_archive(X)[source]#

Returns a list of dictionary predictions for all models.