From the course: Machine Learning with Data Reduction in Excel, R, and Power BI

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Solving for principal components axes

Solving for principal components axes

- [Instructor] Once we solve for PC1 in the PCA model, it's a bit less work to solve for PC2. The slope of PC2 is orthogonal to the line for PC1. Because we already calculated the slope for PC1, we can calculate the PC2 slope as -1 divided by the PC1 slope. We don't have to run solver again in Excel because we already determine the slope for PC1, and conversely, we determine the slope for PC2 when we calculated the orthogonal slope as the negative inverse of that PC1 slope. We do need to calculate the intercepts for the orthogonal line in PC2. And we'll do so using the same formula we used for PC1, except we want to refer to the slope instead of the orthogonal slope to solve for our intercept. We'll then fix our slope value. We can then calculate the values for the X and Y points that intersect the two lines in the same way we did for PC1. We'll use the formula divides the intercept we just calculated. We'll subtract…

Contents