Conversation
Thank you for contributing to
|
TonyBagnall
left a comment
There was a problem hiding this comment.
Thanks for this, I agree its a useful thing to add in. I have one issue with the unequal-length normalisation: this calculates the standard deviation of the individual series' standard deviations, rather than the pooled standard deviation of all observations.
For example, if X = [np.array([[0, 2]]), np.array([[10, 12]])], both series have std 1, so the current calculation returns zero, whereas the pooled std is approximately 5.099.
Im not sure how this should work, but I think, given its global, a pooled mean and variance per channel would be right? Happy to discuss
…ay and time axis setting
|
Hello, thank you for taking the time to review my code. I took the opportunity to improve the generalisation of global scalers by adding an axis parameter, allowing to use the scaler on any numpy.array like :
To go further, the code is in reality, able to run on any NumPy array dimensionality. Even if it makes poor sense for time series, I found interesting to test my scalers with 1D numpy array and 4D NumPy array to check that they are able to generalise correctly. In theory, it could even be used with any higher dimensionality. From there, very weird scenarios with the following input shape could be imagined :
In short, it turns out to be useless but shows robustness and was fun to see that it works on unusual inputs. |
Reference Issues/PRs
#3792
What does this implement/fix? Explain your changes.
Implement global versions of Centerer, MinMaxScaler, and Normalizer :
Does your contribution introduce a new dependency? If yes, which one?
No
Any other comments?
PR checklist
For all contributions
For new estimators and functions
__maintainer__at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.For developers with write access