infer
infer copied to clipboard
MultinomialRegression example throw exception, not supported with ExpectationPropagation due to MMath.Softmax
I am not able to reproduce this. When I try, it says "This example only runs with Variational Message Passing". Try editing RunMe.cs so that it doesn't run the ExampleBrowser but calls new MultinomialRegression().Run();
directly. Then you can step through with a debugger and find out why the 'if' is not taken.
` I add one line to set the algorithm:
// This example requires VMP
InferenceEngine engine = new InferenceEngine();
//-----------START: I add this line to pass the Algorithm checking ----
engine.Algorithm = new VariationalMessagePassing();
//-----------END: I add this line to pass the Algorithm checking ----
if (!(engine.Algorithm is Algorithms.VariationalMessagePassing))
{
Console.WriteLine("This example only runs with Variational Message Passing");
return;
}`
If you change the algorithm in the browser, it will work correctly. It sounds like your issue is: "The code that I expected would change the algorithm does not work."