experiments.baselines.random_forest.RandomForestClassifierBaseline

class RandomForestClassifierBaseline(**rf_kwargs)

Bases: SupervisedExperimentBaseline

__init__(**rf_kwargs)

Implements a random forest classifier baseline for a binary classification task

__repr__()

Return repr(self).

Methods

predict(theta, X)

Use the trained model to predict positive class probabilities theta isn’t used here because there are no fitted parameters in random forests. :param theta: Model weights, None in this case :param X: features :type X: 2D np.ndarray

train(X, Y)

Instantiate a new model instance and train (fit) it to the training data, X,y :param X: features :type X: 2D np.ndarray :param y: labels :type y: 1D np.ndarray