Skip to content
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

solve unecessary use of inv function #12

Merged
merged 2 commits into from
Nov 1, 2021
Merged

Conversation

mrr00b00t
Copy link
Contributor

Try to fix #10.
All tests passing locally (not considering that image test that passes/don't aleatory)

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.

Lacking consistency.

S = V * inv(Λ)
S, inv(S)
λₛ = sqrt.(λ)
Λᵢ = Diagonal(1 ./ λₛ)
Copy link
Member

Choose a reason for hiding this comment

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

Be consistent. In other parts of the code you use ^-1 to represent inverse matrices, and here you use i.

S, inv(S)
λₛ = sqrt.(λ)
Λᵢ = Diagonal(1 ./ λₛ)
Λₛ = Diagonal(λₛ)
Copy link
Member

Choose a reason for hiding this comment

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

Can we just use \Lambda = Diagonal(sqrt.(\lambda)) and the corresponding inverse?

@juliohm juliohm merged commit 4393499 into master Nov 1, 2021
@juliohm juliohm deleted the avoid-unecessary-inv branch November 1, 2021 13:19
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.

Avoid inverting matrices in EigenAnalysis
2 participants