-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
sklearn.preprocessing.MinMaxScaler not preserving symmetry / Add axis=None #4892
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
Comments
# A more simple example:
array([[ 1., 2.],
[ 2., 10.]])
# will be transformed in:
array([[ 0., 0.],
[ 1., 1.]]) This is not a bug.
|
Perhaps we should consider supporting |
Is there a common-enough use-case to add In a pinch, the same result can be had by using |
Thanks for the answers and my apologies. |
ravel and reshape is not a pretty operation to achieve in a pipeline! On 26 June 2015 at 02:10, Alessio Bazzica [email protected] wrote:
|
Is this for a pairwise distance? Preprocessors apart from the KernelCenterer are not really supposed to be used on that. |
Is there a reason not to support axis=None, @amueller (except in sparse On 2 July 2015 at 06:57, Andreas Mueller [email protected] wrote:
|
No, I think it would actually be cool. |
I can work on this, but it appears that none of the Scalers accept an "axis" argument. All of them operate only on single features independent of the other features. Should I add an "axis" argument to all of them, accepting inputs of [0, ..., ndim-1] or None (defaulting to 0)? |
ndim is always 2. I thought we had an axis in the scalers but it seems that is only for the function interface. Which I feel is slightly odd. |
I once tried introducing an |
we could add the additional axis=None to the function interface? not sure though. |
Not sure how it affects the original issue in this thread (e.g. if the application scenario involves fitting a scaler on a training set and applying it on the test data or not) |
I think that it's useful to allow the "axis=None" option, but that might not be the best option name. What if the Scalers took an option "grouped=False"? |
@amueller I do not see a use case for |
Apart from numerical reasons, I don't see any usecase either to scaling all the features in the same way. I would be surprised if some estimators behaved differently depending on the global scale of features. -1 as well |
With the comments: #4963 (comment), #4892 (comment), #4892 (comment), I do not think we will include this feature. |
MinMaxScaler does not preserve symmetry.
scikit-learn (0.15.2) and scikit-learn (0.16.1)
Windows 7 SP 1 64 bit
Python 2.7.9 32 bit
An affected numpy matrix and the script to reproduce the problem are available at: https://www.dropbox.com/s/vkcuq71wa69jrw7/sklearn-bug.tar?dl=0
The text was updated successfully, but these errors were encountered: