FeatureTransforms.jl icon indicating copy to clipboard operation
FeatureTransforms.jl copied to clipboard

Scale singleton vectors to [0]

Open bencottier opened this issue 4 years ago • 0 comments

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].

bencottier avatar May 11 '21 15:05 bencottier