진단 플롯 그리기
이제 Taiwan 부동산 데이터셋과, 편의점 수에 따른 주택 가격 모델을 사용해 직접 진단 플롯을 그려 보겠습니다.
taiwan_real_estate는 pandas DataFrame으로 준비되어 있고 mdl_price_vs_conv도 제공됩니다.
이 연습은 강의의 일부입니다
Python에서 statsmodels로 살펴보는 회귀 소개
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Plot the residuals vs. fitted values
sns.____(x=____, y=____, data=taiwan_real_estate, ____)
plt.xlabel("Fitted values")
plt.ylabel("Residuals")
# Show the plot
plt.show()