AlwaysFive

class mastml.legos.model_finder.AlwaysFive(constant=5)[source]

Bases: sklearn.base.RegressorMixin

Class used as a test model that always predicts a value of 5.

Args:

constant: (int), the value to predict. Always 5 by default

Methods:

fit: Just passes through to maintain scikit-learn structure

predict: Provides predicted model values based on X features

Args:

X: (numpy array), array of X features

Returns:

(numpy array), prediction array where all values are equal to constant

Methods Summary

fit(X, y[, groups])
predict(X)

Methods Documentation

fit(X, y, groups=None)[source]
predict(X)[source]