--

I tried his other solution code without constant and got the same result.

corr_mat = np.array(X_train.corr())

inv_corr_mat = np.linalg.inv(corr_mat)

pd.Series(np.diag(inv_corr_mat), index=X_train.columns)

--

--

Gustavo R Santos
Gustavo R Santos

Written by Gustavo R Santos

Data Scientist | I solve business challenges through the power of data. | Visit my site: https://gustavorsantos.me

No responses yet