8000 partial_dependence should respect sample weights · Issue #24872 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
partial_dependence should respect sample weights #24872
Closed
@mayer79

Description

@mayer79

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0