feat(Model): added own Model class, SkLearnModel wrapper and StaticMomentumModel (#61)

* feat(Model): added own `Model` class, SkLearnModel wrapper and StaticMomentumModel

* fix(Tests): added missing Model variable

* fix(Tests): added missing clone method()
This commit is contained in:
Mark Aron Szulyovszky
2021-12-21 10:30:09 +01:00
committed by GitHub
parent 85ad937078
commit 79d84cf0a3
8 changed files with 122 additions and 45 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ from typing import Literal
from training.walk_forward import walk_forward_train_test
from sklearn.preprocessing import MinMaxScaler, Normalizer, StandardScaler
from utils.evaluate import evaluate_predictions
from utils.typing import SKLearnModel
from models.base import Model
def __get_scaler(type: Literal['normalize', 'minmax', 'standardize', 'none']):
if type == 'normalize':
@@ -20,7 +20,7 @@ def run_single_asset_trainig_pipeline(
X: pd.DataFrame,
y: pd.Series,
target_returns: pd.Series,
models: list[tuple[str, SKLearnModel]],
models: list[tuple[str, Model]],
method: Literal['regression', 'classification'],
sliding_window_size: int,
retrain_every: int,