mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-13 19:08:06 +00:00
feat(Events): added EventFilter, EventLabeller (#186)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from reporting.wandb import send_report_to_wandb
|
||||
import pandas as pd
|
||||
from utils.helpers import weighted_average
|
||||
from config.config import Config
|
||||
from config.types import Config
|
||||
|
||||
def report_results(results:pd.DataFrame, all_predictions:pd.DataFrame, config: Config, wandb, sweep: bool, project_name:str):
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import pickle
|
||||
import datetime
|
||||
from config.config import Config
|
||||
from config.types import Config
|
||||
from typing import Optional, Union
|
||||
import os
|
||||
import warnings
|
||||
|
||||
+10
-11
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
import pandas as pd
|
||||
from models.base import Model
|
||||
from typing import Optional, Union
|
||||
|
||||
|
||||
class Reporting:
|
||||
@@ -14,12 +13,11 @@ class Reporting:
|
||||
def get_results(self) -> tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame, Reporting.Asset]:
|
||||
return self.results, self.all_predictions, self.all_probabilities, self.asset
|
||||
|
||||
|
||||
@dataclass
|
||||
class Single_Model:
|
||||
def __init__(self, model_name: str, model_over_time: pd.Series, transformations_over_time: list[pd.Series]):
|
||||
self.model_name: str = model_name
|
||||
self.model_over_time: pd.Series = model_over_time
|
||||
self.transformations_over_time: list[pd.Series] = transformations_over_time
|
||||
model_name: str
|
||||
model_over_time: pd.Series
|
||||
transformations_over_time: list[pd.Series]
|
||||
|
||||
|
||||
class Training_Step:
|
||||
@@ -37,8 +35,9 @@ class Reporting:
|
||||
structured_dict[model.model_name] = [(x.model_name, x.model_over_time, x.transformations_over_time) for x in self.metalabeling[i]]
|
||||
return structured_dict
|
||||
|
||||
@dataclass
|
||||
class Asset():
|
||||
def __init__(self, ticker: str, primary: Reporting.Training_Step, secondary: Reporting.Training_Step):
|
||||
self.name: str = ticker
|
||||
self.primary: Reporting.Training_Step = primary
|
||||
self.secondary: Reporting.Training_Step = secondary
|
||||
name: str
|
||||
primary: Reporting.Training_Step
|
||||
secondary: Reporting.Training_Step
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import pandas as pd
|
||||
from config.config import RawConfig
|
||||
from config.types import RawConfig
|
||||
from typing import Optional
|
||||
from utils.helpers import weighted_average
|
||||
|
||||
|
||||
Reference in New Issue
Block a user