fix(MetaLabeling): previously misinterpreted meta-labeling, now also multiplying base model's prediction with the meta model's prediction (#193)

* fix(MetaLabeling): previously misinterpreted meta-labeling, now also multiplying base model's prediction with the meta model's prediction

* fix(Evaluate): print results

* fix(Evaluate): make sure we have numerical stability in returns

* fix(Inference): only output and print stats in training mode

* fix(Evaluate): don't add miniscule amount to result
This commit is contained in:
Mark Aron Szulyovszky
2022-02-01 13:09:00 +01:00
committed by GitHub
parent 3eb3ea94e3
commit f85ee6bb9c
11 changed files with 61 additions and 46 deletions
+4 -4
View File
@@ -16,13 +16,13 @@ class TrainingOutcome:
model_id: str
predictions: PredictionsSeries
probabilities: ProbabilitiesDataFrame
stats: Stats
stats: Optional[Stats]
model_over_time: ModelOverTime
@dataclass
class EnsembleOutcome:
weights: WeightsSeries
stats: Stats
stats: Optional[Stats]
@dataclass
class BetSizingWithMetaOutcome:
@@ -30,7 +30,7 @@ class BetSizingWithMetaOutcome:
meta_training: list[TrainingOutcome]
meta_transformations: TransformationsOverTime
weights: WeightsSeries
stats: Stats
stats: Optional[Stats]
@dataclass
class DirectionalTrainingOutcome:
@@ -47,5 +47,5 @@ class PipelineOutcome:
def get_output_weights(self) -> WeightsSeries:
return self.secondary_bet_sizing.weights if self.secondary_bet_sizing else self.ensemble.weights
def get_output_stats(self) -> Stats:
def get_output_stats(self) -> Optional[Stats]:
return self.secondary_bet_sizing.stats if self.secondary_bet_sizing else self.ensemble.stats