mirror of
https://github.com/webclinic017/drift.git
synced 2026-07-28 11:17:47 +00:00
b6cd6b14fe
* 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
24 lines
541 B
Python
24 lines
541 B
Python
from models.base import Model
|
|
import numpy as np
|
|
|
|
class StaticAverageModel(Model):
|
|
'''
|
|
Model that averages .
|
|
'''
|
|
|
|
# data_format = 'dataframe'
|
|
data_scaling = 'unscaled'
|
|
only_column = 'model_'
|
|
|
|
def fit(self, X, y, prev_model):
|
|
# This is a static model, it can' learn anything
|
|
pass
|
|
|
|
def predict(self, X):
|
|
# Make sure there's data to average
|
|
assert X.shape[1] > 0
|
|
prediction = np.average(X[0])
|
|
return np.array([prediction])
|
|
|
|
def clone(self):
|
|
return self |