generalizedPCA icon indicating copy to clipboard operation
generalizedPCA copied to clipboard

Deviance doesn't monotonically decrease for gaussian with missing data

Open andland opened this issue 10 years ago • 2 comments

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 avatar Mar 17 '15 15:03 andland

It seems to be okay with k >= 2

andland avatar Mar 17 '15 15:03 andland

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

andland avatar Mar 17 '15 15:03 andland