mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-15 11:58:07 +00:00
refactor(Project): removed regression method (we can still use regression models, but we'll need map them to classification later) (#182)
* refactor(Project): removed regression method (we can still use regression models, but we'll need map them to classes later) * fix(Training): removed mistakenly left in `method` parameter
This commit is contained in:
@@ -2,7 +2,6 @@ from utils.evaluate import discretize_threeway_threshold, evaluate_predictions
|
||||
from utils.helpers import equal_except_nan
|
||||
from training.primary_model import train_primary_model
|
||||
import pandas as pd
|
||||
from models.model_map import default_feature_selector_classification, default_feature_selector_regression
|
||||
from models.base import Model
|
||||
from reporting.types import Reporting
|
||||
from typing import Union, Optional
|
||||
@@ -35,7 +34,6 @@ def train_meta_labeling_model(
|
||||
y = meta_y,
|
||||
target_returns = target_returns,
|
||||
models = models,
|
||||
method = 'classification',
|
||||
expanding_window = training_config['expanding_window_meta_labeling'],
|
||||
sliding_window_size = training_config['sliding_window_size_meta_labeling'],
|
||||
retrain_every = training_config['retrain_every'],
|
||||
@@ -59,7 +57,6 @@ def train_meta_labeling_model(
|
||||
target_returns = target_returns,
|
||||
y_pred = avg_predictions_with_sizing,
|
||||
y_true = y,
|
||||
method = 'classification',
|
||||
no_of_classes = 'two',
|
||||
print_results = True,
|
||||
discretize=False
|
||||
|
||||
@@ -15,7 +15,6 @@ def train_primary_model(
|
||||
y: pd.Series,
|
||||
target_returns: pd.Series,
|
||||
models: list[tuple[str, Model]],
|
||||
method: Literal['regression', 'classification'],
|
||||
expanding_window: bool,
|
||||
sliding_window_size: int,
|
||||
retrain_every: int,
|
||||
@@ -80,7 +79,6 @@ def train_primary_model(
|
||||
target_returns = target_returns,
|
||||
y_pred = preds,
|
||||
y_true = y,
|
||||
method = method,
|
||||
no_of_classes=no_of_classes,
|
||||
print_results = print_results,
|
||||
discretize=True
|
||||
|
||||
@@ -28,7 +28,6 @@ def primary_step(
|
||||
y = y,
|
||||
target_returns = target_returns,
|
||||
models = model_config['primary_models'],
|
||||
method = data_config['method'],
|
||||
expanding_window = training_config['expanding_window_primary'],
|
||||
sliding_window_size = training_config['sliding_window_size_primary'],
|
||||
retrain_every = training_config['retrain_every'],
|
||||
@@ -94,9 +93,7 @@ def secondary_step(
|
||||
X = current_predictions,
|
||||
y = y,
|
||||
target_returns = target_returns,
|
||||
models = [model_config['ensemble_model']],
|
||||
method = data_config['method'],
|
||||
expanding_window = False,
|
||||
models = [model_config['ensemble_model']], expanding_window = False,
|
||||
sliding_window_size = 1,
|
||||
retrain_every = training_config['retrain_every'],
|
||||
from_index = from_index,
|
||||
|
||||
Reference in New Issue
Block a user