Skip to content

Implementation of incremental weighted mean and variance for dense case #18573

Closed
@glemaitre

Description

@glemaitre

#18447 introduce an implementation of the incremental weighted mean and variance.
Previously, we already had an implementation that was not supporting sample_weight.

Looking at the code, they just are 2 different implementations but I am almost sure that the initial code that we have could be adapted and accept sample_weight (i.e. basically replace the count by frequencies). Unweighted mean and variance will be then equivalent to pass unit sample weights.

I think that for maintainability, it would be best to stick to a single implementation.
If I am not wrong, the same method (Chan et al.) is actually implemented in Cython for the sparse matrix.

ping @jnothman @rth @albertvillanova who were involved in #18447

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