mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-08 00:27:50 +00:00
Feature(Speed): Python launches faster by conditionally importing models. (#169)
* feat: Added optional import of models. * fix: Models weren't wrapped into abstract class, fixed it. * chore: Deleted leftover comments. * fix: Same merge commit as on remote. * fix: System wasn't putting in RF because there was no differentiation between RF as regressor and RF as classificator. * fix(Models): use the XGBoostModel wrapper Co-authored-by: Daniel Szemerey <szemereydaniel@gmail.com> Co-authored-by: Mark Aron Szulyovszky <mark.szulyovszky@gmail.com>
This commit is contained in:
@@ -3,16 +3,18 @@ from operator import itemgetter
|
||||
|
||||
from utils.helpers import has_enough_samples_to_train
|
||||
from feature_selection.dim_reduction import reduce_dimensionality
|
||||
from models.model_map import default_feature_selector_regression, default_feature_selector_classification
|
||||
from models.model_map import get_model_map
|
||||
from feature_selection.feature_selection import select_features
|
||||
import warnings
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def process_data(X:pd.DataFrame, y:pd.Series, configs: dict) -> tuple[pd.DataFrame,pd.DataFrame]:
|
||||
|
||||
model_config, training_config, data_config = itemgetter('model_config', 'training_config', 'data_config')(configs)
|
||||
_, _, _, default_feature_selector_regression, default_feature_selector_classification = get_model_map(model_config)
|
||||
|
||||
original_X = X.copy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user