feat(Models): added optional hpsklearn (#236)

This commit is contained in:
Mark Aron Szulyovszky
2022-03-13 14:59:42 +01:00
committed by GitHub
parent d6df773267
commit 717e0ac979
2 changed files with 24 additions and 10 deletions
+10 -9
View File
@@ -17,22 +17,23 @@ dependencies:
- ipython
- ipykernel
- scipy
- tqdm
- numpy
- pandas
- matplotlib
- quantstats
- pytest
- wandb
- pandas-ta
- pip
- pip:
- black
- fracdiff
- diskcache
- matplotlib
- numpy
- quantstats
- pytest
- wandb
- python-dotenv
- tscv
- tqdm
- pandas-ta
- alphalens-reloaded
- vectorbt
- pandera[mypy]
- binance_historical_data
- alphalens-reloaded
prefix: /usr/local/anaconda3/envs/quant
+14 -1
View File
@@ -1,5 +1,5 @@
from models.sklearn import SKLearnModel
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from sklearn.ensemble import RandomForestClassifier
from .base import Model
default_feature_selector_classification = SKLearnModel(
@@ -75,6 +75,19 @@ def get_model(model_name: str) -> Model:
SKLearnModel(LGBMClassifier(n_jobs=-1, max_depth=20, random_state=1))
)
elif model_name == "HyperOpt":
from hpsklearn import HyperoptEstimator
from hyperopt import tpe
return set_name(
SKLearnModel(
HyperoptEstimator(
algo=tpe.suggest,
trial_timeout=300,
)
)
)
elif model_name == "AutoML":
from supervised.automl import AutoML