experiments.baselines.baselines.SupervisedExperimentBaseline

class SupervisedExperimentBaseline(model_name)

Bases: object

__init__(model_name)

Base class for all supervised learning experiment baselines. All such baselines must have a string model_name and implement at least the two methods below: train() and predict().

Parameters:

model_name – The string name to give the model. This will be used as the prefix for the directory in which the model’s results are saved.

__repr__()

Return repr(self).

Methods

predict(theta, X)

Use the trained model to make predictions on new features, X :param theta: Model weights, not always used. :param X: features :type X: 2D np.ndarray

train(X, Y)

Train the model on the training data, X,y :param X: features :type X: 2D np.ndarray :param y: labels :type y: 1D np.ndarray