mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-21 14:58:11 +00:00
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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user