We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The higher dimensions of LMDS have a higher scale in comparison to MDS and PCA. Determine whether this is a problem and whether it needs to be solved.
library(tidyverse) library(dyno) data("fibroblast_reprogramming_treutlein") expr <- fibroblast_reprogramming_treutlein$expression rownames(expr) <- colnames(expr) <- NULL pca <- prcomp(expr, rank. = 40)$x %>% dynutils::scale_uniform() pheatmap::pheatmap(pca, border_color = NA, cluster_cols = FALSE) mds <- cmdscale(dynutils::calculate_distance(expr, method = "spearman"), k = 40) %>% dynutils::scale_uniform() pheatmap::pheatmap(mds, border_color = NA, cluster_cols = FALSE) lmds <- lmds::lmds(expr, distance_method = "spearman", ndim = 40, num_landmarks = 100) %>% dynutils::scale_uniform() pheatmap::pheatmap(lmds, border_color = NA, cluster_cols = FALSE) colnames(pca) <- colnames(mds) <- colnames(lmds) <- NULL df <- bind_rows( pca %>% reshape2::melt(varnames = c("row", "comp")) %>% mutate(dimred = "PCA"), mds %>% reshape2::melt(varnames = c("row", "comp")) %>% mutate(dimred = "MDS"), lmds %>% reshape2::melt(varnames = c("row", "comp")) %>% mutate(dimred = "LMDS") ) ggplot(df) + geom_point(aes(comp, value, colour = dimred)) + facet_wrap(~dimred) + theme_bw() ggsave("~/plot.png", width = 12, height = 4)
The text was updated successfully, but these errors were encountered:
By setting the number of landmarks to Inf, this effect is already greatly reduced (as can be expected, maybe), but not entirely:
Sorry, something went wrong.
No branches or pull requests
The higher dimensions of LMDS have a higher scale in comparison to MDS and PCA. Determine whether this is a problem and whether it needs to be solved.
Example code
The text was updated successfully, but these errors were encountered: