Closed ahmadsalim closed 5 years ago
This happens because your observed values are null. See Controlling how inference is performed.
@tminka Thank you for responding.
I am providing the constant testData
to the observed values, which is defined as a constant in Main
and all values there are non-null. (I also tested the values under the debugger).
The priors are also initialized correctly as far as I understand, so I am not sure where null
is coming from.
My mistake. The null happens because you didn't run inference, as explained on the page I linked.
Right, sorry. I changed from Infer
to GetCompiledInferenceAlgorithm
before I posted the code and forgot. When running the inference with VMP, I now get:
Exception thrown: 'Microsoft.ML.Probabilistic.Math.PositiveDefiniteMatrixException' in Microsoft.ML.Probabilistic.dll
An unhandled exception of type 'Microsoft.ML.Probabilistic.Math.PositiveDefiniteMatrixException' occurred in Microsoft.ML.Probabilistic.dll
The matrix is not positive definite.
This is despite changing the covariance matrix to be scaled up or down (several orders of magnitude). Any idea, why that happens?
Thanks again
Doubling the shape of priorCov seems to work.
Awesome, thanks!
Unfortunately, when I look at the code for Softmax, it is not meant to work when the output is directly observed (as is the case for many factors under VMP). The code should be throwing an exception here. I will fix that. Meanwhile, you shouldn't trust the output of this program.
Hi!
I am trying to model observed softmax data using Infer.Net and I get an error no matter which algorithm I use. I have a more complicated model myself, but I have tried to reduce the issue to a simplified Gaussian-softmax example model below:
The errors I get for each individual algorithm are as follows. For expectation propagation and Gibbs sampling, I get that the model is unsupported because of
MMath.Softmax
. E.g., the exception for Gibbs sampling:For VMP, the model succesfully compiles, but I get a null-pointer exception:
Any idea of whether I am misspecifying something here, or there is a workaround to solve the issue?
Thank you very much in advance!