모델 성능 평가
어떤 접근이 더 좋은지—전체 데이터셋으로 만든 모델과 주택 연령대별 모델—를 확인하려면 지표를 계산해야 해요. 여기서는 각 모델의 결정 계수와 잔차 표준 오차를 비교하겠습니다.
편의점 수에 따른 가격의 네 가지 모델(mdl_all_ages, mdl_0_to_15, mdl_15_to_30, mdl_30_to_45)이 준비되어 있고, dplyr과 broom이 로드되어 있어요.
이 연습은 강의의 일부입니다
R 중급 회귀
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Get the coeff. of determination for mdl_all_ages
___
# Get the coeff. of determination for mdl_0_to_15
___
# Get the coeff. of determination for mdl_15_to_30
___
# Get the coeff. of determination for mdl_30_to_45
___