Skip to content

Scale singleton vectors to [0] #89

@bencottier

Description

@bencottier

Currently

julia> MeanStdScaling([1])
MeanStdScaling(1.0, NaN)

due to Statistics.std behaviour: corrected=true by default, which divides the sum of errors by N-1 instead of N, and N-1 is 0 for singletons.

It's an edge case, but could arise in feature engineering pipelines where the size of available data varies. I think for the purpose of feature engineering, a singleton vector should be standardized to [0] rather than [NaN].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions