C:\Users\86152\anaconda3\lib\site-packages\xgboost\sklearn.py:793: UserWarning: eval_metric
in fit
method is deprecated for better compatibility with scikit-learn, use eval_metric
in constructor orset_params
instead.
warnings.warn(
C:\Users\86152\anaconda3\lib\site-packages\xgboost\sklearn.py:793: UserWarning: early_stopping_rounds
in fit
method is deprecated for better compatibility with scikit-learn, use early_stopping_rounds
in constructor orset_params
instead.
warnings.warn(
[0] validation_0-logloss:0.69315
[1] validation_0-logloss:0.69315
[2] validation_0-logloss:0.69315
[3] validation_0-logloss:0.69315
[4] validation_0-logloss:0.69315
[5] validation_0-logloss:0.69315
Accuracy: 66.67%
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_15812/1905455342.py in
26 print("Accuracy: %.2f%%" % (accuracy * 100.0))
27 model.fit(X, Y)
-> 28 plot_importance(model)
29 pyplot.show()
~\anaconda3\lib\site-packages\xgboost\plotting.py in plot_importance(booster, ax, height, xlim, ylim, title, xlabel, ylabel, fmap, importance_type, max_num_features, grid, show_values, **kwargs)
72
73 if not importance:
-> 74 raise ValueError(
75 'Booster.get_score() results in empty. ' +
76 'This maybe caused by having all trees as decision dumps.')
ValueError: Booster.get_score() results in empty. This maybe caused by having all trees as decision dumps.