You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gives error
'''
File "E:\Pandas\my_code\S_pandas_ml_feb27.py", line 10, in
train_df.xgboost.plot_importance()
File "C:\Users\sndr\Anaconda3\Lib\site-packages\pandas_ml\xgboost\base.py", line 61, in plot_importance
return xgb.plot_importance(self._df.estimator.booster(),
builtins.TypeError: 'str' object is not callable
'''
I use
Windows and 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]
Python Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered:
Thanks for the report. This should be fixed in latest version (v0.6.1). Note that doc is also updated to fix deprecated module (cross_validation -> model_selection)
code from example
https://pandas-ml.readthedocs.io/en/latest/xgboost.html
'''import pandas_ml as pdml
import sklearn.datasets as datasets
df = pdml.ModelFrame(datasets.load_digits())
train_df, test_df = df.cross_validation.train_test_split()
estimator = df.xgboost.XGBClassifier()
train_df.fit(estimator)
predicted = test_df.predict(estimator)
q=1
test_df.metrics.confusion_matrix()
train_df.xgboost.plot_importance()
tuned_parameters = [{'max_depth': [3, 4]}]
cv = df.grid_search.GridSearchCV(df.xgb.XGBClassifier(), tuned_parameters, cv=5)
df.fit(cv)
df.grid_search.describe(cv)
q=1
'''
gives error
'''
File "E:\Pandas\my_code\S_pandas_ml_feb27.py", line 10, in
train_df.xgboost.plot_importance()
File "C:\Users\sndr\Anaconda3\Lib\site-packages\pandas_ml\xgboost\base.py", line 61, in plot_importance
return xgb.plot_importance(self._df.estimator.booster(),
builtins.TypeError: 'str' object is not callable
'''
I use
Windows and 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]
Python Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered: