상관 행렬 시각화하기
ansur_df의 상관 행렬을 숫자 그대로 읽어서는 전체적인 흐름을 빠르게 파악하기 어렵습니다.
중복 값을 제거하고 seaborn으로 행렬을 시각화해 개선해 봅시다.
Seaborn은 sns, matplotlib.pyplot은 plt, NumPy는 np, pandas는 pd로 미리 불러와져 있습니다.
이 연습은 강의의 일부입니다
Python으로 배우는 차원 축소
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Create the correlation matrix
corr = ansur_df.____
# Draw a heatmap of the correlation matrix
sns.____(____, cmap=cmap, center=0, linewidths=1, annot=True, fmt=".2f")
plt.show()