experiments.baselines.random_classifiers.UniformRandomClassifierBaseline¶
- class UniformRandomClassifierBaseline¶
Bases:
RandomClassifierModel
,SupervisedExperimentBaseline
- __init__()¶
Implements a classifier that always predicts that the positive class has prob=0.5, regardless of input
- __repr__()¶
Return repr(self).
Methods
- predict(theta, X)¶
Predict the probability of having the positive class label
- Parameters:
theta (numpy ndarray) – The parameter weights
X (numpy ndarray) – The features
- Returns:
predictions for each observation
- Return type:
float
- 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