mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-09 00:57:49 +00:00
feat(Project): use SKLearn models directly, removed custom ensembling, use 5 minute data, batch inference, numba cusum filter (#192)
* feat(Project): use 5 minute data, running training in parallel, sped up cusum filter by 10x with numba * fix(WalkForward): inference mini-batch parallelization * fix(WalkForward): don't use the parallel version of any of the functions * feat(CI): download the data required * fix(Project): 5min_crypto folder added * fix(Evaluate): make sure we have numerical stability in returns * feat(Models): use SKLearn models directly to enable composability * feat(Inference): batched inference now working, added forecasting_horizon * fix(Inference): works again * fix(Inference) * chore(Models): remove unused Ensemble model * fix(Labeller): don't just forward shift returns, also take the sum of the data happened until then * Update test.yml
This commit is contained in:
committed by
GitHub
parent
5c94af8b01
commit
9d47ee942d
+6
-13
@@ -19,33 +19,26 @@ class TrainingOutcome:
|
||||
stats: Optional[Stats]
|
||||
model_over_time: ModelOverTime
|
||||
|
||||
@dataclass
|
||||
class EnsembleOutcome:
|
||||
weights: WeightsSeries
|
||||
stats: Optional[Stats]
|
||||
|
||||
@dataclass
|
||||
class BetSizingWithMetaOutcome:
|
||||
model_id: str
|
||||
meta_training: list[TrainingOutcome]
|
||||
meta_training: TrainingOutcome
|
||||
meta_transformations: TransformationsOverTime
|
||||
weights: WeightsSeries
|
||||
stats: Optional[Stats]
|
||||
|
||||
@dataclass
|
||||
class DirectionalTrainingOutcome:
|
||||
training: list[TrainingOutcome]
|
||||
training: TrainingOutcome
|
||||
transformations: TransformationsOverTime
|
||||
|
||||
@dataclass
|
||||
class PipelineOutcome:
|
||||
directional_training: DirectionalTrainingOutcome
|
||||
bet_sizing: list[BetSizingWithMetaOutcome]
|
||||
ensemble: EnsembleOutcome
|
||||
secondary_bet_sizing: Optional[BetSizingWithMetaOutcome]
|
||||
bet_sizing: BetSizingWithMetaOutcome
|
||||
|
||||
def get_output_weights(self) -> WeightsSeries:
|
||||
return self.secondary_bet_sizing.weights if self.secondary_bet_sizing else self.ensemble.weights
|
||||
return self.bet_sizing.weights
|
||||
|
||||
def get_output_stats(self) -> Optional[Stats]:
|
||||
return self.secondary_bet_sizing.stats if self.secondary_bet_sizing else self.ensemble.stats
|
||||
def get_output_stats(self) -> Stats:
|
||||
return self.bet_sizing.stats
|
||||
Reference in New Issue
Block a user