segunda-feira, 12 de março de 2012 13:59Hi,
I'm not sure whether to open a new thread or not for this topic. Anyway, ...
For a multivariate Guassian distribution, I would like to have diagonal or spherical covariance matrix (constrained Positive Definite Matrix). How can I specify this in Infer.NET? For full covariance, I'm aware that I have to specify:
But what about for diagonal or spherical case? For spherical case, since there is only one parameter for covariance matrix (identity matrix times constant: independent of the dimension) I'd like to do something like:
But I think that there is no such built-in conditional distribution.
Any help would be appreciated.
Todas as Respostas
terça-feira, 13 de março de 2012 14:04
The model you are talking about is equivalent to generating each element of a data vector separately, i.e.
data[n][k] = Variable.GaussianFromMeanAndPrecision(mean[z[n]][k], prec[z[n]][k])
To do this, define (data, mean, prec) as jagged arrays instead of arrays of vectors.
- Marcado como Resposta Kyaw Kyaw Htike quinta-feira, 15 de março de 2012 09:36
quarta-feira, 14 de março de 2012 23:06
Thanks! I've just tried your suggestion and it works well. I was just wondering which is better (in terms of being more efficient, faster, etc for large datasets) when defining data, mean and prec (my dataset has fixed dimension for each data point):
rectangular array, i.e. VariableArray2D ()
jagged array, i.e. VariableArray<VariableArray<double>, double>
quinta-feira, 15 de março de 2012 09:21Jagged arrays will be the most efficient since we've put the most effort into optimizing them. 2D arrays are less common so we haven't optimized them as much.