Commit 53546303 authored by lukas leufen's avatar lukas leufen

Merge branch 'lukas_issue074_bug_ols-force-add-constant' into 'master'

Resolve "BUG: OLS add constant has to be forced"

Closes #74

See merge request toar/machinelearningtools!66
parents 57b2a4b1 7bd84605
Pipeline #34386 passed with stages
in 6 minutes and 13 seconds
......@@ -31,7 +31,7 @@ class OrdinaryLeastSquaredModel:
self.y = data_y
def predict(self, data):
data = sm.add_constant(self.reshape_xarray_to_numpy(data))
data = sm.add_constant(self.reshape_xarray_to_numpy(data), has_constant="add")
return np.atleast_2d(self.model.predict(data))
@staticmethod
......
from src.model_modules.linear_model import OrdinaryLeastSquaredModel
class TestOrdinaryLeastSquareModel:
def test_constant_input_variable(self):
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment