Skip to content

expand_2r #14

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

expand_2r #14

wants to merge 1 commit into from

Conversation

youdongguo
Copy link
Member

No description provided.

@youdongguo
Copy link
Member Author

Exand 2r for GSVD, might not need to be merged, just for review and discuss some new variants.

@youdongguo youdongguo requested a review from timholy April 24, 2025 21:54
Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

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

This seems reasonable. I assume it's just a start, since it's not connected to anything else?

@@ -117,7 +117,7 @@ function gsvdrecover(X::AbstractArray, W0::AbstractArray, H0::AbstractArray, kad
U0, S0, V0 = f
U0, S0, V0 = U0[:,1:n], S0[1:n], V0[:,1:n]
Hadd, Λ = init_H(U0, S0, V0, W0, H0, kadd)
Wadd, a = init_W(X, W0, H0, Hadd)
Wadd, a = init_W(X, W0, H0, Hadd)
Copy link
Member

Choose a reason for hiding this comment

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

trailing whitespace. You can set vscode to delete it automatically: https://www.codexcafe.com/blog/remove-trailing-whitespace/

# @show cs
W0_2, H0_2 = repeat(cs', m, 1).*W0_1, H0_1
# W0_2, H0_2 = W0_1, H0_1
return abs.(W0_2), abs.(H0_2), Λ
Copy link
Member

Choose a reason for hiding this comment

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

Why is the abs needed? If it has tiny negative values, would max.(0, W0_2) be more appropriate? abs nominally runs the risk of turning a large negative number positive.

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