Scaler File 저장, 내보내기
sc_X = StandardScaler()
normed_train_data = sc_X.fit_transform(train_data)
normed_train_data = pd.DataFrame(normed_train_data, dtype = float)
normed_test_data = sc_X.transform(test_data)
# Save Scaler
joblib.dump(sc_X, os.getcwd() + "\\Model_Scalar.pkl")
Model File 저장, 내보내기
save_model(best_model, "Prediction_Model.h5")
Model File 불러오기
model = load_model(os.getcwd() + "\\Trained_Model\\Prediction_Model.h5")
model
Scaler File 불러오기
sc_X = pd.read_pickle(os.getcwd() + "\\Model_Scalar.pkl")
sc_X
Scaler File 활성화
sc_X = StandardScaler()
sc_X.fit(test_data)
normed_X_train = sc_X.fit_transform(test_data)
normed_X_train = pd.DataFrame(normed_X_train, dtype = float)
normed_X_test = sc_X.transform(test_data)
'둘 > [ Machine Learning ]' 카테고리의 다른 글
Keras model.summary() result - Understanding the # of Parameters (0) | 2023.05.08 |
---|---|
[Reinforcement Learning] The Limits of Dynamic Programming (0) | 2022.01.16 |
[Reinforcement Learning] RL open source sharing sites (0) | 2022.01.13 |
[ANACONDA] Anaconda 실행이 갑자기 안될 때 (1) | 2021.07.05 |
[GAN] GAN: Generative Adversarial Nets (0) | 2021.02.03 |