๋ชจ๋ธ๋ง ๋ฐ ์ฑ๋ฅํ๊ฐ
1. ๋ถ๋ฅ : RandomForestClassifier
Accuracy
auc : roc ์ปค๋ธ ์๋์ชฝ ๋ฉด์ ์ ๋ปํจ, 1์ ๊ฐ๊น์ธ์๋ก ์ฑ๋ฅ์ด ์ข์
f1 : ํด์๋ก ์ฑ๋ฅ์ด ์ข์
from sklearn.metrics import accuracy_score, f1_score, roc_auc_score, recall_score, precision_score
# (์ค์ ๊ฐ, ์์ธก๊ฐ)
# ๋ค์ค๋ถ๋ฅ์ผ ๊ฒฝ์ฐ f1 = f1_score(y_val, y_pred, average = 'macro')
auc = roc_auc_score(y_val, y_pred)
acc = accuracy_score(y_val, y_pred)
f1 = f1_score(y_val, y_pred)
2. ํ๊ท : RandomForestRegressor
R2(๊ฒฐ์ ๊ณ์) : ๊ฐ์ด ํด์๋ก ์ฑ๋ฅ์ด ์ข์
MSE: ๊ฐ์ด ๋ฎ์์๋ก ์ฑ๋ฅ์ด ์ข์
RMSE : mse์ ๋ฃจํธ๋ฅผ ์์ด ๊ฐ
from sklearn.metrics import mean_squared_error, r2_score
mse = mean_squared_error(y_val, y_pred)
r2 = r2_score(y_val, y_pred)