ClimbsRocks / auto_ml

[UNMAINTAINED] Automated machine learning for analytics & production
http://auto-ml.readthedocs.io
MIT License
1.64k stars 310 forks source link

Imblearn incompatibility. #432

Closed Sebastian-Koenig closed 4 years ago

Sebastian-Koenig commented 4 years ago

Hi, running model.train(... , optimize_final_model=True) with imblearn pip installed results in the following Error:

TypeError Traceback (most recent call last)

in () ----> 1 automlmodel.train(dtrain, model_names = 'XGBClassifier' , optimize_final_model=True) ~/anaconda3/envs/python3/lib/python3.6/site-packages/auto_ml/predictor.py in train(***failed resolving arguments***) 668 669 # This is our main logic for how we train the final model --> 670 self.trained_final_model = self.train_ml_estimator(self.model_names, self._scorer, X_df, y) 671 672 if self.ensemble_config is not None and len(self.ensemble_config) > 0: ~/anaconda3/envs/python3/lib/python3.6/site-packages/auto_ml/predictor.py in train_ml_estimator(self, estimator_names, scoring, X_df, y, feature_learning, prediction_interval) 1267 self.grid_search_params = grid_search_params 1268 -> 1269 gscv_results = self.fit_grid_search(X_df, y, grid_search_params, feature_learning=feature_learning) 1270 1271 all_gs_results.append(gscv_results) ~/anaconda3/envs/python3/lib/python3.6/site-packages/auto_ml/predictor.py in fit_grid_search(self, X_df, y, gs_params, feature_learning, refit) 1154 generations_number=generations_number, 1155 # Do not fit the best estimator on all the data- we will do that later, possibly after increasing epochs or n_estimators -> 1156 refit=refit 1157 1158 ) ~/anaconda3/envs/python3/lib/python3.6/site-packages/evolutionary_search/cv.py in __init__(self, estimator, params, scoring, cv, refit, verbose, population_size, gene_mutation_prob, gene_crossover_prob, tournament_size, generations_number, gene_type, n_jobs, iid, pre_dispatch, error_score, fit_params) 288 estimator=estimator, scoring=scoring, fit_params=fit_params, 289 n_jobs=n_jobs, iid=iid, refit=refit, cv=cv, verbose=verbose, --> 290 pre_dispatch=pre_dispatch, error_score=error_score) 291 self.params = params 292 self.population_size = population_size TypeError: __init__() got an unexpected keyword argument 'fit_params'
Sebastian-Koenig commented 4 years ago

Both modules are deprecated.