Created
September 16, 2025 21:32
-
-
Save alexpghayes/e7e9cc5188cc057889d818fb6bcce861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(fastRG) | |
| library(ggplot2) | |
| library(vsp) | |
| set.seed(29) | |
| k <- 3 | |
| n <- 1000 | |
| B <- matrix(0.1, nrow = k, ncol = k) | |
| diag(B) <- 0.8 | |
| sum(diag(B)) / (sum(B) - sum(diag(B))) | |
| A <- dcsbm( | |
| theta = runif(n) + 1, | |
| k = k, | |
| B = B, | |
| expected_degree = 50 | |
| ) |> | |
| sample_sparse() | |
| fa_oracle <- vsp(A, rank = k, degree_normalize = FALSE) | |
| plot_varimax_y_pairs(fa_oracle) + | |
| labs( | |
| title = "Optimal/lowest entropy rotation in correct dimension", | |
| subtitle = "Three block dc-sbm embedded into three dimensions" | |
| ) | |
| fa_k_low <- vsp(A, rank = 2, degree_normalize = FALSE) | |
| plot_varimax_y_pairs(fa_k_low) + | |
| labs( | |
| title = "Points show up 'off axes' when embedding dimension is too low", | |
| subtitle = "Three block dc-sbm embedded into two dimensions" | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment