[Python]프리렉빅분기.p296


[Python]프리렉빅분기.p296

##20230106------------- #1.학습데이터의 결정 계수 구하기 #2.테스트 데이터의 결정계수 구하기 #3.테스트 데이터의 mse구하기 #4.테스트 데이터의 rmse구하기 #5.테스트 데이터의 mae구하기 print("error______") print(r2_score(y_train, y_train_pred)) print(r2_score(y_test, y_test_pred)) print(mean_squared_error(y_test,y_test_pred)) print(np.sqrt(mean_squared_error(y_test,y_test_pred))) print(mean_absolute_error(y_test,y_test_pred)) #랜덤포레스트 회귀 #sklearn,ensemble,randomforestregressor #model만들기 #모델에 train data 넣기 #ytrain 예측 #ytest 예측 from sklearn.ensemble import Ra...



원문링크 : [Python]프리렉빅분기.p296