auto_ml icon indicating copy to clipboard operation
auto_ml copied to clipboard

error for test case from front page

Open Sandy4321 opened this issue 5 years ago • 6 comments

error for test case

code from auto_ml import Predictor from auto_ml.utils import get_boston_dataset

df_train, df_test = get_boston_dataset()

column_descriptions = { 'MEDV': 'output', 'CHAS': 'categorical' }

ml_predictor = Predictor(type_of_estimator='regressor', column_descriptions=column_descriptions)

ml_predictor.train(df_train)

ml_predictor.score(df_test, df_test.MEDV) q=1

error message

File "E:\my_code\s_auto_ml_test_sep20.py", line 13, in ml_predictor.train(df_train) File "C:\Users\sndr\Anaconda3\Lib\site-packages\auto_ml\predictor.py", line 652, in train X_df = self.fit_transformation_pipeline(X_df, y, estimator_names) File "C:\Users\sndr\Anaconda3\Lib\site-packages\auto_ml\predictor.py", line 899, in fit_transformation_pipeline ppl = self._construct_pipeline(model_name=model_names[0], keep_cat_features=self.keep_cat_features) File "C:\Users\sndr\Anaconda3\Lib\site-packages\auto_ml\predictor.py", line 204, in _construct_pipeline final_model = utils_models.get_model_from_name(model_name, training_params=params) File "C:\Users\sndr\Anaconda3\Lib\site-packages\auto_ml\utils_models.py", line 176, in get_model_from_name model_map['CatBoostRegressor'] = CatBoostRegressor(calc_feature_importance=True)

builtins.TypeError: init() got an unexpected keyword argument 'calc_feature_importance'

Sandy4321 avatar Sep 20 '18 16:09 Sandy4321

Same here. Probably related to https://github.com/catboost/catboost/blob/master/RELEASE.md#breaking-changes-2

havenS avatar Nov 06 '18 11:11 havenS

Had it working with pip install catboost==0.1.1.2

havenS avatar Nov 06 '18 13:11 havenS

Had it working with pip install catboost==0.1.1.2

How can we solve this problem if we use catboost==0.11.1?

xingyuezhiji avatar Nov 21 '18 02:11 xingyuezhiji

Had it working with pip install catboost==0.1.1.2

How can we solve this problem if we use catboost==0.11.1?

I got it! I've deleted the 'calc_feature_importance=True' in utils_models.py,and then it works!

xingyuezhiji avatar Nov 21 '18 04:11 xingyuezhiji

Hey there! It appears that this repository is no longer being actively maintained. However, I still think it's a great idea, so I've started working on my own version of it, which you can find here. It's worth pointing out that I've dropped Python 2.7 support, so you'll have to upgrade if you haven't already.

P.S. @xingyuezhiji is correct, that fixes the issue.

above-c-level avatar Dec 05 '18 02:12 above-c-level

Had it working with pip install catboost==0.1.1.2

How can we solve this problem if we use catboost==0.11.1?

I got it! I've deleted the 'calc_feature_importance=True' in utils_models.py,and then it works!

Can you please tell me how did you do that?

elnurmmmdv avatar Feb 10 '21 06:02 elnurmmmdv