feat(Baseline): added one-split baseline, pure sklearn (#247)

* feat(Baseline): added sklearn_baseline

* feat(Baseline): completely working
This commit is contained in:
Mark Aron Szulyovszky
2022-03-15 18:16:12 +01:00
committed by GitHub
parent 5482e3fc95
commit 7deeb2de01
4 changed files with 81 additions and 12 deletions
+10 -10
View File
@@ -11,20 +11,20 @@ from config.hashing import hash_data_config
from .types import XDataFrame, ReturnSeries
from diskcache import Cache
cache = Cache(".cachedir/data")
# cache = Cache(".cachedir/data")
def load_data(**kwargs) -> tuple[XDataFrame, ReturnSeries]:
hashed = hash_data_config(kwargs)
if hashed in cache:
return cache.get(hashed)
else:
return_value = __load_data(**kwargs)
cache[hashed] = return_value
return return_value
# def load_data(**kwargs) -> tuple[XDataFrame, ReturnSeries]:
# hashed = hash_data_config(kwargs)
# if hashed in cache:
# return cache.get(hashed)
# else:
# return_value = __load_data(**kwargs)
# cache[hashed] = return_value
# return return_value
def __load_data(
def load_data(
assets: DataCollection,
other_assets: DataCollection,
exogenous_data: DataCollection,