Skip to content

"grid_resolution" setting of function "partial_dependence" #5810

Closed
@genliu777

Description

@genliu777

when i run the project on the webpage: http://scikit-learn.org/stable/auto_examples/ensemble/plot_partial_dependence.html#example-ensemble-plot-partial-dependence-py

i try to change the value of 'grid_resolution', which is the parameter of function 'partial_dependence()',

i find and can not understand the following situation:

the original value of grid_resolution is 50, when changed to values less than 50, then, the shape of x_axis and y_axis are both (50, 50). the project works well,

but do not work while bigger than 50. for example, grid_resolution = 100, the x_axis.shape = (52, ), y_axis = (100, ), and pdp.shape = (1, 5200). it directly cause the value of XX, YY not equal to each other, and the leads to the error"ValueError: shape mismatch: objects cannot be broadcast to a single shape".

why can not set tgrid_resolution to any value( > 0) as i want???
thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions