hjkkkl / machine-learning

0 stars 0 forks source link

127p #16

Open hjkkkl opened 6 hours ago

hjkkkl commented 6 hours ago

from sklearn.preprocessing import StandarScaler scaler = StandarScaler() #표준화 스케일러 생성 s_X = scaler.fit_transform(X) # 표준화 스케일러 적용

plt.hist(s_X, bind=5) # 표준화 결과의 가시화

hjkkkl commented 6 hours ago

y_hat_train = lin_model.predict(sXtrain) y_hat_test= lin_model.predict(sXtest)

plt.scatter(y_train, y_hat_train color='r') plt.scatter(y_test, y_hat_test color='b') plt.plot(xy_range, xy_range)

hjkkkl commented 6 hours ago

print('Mean squared error:', mean_squared_error(y_test, y_hat_test))

hjkkkl commented 6 hours ago

KakaoTalk_20241002_102757297_02