Skip to content
New issue

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

Pb in the dimension of S for spherical model #79

Closed
scj-robin opened this issue Mar 22, 2021 · 4 comments
Closed

Pb in the dimension of S for spherical model #79

scj-robin opened this issue Mar 22, 2021 · 4 comments

Comments

@scj-robin
Copy link

It seems that the matrix S returned by PLN has only one column for spherical covariance:

load('BarentsFish.Rdata')
fit <- PLN(count ~ 1, data=Data, control=list(covariance='spherical'))
dim(fit$var_par$S)
fit <- PLN(count ~ 1, data=Data, control=list(covariance='diagonal'))
dim(fit$var_par$S)

@jchiquet
Copy link
Member

jchiquet commented Mar 22, 2021

Indeed, since the spherical model has just one parameter to describe the covariance matrix, the variational distribution used in different from the diagonal and fully parametrized models: for individual i, we use q(z_i) ~ N(m_i, s_i I_p) where m_i is a vector in R^p (the p variables) and s_i a scalar (we do not need p variational parameters to estimate a single model parameter right?).

So a matrix S with size n x 1 is expected for this model.

@scj-robin
Copy link
Author

I thought that spherical was referring to Sigma. Does it imply that all S_i are spherical as well?

@jchiquet
Copy link
Member

jchiquet commented Mar 22, 2021

Indeed, spherical refers to Sigma. I don't now if it necessarily implies that the variational distribution is spherical too. It is just that it sounded better this way, and more computationally efficient (the common rule being one model parameters = one variational parameters per sample).

@jchiquet
Copy link
Member

@scj-robin We now use the same variational distribution to approximate any type of covariance structure (spherical, diagonal, full) for consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants