Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch14.ipynb Cell #19 #8

Open
SSJUSA opened this issue May 7, 2020 · 1 comment
Open

ch14.ipynb Cell #19 #8

SSJUSA opened this issue May 7, 2020 · 1 comment

Comments

@SSJUSA
Copy link

SSJUSA commented May 7, 2020

ch14.ipynb Cell #19

KeyError: 'weight'
2 fi_viz = FeatureImportances(xgr)
3 fi_viz.fit(bos_X_train, bos_y_train)
----> 4 fi_viz.poof()
5 #fig.savefig("images/mlpr_1406.png", dpi=300)

C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\yellowbrick\base.py in poof(self, *args, **kwargs)
259 "this method is deprecated, please use show() instead", DeprecationWarning
260 )
--> 261 return self.show(*args, **kwargs)
262
263 ## ////////////////////////////////////////////////////////////////////

C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\yellowbrick\base.py in show(self, outpath, clear_figure, **kwargs)
239
240 # Finalize the figure
--> 241 self.finalize()
242
243 if outpath is not None:

C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\yellowbrick\model_selection\importances.py in finalize(self, **kwargs)
283
284 # Set the xlabel
--> 285 self.ax.set_xlabel(self._get_xlabel())
286
287 # Remove the ygrid

C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\yellowbrick\model_selection\importances.py in get_xlabel(self)
332
333 # Label for coefficients
--> 334 if hasattr(self.estimator, "coef
"):
335 if self.relative:
336 return "relative coefficient magnitude"

C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\xgboost\sklearn.py in coef_(self)
714 .format(self.booster))
715 b = self.get_booster()
--> 716 coef = np.array(json.loads(b.get_dump(dump_format='json')[0])['weight'])
717 # Logic for multiclass classification
718 n_classes = getattr(self, 'n_classes_', None)

@SSJUSA SSJUSA closed this as completed May 7, 2020
@SSJUSA SSJUSA reopened this May 7, 2020
@SSJUSA
Copy link
Author

SSJUSA commented May 7, 2020

This issue is open issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant