require(lolR)
require(tidyverse)
require(ggplot2)
sim.results <- readRDS('./flashx_sims.rds')

Stacked Cigars

Simulation

dat <- sim.results$cig$sim
data.frame(x1=dat$X[,1], x2=dat$X[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Stacked Cigars") +
    theme_bw()

PCA

res <- sim.results$cig$pca
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Stacked Cigars -- PCA") +
    theme_bw()

LOL

res <- sim.results$cig$lol
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Stacked Cigars -- LOL") +
    theme_bw()

LRLDA

res <- sim.results$cig$lrlda
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Stacked Cigars -- LRLDA") +
    theme_bw()

CCA

res <- sim.results$cig$cca
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Stacked Cigars -- CCA") +
    theme_bw()

RP

res <- sim.results$cig$rp
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Stacked Cigars -- RP") +
    theme_bw()

Horizontal Cigars

Simulation

dat <- sim.results$hcig$sim
data.frame(x1=dat$X[,1], x2=dat$X[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Horizontal Cigars") +
    theme_bw()

PCA

res <- sim.results$hcig$pca
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Horizontal Cigars -- PCA") +
    theme_bw()

LOL

res <- sim.results$hcig$lol
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Horizontal Cigars -- LOL") +
    theme_bw()

LRLDA

res <- sim.results$hcig$lrlda
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Horizontal Cigars -- LRLDA") +
    theme_bw()

CCA

res <- sim.results$hcig$cca
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Horizontal Cigars -- CCA") +
    theme_bw()

RP

res <- sim.results$hcig$rp
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Horizontal Cigars -- RP") +
    theme_bw()

Low-Rank Case

Simulation

dat <- sim.results$lowrank$sim
data.frame(x1=dat$X[,1], x2=dat$X[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Low Rank") +
    theme_bw()

PCA

res <- sim.results$lowrank$pca
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Low Rank -- PCA") +
    theme_bw()

LOL

res <- sim.results$lowrank$lol
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Low Rank -- LOL") +
    theme_bw()

LRLDA

res <- sim.results$lowrank$lrlda
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Low Rank -- LRLDA") +
    theme_bw()

CCA

res <- sim.results$lowrank$cca
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Low Rank -- CCA") +
    theme_bw()

RP

res <- sim.results$lowrank$rp
data.frame(x1=res$Xr[,1], x2=res$Xr[,2], y=dat$Y) %>%
  ggplot(aes(x=x1, y=x2, color=as.factor(y))) +
    geom_point() +
    ggtitle("Low Rank -- RP") +
    theme_bw()


neurodata/fselect documentation built on March 6, 2021, 12:54 p.m.