Closed
Description
Describe the workflow you want to enable
Currently, the inspect.partial_dependence funtions calculate arithmetic averages over predictions. For models fitted with sample weights, this is between suboptimal and wrong.
Describe your proposed solution
Add new argument "sample_weight = None". If vector of right length, replace arithmetic average of predictions by weighted averages.
Note that this does not affect the calculation of ICE curves, just the aggregate.
Describe alternatives you've considered, if relevant
No response
Additional context
No response