There is data (da_all) stored in the csv file in column 12*30 and when I tried to normalize it with a program like the one below (excerpt where there might be a problem), it was normalized on a row-by-row.I'm having trouble reading all the data and making it a maximum value of 1, a minimum value of 0.Thank you for your cooperation.
from sklearn import preprocessing
import pickle
from sklearn.preprocessing import MinMaxScaler
scaler=preprocessing.MinMaxScaler([0,1])
scaler.fit(da_all)
data_del_mms = scaler.transform(da_all)
import numpy as np
from sklearn import preprocessing
data=np.random.randint(0,10,size=(3,10))
print(data)
# array([3,1,6,0,4,2,9,5,2,8],
# [2, 8, 0, 6, 5, 0, 2, 9, 2, 6],
# [4, 7, 2, 5, 9, 5, 4, 4, 8, 6]])
data=np.ravel(data) [None,:].T
scaler=preprocessing.MinMaxScaler()
scaler.fit(data)
data=scaler.transform(data)
data=data.T.reshape(3,10)
print(data)
# array([0.33333333, 0.111111, 0.66666667, 0.4444444,
# 0.22222222, 1. , 0.55555556, 0.22222222, 0.88888889],
# [0.22222222, 0.88888889, 0. , 0.66666667, 0.55555556,
# 0. , 0.22222222, 1. , 0.22222222, 0.66666667],
# [0.44444444, 0.77777778, 0.22222222, 0.55555556, 1. ,
# 0.55555556, 0.44444444, 0.44444444, 0.88888889, 0.66666667]])
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
922 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
578 Understanding How to Configure Google API Key
584 PHP ssh2_scp_send fails to send files as intended
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.