def __init__(self, *args, **kwargs): CustomFactor.__init__(self, *args, **kwargs) self._imputer = preprocessing.Imputer() self._scaler = preprocessing.MinMaxScaler() self._classifier = linear_model.SGDClassifier(penalty='elasticnet') self._trained = False
def _compute(self, *args, **kwargs): ret = CustomFactor._compute(self, *args, **kwargs) # reset the day counter so that we will begin training at the start of # the next _compute call self._day_counter = -1 return ret
def _compute(self, *args, **kwargs): ret = CustomFactor._compute(self, *args, **kwargs) return ret