from sklearn import preprocessing
I have a data which contain positive and negative values as given below :
(Here is the csv file of the data https://drive.google.com/file/d/1-Kc3vGDazAPQ_4I7wVvG6VI9Bd9b4uCW/view?usp=sharing)
ext is: | Index | Values | | -------- | -------------- | | 1 | -5.473753 | | 2 | 54.730399 | | 3 | 0.389353 | | 4 | -4.156109 | | 5 | 65.108997 | | ... | ......... | | 733 | 14.082214 | | 734 | 107.248120 | | 735 | 54.730399 |
I am trying to use MinMaxScaler as given below:
min_max_scaler = preprocessing.MinMaxScaler()
test_scaled = min_max_scaler.fit_transform(ext)
predictions_rescaled=min_max_scaler.inverse_transform(test_scaled)
predictions_rescaled should be same as ext, because i am scaling it and then rescaling it, but surprisingly both are different. Can anyone guide me where i am making mistake in scaling-rescaling process.