feat(WalkForward): added regression/classification switch, archived old experiments, wrapped the process into run_whole_pipeline() (#10)

* refactor(WalkForward): cleaned up training & evaluation code

* refactor: added run_whole_pipeline(), moved all previous models to archive
This commit is contained in:
Mark Aron Szulyovszky
2021-12-14 18:16:17 +01:00
committed by GitHub
parent 7aedb91069
commit d047b7417e
89 changed files with 10763 additions and 6477 deletions
@@ -0,0 +1,19 @@
from pytorch_forecasting import TemporalFusionTransformer
from pytorch_forecasting.metrics import QuantileLoss
def create_TemporalFusionTransformer(training_dataset, model_options):
# create the model
tft = TemporalFusionTransformer.from_dataset(
training_dataset,
learning_rate=0.03,
hidden_size=32,
attention_head_size=1,
dropout=0.1,
hidden_continuous_size=16,
output_size=7,
loss=QuantileLoss(),
log_interval=2,
reduce_on_plateau_patience=4
)
print(f"Number of parameters in network: {tft.size()/1e3:.1f}k")
return tft