-
Notifications
You must be signed in to change notification settings - Fork 15
Include PCA transform #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/transforms/pca.jl
Outdated
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
src/transforms/pca.jl
Outdated
𝒯 = (; zip(names, eachcol(Y))...) | ||
newtable = 𝒯 |> Tables.materializer(table) | ||
|
||
newtable, inv(V) |
There was a problem hiding this comment.
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.
There was a problem hiding this 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! 👏🏽
Try to add PCA transform