chore(Linter): reformatted code with black (#211)

* chore(Linter): reformatted code with black

* Create black.yaml
This commit is contained in:
Mark Aron Szulyovszky
2022-02-17 19:22:17 +01:00
committed by GitHub
parent f3fee4a4e1
commit 8dd2d88740
101 changed files with 2595 additions and 2319 deletions
+9 -8
View File
@@ -3,14 +3,15 @@ import numpy as np
from .base import Model
from sklearn.base import BaseEstimator, ClassifierMixin
class StaticMomentumModel(BaseEstimator, ClassifierMixin, Model):
'''
Model that uses only one feature: momentum. It's positive if momentum is greater than 0, otherwise it's negative.
'''
data_transformation = 'original'
only_column = 'mom'
predict_window_size = 'single_timestamp'
class StaticMomentumModel(BaseEstimator, ClassifierMixin, Model):
"""
Model that uses only one feature: momentum. It's positive if momentum is greater than 0, otherwise it's negative.
"""
data_transformation = "original"
only_column = "mom"
predict_window_size = "single_timestamp"
def __init__(self, allow_short: bool) -> None:
super().__init__()
@@ -24,6 +25,6 @@ class StaticMomentumModel(BaseEstimator, ClassifierMixin, Model):
negative_class = -1.0 if self.allow_short == True else 0.0
prediction = 1.0 if X[-1][0] > 0 else negative_class
return np.array(prediction)
def predict_proba(self, X) -> np.ndarray:
return np.array([])