mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-13 02:48:07 +00:00
refactor(Training): remove non-expanding window option (#244)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user