Imports ..

Functions

Problem

The 'alphas' are [1,2,3]

PCA Using all 3 Columns of input

Scale the outs

Compute the input column means

These are required to get the alphas back into real space

Solve for Alphas

Make sure $R^2$ is good ..

Get the Alphas into Real Space

We got the actual answers back from out toy problem !!!

Not sure why we had to scale it by 5.47725...

That's why! That appears to be the output scaling !!

PCA Using Subset of Columns (2 instead of 3 in toy problem)

Scale the outs

Compute the input column means

These are required to get the alphas back into real space

Solve for Alphas

Make sure $R^2$ is good ..

Get the Alphas into Real Space

Didn't work with reduced columns ... even though $R^2$ was excellent on the fitted alphas and the cumulative variance was excellent for two columns with the PCA.