Skip to content
Snippets Groups Projects
Commit 7bd84605 authored by lukas leufen's avatar lukas leufen
Browse files

applied bug fix as mentioned in #74

parent 57b2a4b1
Branches
No related tags found
2 merge requests!67apply bug fix to dev too,!66Resolve "BUG: OLS add constant has to be forced"
Pipeline #31535 passed
...@@ -31,7 +31,7 @@ class OrdinaryLeastSquaredModel: ...@@ -31,7 +31,7 @@ class OrdinaryLeastSquaredModel:
self.y = data_y self.y = data_y
def predict(self, data): 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)) return np.atleast_2d(self.model.predict(data))
@staticmethod @staticmethod
......
from src.model_modules.linear_model import OrdinaryLeastSquaredModel
class TestOrdinaryLeastSquareModel:
def test_constant_input_variable(self):
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment