andland / generalizedPCA

Dimensionality reduction for exponential family data by extending PCA
Other
23 stars 2 forks source link

Deviance doesn't monotonically decrease for gaussian with missing data #8

Open andland opened 9 years ago

andland commented 9 years ago
rows = 100
cols = 10
set.seed(1)
mat_np = outer(rnorm(rows), rnorm(cols))

mat = matrix(rpois(rows * cols, c(exp(mat_np))), rows, cols)

missing_mat = matrix(runif(rows * cols) <= 0.2, rows, cols)
count_mat_m = mat
is.na(count_mat_m[missing_mat]) <- TRUE

pca = generalizedPCA(count_mat_m, k = 1, M = 4, family = "gaussian")
plot(pca)
andland commented 9 years ago

It seems to be okay with k >= 2

andland commented 9 years ago

Also seems okay with main_effects = FALSE and k = 1. I'm pretty sure the main effects are the problem.