Skip to content

Conversation

mrr00b00t
Copy link
Contributor

Try to add PCA transform


The PCA transform returns a table with covariance matrix
having the properties: cov(Xᵢ, Xⱼ) = 0, for i != j, and
0 ≤ cov(Xᵢ, Xᵢ) ≤ 1, for i == j.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it doesn't force the diagonal to be in [0,1]:

image

We can just say something like: The PCA transform returns a table with uncorrelated variables.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PCA is just a rotation, it doesn't shrink the axes of the ellipsoid. The SDS and SDR do shrink the axes (i.e. diagonal of covariance).

Copy link
Contributor Author

@mrr00b00t mrr00b00t Oct 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, I'll update the description in a minute

𝒯 = (; zip(names, eachcol(Y))...)
newtable = 𝒯 |> Tables.materializer(table)

newtable, inv(V)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the size of V? Shouldn't we return the transpose(V) instead? Inverses are much more expensive to compute in general.

Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an amazing PR! 👏🏽

@mrr00b00t mrr00b00t requested a review from juliohm October 27, 2021 20:32
@juliohm juliohm merged commit 8837023 into master Oct 27, 2021
@juliohm juliohm deleted the add-pca-transform branch October 27, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants