Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale singleton vectors to [0] #89

Open
bencottier opened this issue May 11, 2021 · 0 comments · May be fixed by #90
Open

Scale singleton vectors to [0] #89

bencottier opened this issue May 11, 2021 · 0 comments · May be fixed by #90

Comments

@bencottier
Copy link
Contributor

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 bencottier linked a pull request May 11, 2021 that will close this issue
@bencottier bencottier changed the title MeanStdScaling std should be 0 for singleton vectors Scale singleton vectors to [0] May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant