feat(Labeling): purge overlapping events, sort dataframe at loading time (#226)

* feat(Labeling): purge overlapping events, sort dataframe at loading time

* fix(Linter): ran

* refactor(Labeling): moved purge_overlapping_events one abstraction level higher

* fix(Data): renamed class

* fix(Data): corrected parameter name

* fix(Config): parameters

* fix(Data): fixed path

* fix(Data): uncommented required code

* feat(EventFilters): use vol based CUSUM

* fix(Config): only retrain every 2000 samples

* fix(Config): filter out even more events

* fix(Inference): added remove_overlapping_events

* refactor(Types): simplified type hierarchy
This commit is contained in:
Mark Aron Szulyovszky
2022-03-02 00:26:33 +01:00
committed by GitHub
parent 10a0803c91
commit 75157c6285
17 changed files with 120 additions and 77 deletions
+9 -3
View File
@@ -7,7 +7,11 @@ from training.walk_forward import (
)
from utils.evaluate import evaluate_predictions
from models.base import Model
from .types import ModelOverTime, TransformationsOverTime, TrainingOutcome
from .types import (
ModelOverTime,
TransformationsOverTime,
TrainingOutcomeWithoutTransformations,
)
def train_model(
@@ -24,7 +28,7 @@ def train_model(
output_stats: bool,
transformations_over_time: TransformationsOverTime,
model_over_time: Optional[ModelOverTime],
) -> TrainingOutcome:
) -> TrainingOutcomeWithoutTransformations:
if model_over_time is None:
print("Train model")
@@ -74,4 +78,6 @@ def train_model(
else:
stats = None
return TrainingOutcome(model_id, predictions, probabilities, stats, model_over_time)
return TrainingOutcomeWithoutTransformations(
model_id, predictions, probabilities, stats, model_over_time
)