-
Notifications
You must be signed in to change notification settings - Fork 137
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
ch13.ipynb Cell #10 #7
Comments
What version of pdpbox do you have installed |
My computer has pdpbox version 0.2.0
Chapter 13, cell # 10 is giving following errors:
Thanks,
SSJ
features = ["fare", "sex_male"]
p = pdp.pdp_interact(
rf5, X, X.columns, features
)
fig, _ = pdp.pdp_interact_plot(p, features)
TypeError Traceback (most recent call
last)<ipython-input-10-b83ece234466> in <module> 3 rf5, X,
X.columns, features 4 )----> 5 fig, _ = pdp.pdp_interact_plot(p,
features) 6 #fig.savefig("images/mlpr_1303.png", dpi=300)
C:\ProgramData\Anaconda3\lib\site-packages\pdpbox\pdp.py in
pdp_interact_plot(pdp_interact_out, feature_names, plot_type,
x_quantile, plot_pdp, which_classes, figsize, ncols, plot_params)
773 fig.add_subplot(inter_ax) 774
_pdp_inter_one(pdp_interact_out=pdp_interact_plot_data[0],
inter_ax=inter_ax, norm=None,--> 775
feature_names=feature_names_adj, **inter_params) 776 else:
777 wspace = 0.3
C:\ProgramData\Anaconda3\lib\site-packages\pdpbox\pdp_plot_utils.py in
_pdp_inter_one(pdp_interact_out, feature_names, plot_type, inter_ax,
x_quantile, plot_params, norm, ticks) 330 # for numeric
not quantile 331 X, Y =
np.meshgrid(pdp_interact_out.feature_grids[0],
pdp_interact_out.feature_grids[1])--> 332 im =
_pdp_contour_plot(X=X, Y=Y, **inter_params) 333 elif plot_type
== 'grid': 334 im = _pdp_inter_grid(**inter_params)
C:\ProgramData\Anaconda3\lib\site-packages\pdpbox\pdp_plot_utils.py in
_pdp_contour_plot(X, Y, pdp_mx, inter_ax, cmap, norm,
inter_fill_alpha, fontsize, plot_params) 249 c1 =
inter_ax.contourf(X, Y, pdp_mx, N=level, origin='lower', cmap=cmap,
norm=norm, alpha=inter_fill_alpha) 250 c2 =
inter_ax.contour(c1, levels=c1.levels, colors=contour_color,
origin='lower')--> 251 inter_ax.clabel(c2,
contour_label_fontsize=fontsize, inline=1) 252
inter_ax.set_aspect('auto') 253
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py in
clabel(self, CS, *args, **kwargs) 6349 6350 def clabel(self,
CS, *args, **kwargs):-> 6351 return CS.clabel(*args, **kwargs)
6352 clabel.__doc__ = mcontour.ContourSet.clabel.__doc__ 6353
TypeError: clabel() got an unexpected keyword argument 'contour_label_fontsize'
…On Mon, Aug 24, 2020 at 4:46 PM matt harrison ***@***.***> wrote:
What version of pdpbox do you have installed
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APPYKBKPSZBSU6K4QIAXOL3SCLGSPANCNFSM4M3QVZEQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ch13.ipynb Cell #10
3 rf5, X, X.columns, features
4 )
----> 5 fig, _ = pdp.pdp_interact_plot(p, features)
TypeError: clabel() got an unexpected keyword argument 'contour_label_fontsize'
C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\pdpbox\pdp.py in pdp_interact_plot(pdp_interact_out, feature_names, plot_type, x_quantile, plot_pdp, which_classes, figsize, ncols, plot_params)
773 fig.add_subplot(inter_ax)
774 _pdp_inter_one(pdp_interact_out=pdp_interact_plot_data[0], inter_ax=inter_ax, norm=None,
--> 775 feature_names=feature_names_adj, **inter_params)
776 else:
777 wspace = 0.3
C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\pdpbox\pdp_plot_utils.py in _pdp_inter_one(pdp_interact_out, feature_names, plot_type, inter_ax, x_quantile, plot_params, norm, ticks)
330 # for numeric not quantile
331 X, Y = np.meshgrid(pdp_interact_out.feature_grids[0], pdp_interact_out.feature_grids[1])
--> 332 im = _pdp_contour_plot(X=X, Y=Y, **inter_params)
333 elif plot_type == 'grid':
334 im = _pdp_inter_grid(**inter_params)
C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\pdpbox\pdp_plot_utils.py in _pdp_contour_plot(X, Y, pdp_mx, inter_ax, cmap, norm, inter_fill_alpha, fontsize, plot_params)
249 c1 = inter_ax.contourf(X, Y, pdp_mx, N=level, origin='lower', cmap=cmap, norm=norm, alpha=inter_fill_alpha)
250 c2 = inter_ax.contour(c1, levels=c1.levels, colors=contour_color, origin='lower')
--> 251 inter_ax.clabel(c2, contour_label_fontsize=fontsize, inline=1)
252 inter_ax.set_aspect('auto')
253
C:\ProgramData\Anaconda3\envs\tf_SSJ_gpu\lib\site-packages\matplotlib\axes_axes.py in clabel(self, CS, *args, **kwargs)
6338
6339 def clabel(self, CS, *args, **kwargs):
-> 6340 return CS.clabel(*args, **kwargs)
6341 clabel.doc = mcontour.ContourSet.clabel.doc
6342
The text was updated successfully, but these errors were encountered: