mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-12 18:38:06 +00:00
feat(Config): feature extractors are enabled one-by-one with a bool, added previous model to model.fit() (#77)
* feat(Config): feature extractors are enabled one-by-one with a bool, added previous model to model.fit() * fix(Sweep): removed unused `other_features` parameter that fails sweep * feat(Config): using preset names for defining feature extractors again * fix(Tests): fixed model stub classes
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ class StaticAverageModel(Model):
|
||||
data_scaling = 'unscaled'
|
||||
only_column = 'model_'
|
||||
|
||||
def fit(self, X, y):
|
||||
def fit(self, X, y, prev_model):
|
||||
# This is a static model, it can' learn anything
|
||||
pass
|
||||
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ class Model(ABC):
|
||||
only_column: Optional[str]
|
||||
|
||||
@abstractmethod
|
||||
def fit(self, X, y):
|
||||
def fit(self, X, y, prev_model):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
@@ -32,7 +32,7 @@ class SKLearnModel(Model):
|
||||
def __init__(self, model):
|
||||
self.model = model
|
||||
|
||||
def fit(self, X, y):
|
||||
def fit(self, X, y, prev_model):
|
||||
self.model.fit(X, y)
|
||||
|
||||
def predict(self, X):
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ class StaticMomentumModel(Model):
|
||||
super().__init__()
|
||||
self.allow_short = allow_short
|
||||
|
||||
def fit(self, X, y):
|
||||
def fit(self, X, y, prev_model):
|
||||
# This is a static model, it can' learn anything
|
||||
pass
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ class StaticNaiveModel(Model):
|
||||
data_scaling = 'unscaled'
|
||||
only_column = None
|
||||
|
||||
def fit(self, X, y):
|
||||
def fit(self, X, y, prev_model):
|
||||
# This is a static model, it can' learn anything
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user