New StandardisationFilter #245
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This filter is to standardise instances in a stream.
Fixed the previous algorithm to correct, add two more Welford's online and Two-pass.
Z-SCORE is used to standardise the values of a normal distribution.
For more information: https://en.wikipedia.org/wiki/Standard_score. The formula is:
z=(z-μ)/σ
μ is the mean of the population.
σ is the standard deviation of the population, as the square root of variance.
There are three algorithms for calculating variance.
For more information: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Computing_shifted_data
Naive algorithm
Welford's online algorithm
Two-pass algorithm
You can check the standard deviation results to compare the accuracy in the Outputs.xlsx. In the Output4 sheet, there are multiple colums caculated by different algorithms.
Outputs.xlsx