seldonian.models.models.LinearRegressionModel¶
- class LinearRegressionModel¶
Bases:
RegressionModel
- __init__()¶
Implements linear regression
- __repr__()¶
Return repr(self).
Methods
- fit(X, Y)¶
Train the model using the feature,label pairs
- Parameters:
X (NxM numpy ndarray) – features
Y (Nx1 numpy ndarray) – labels
- Returns:
weights from the fitted model
- Return type:
numpy ndarray
- predict(theta, X)¶
Predict label using the linear model
- Parameters:
theta (numpy ndarray) – The parameter weights
X (numpy ndarray) – The features
- Returns:
predicted labels
- Return type:
numpy ndarray