change scaling to normalization

This commit is contained in:
jakubknczny 2021-03-22 00:36:52 +01:00
parent 3826df90c0
commit 81eeccb395
2 changed files with 383 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,8 @@ from sklearn.model_selection import train_test_split
df = pd.read_csv('smart_grid_stability_augmented.csv')
min_max_scaler = preprocessing.MinMaxScaler()
df_norm_array = min_max_scaler.fit_transform(df.iloc[:, 0:-1])
scaler = preprocessing.StandardScaler().fit(df.iloc[:, 0:-1])
df_norm_array = scaler.transform(df.iloc[:, 0:-1])
df_norm = pd.DataFrame(data=df_norm_array,
columns=df.columns[:-1])
df_norm['stabf'] = df['stabf']