refactor(Training): remove non-expanding window option (#244)

This commit is contained in:
Mark Aron Szulyovszky
2022-03-15 16:21:06 +01:00
committed by GitHub
parent b5ddee8dce
commit d0c519dc5b
8 changed files with 5 additions and 147 deletions
+1 -3
View File
@@ -42,9 +42,8 @@ class IncrementingStubModel(Model, BaseEstimator, ClassifierMixin):
self.window_length = window_length
def fit(self, X, y):
assert len(X) == self.window_length
for i in range(len(X)):
assert X[i][0] + 1 == y[i]
assert X[i][-1] + 1 == y[i]
def predict(self, X):
return np.array([row[0] + 1 for row in X])
@@ -66,7 +65,6 @@ def test_walk_forward_train_test():
X=X,
y=y,
forward_returns=y,
expanding_window=False,
window_size=window_length,
retrain_every=retrain_every,
from_index=None,