重回帰分析をやっていると、多重共線性(マルチコ)ので変数選択が必要になりますが、評価指標として分散拡大係数:Variance Inflation Factorというものがあるそうで。 numpyで直接計算する。 corr_mat = np.array(df.corr()) inv_corr_mat = np.linalg.inv(corr_mat) pd.Series(np.diag(inv_corr_mat), index=df.columns) statsmodelsを使う。 import statsmodels.api as sm xx = df.drop('目的変数',axis=1) …