PDPbox icon indicating copy to clipboard operation
PDPbox copied to clipboard

Provided example actual_plot: TypeError: predict() argument after ** must be a mapping, not NoneType

Open quweining518 opened this issue 5 years ago • 1 comments

fig, axes, summary_df = info_plots.actual_plot( model=ross_model, X=ross_data[ross_features], feature='SchoolHoliday', feature_name='SchoolHoliday' )


TypeError Traceback (most recent call last) in 1 fig, axes, summary_df = info_plots.actual_plot( ----> 2 model=ross_model, X=ross_data[ross_features], feature='SchoolHoliday', feature_name='SchoolHoliday' 3 )

~/Envs/ml3_t2/lib/python3.6/site-packages/pdpbox/info_plots.py in actual_plot(model, X, feature, feature_name, num_grid_points, grid_type, percentile_range, grid_range, cust_grid_points, show_percentile, show_outliers, endpoint, which_classes, predict_kwds, ncols, figsize, plot_params) 289 # make predictions 290 # info_df only contains feature value and actual predictions --> 291 prediction = predict(X, **predict_kwds) 292 info_df = X[_make_list(feature)] 293 actual_prediction_columns = ['actual_prediction']

TypeError: predict() argument after ** must be a mapping, not NoneType

quweining518 avatar Sep 15 '20 02:09 quweining518

I'm facing a very similar issue but giving me:

TypeError: predict_proba() argument after ** must be a mapping, not NoneType

konradsemsch avatar Oct 01 '20 13:10 konradsemsch