infer icon indicating copy to clipboard operation
infer copied to clipboard

MultinomialRegression example throw exception, not supported with ExpectationPropagation due to MMath.Softmax

Open pardont opened this issue 4 years ago • 3 comments

image

pardont avatar Jan 07 '21 11:01 pardont

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.

tminka avatar Jan 07 '21 13:01 tminka

` 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;
        }`

pardont avatar Jan 08 '21 02:01 pardont

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."

tminka avatar Jan 08 '21 08:01 tminka