Open hjkkkl opened 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)
print('Mean squared error:', mean_squared_error(y_test, y_hat_test))
from sklearn.preprocessing import StandarScaler scaler = StandarScaler() #표준화 스케일러 생성 s_X = scaler.fit_transform(X) # 표준화 스케일러 적용
plt.hist(s_X, bind=5) # 표준화 결과의 가시화