I need to normalize data that I have to be between -1 and 1.
I used StandardScaler, but the range got larger.
What other sklearn library could I use? There are several in sklearn, but I could not, it should make life easier, but I do not think I know how to use it.
What I tried was:
df = pd.read_fwf('traco_treino.txt', header=None)
plt.plot(df)
Datainrange-4and4
Afterattemptingtonormalize:
fromsklearn.preprocessingimportStandardScalerscaler=StandardScaler()scaler.fit(df)dftrans=scaler.transform(df)plt.plot(dftrans)
The data is between -10 and 10.