実はこの厄介な問題、前回までに学んできた**PCA(主成分分析)**で解決できるんです。 最終回の今回は、PCAを回帰分析に応用する主成分回帰(PCR: Principal Component Regression)という手法を、Pythonで手を動かしながら学んでいきましょう!
以下の3回で、PCAの仕組みを一から説明しました。 NumPyで手計算した経験があるからこそ、ライブラリが「裏で何をしているか」がわかります。 今回は、scikit-learnを使って、PCAを効率的に実行する方法を学びましょう。 手計算で何十行も書いていたコードが ...
angle = atan2(p[1] - q[1], p[0] - q[0]) # angle in radians hypotenuse = sqrt((p[1] - q[1]) * (p[1] - q[1]) + (p[0] - q[0]) * (p[0] - q[0])) # Here we lengthen the ...
Multivariate data analysis (MVDA) exploration tool is a Python library utilizing the scikit-learn library for partial least squares (PLS), principal components analysis (PCA), and non-negative matrix ...