correlation(2)
-
[Visualization]Correlation Matrix
import matplotlib.pyplot as plt import numpy as np import seaborn as sns import matplotlib.font_manager as fm def correlation_matrix(df, title='', num_size=15, font_scale=2): sns.set(font_scale=font_scale) fm.get_fontconfig_fonts() font_location = 'C:\Windows\Fonts\KoPubWorld Dotum Medium.ttf' # font location font_name = fm.FontProperties(fname=font_location).get_name() plt.rc('font', family=fon..
2021.08.18 -
Visualization | Correlation Matrix(상관 행렬)
seaborn의 iris 데이터를 이용하기 위해서 다음의 코드를 입력하자. data 객체에 iris 데이터를 할당해주자. import seaborn as sns data = sns.load_dataset('iris') 더 많은 데이터는 github.com/mwaskom/seaborn-data에서 찾아볼 수 있다. >>> data import pandas as pd import matplotlib.pyplot as plt import matplotlib.font_manager as fm fm.get_fontconfig_fonts() font_location = 'C:\Windows\Fonts\Cambria.ttc' # 폰트 경로 font_name = fm.FontProperties(fname=font_lo..
2020.12.23