locked
Exception of "Improper distribution during inference" in the example of "Difficulty versus ability" RRS feed

  • Question

  • Hi, 

    I'm using the "Difficulty versus ability" example in the Tutorials.  

    http://research.microsoft.com/en-us/um/cambridge/projects/infernet/docs/Difficulty%20versus%20ability.aspx

    It generates the following exception message on some datasets.

    (While on some other datasets, it can work correctly.)

    The exception message looks like this.

    ===================================================
    .MicrosoftResearch.Infer.Factors.ImproperMessageException: Improper distribution during inference (Gaussian(m/v=-0.02144, 1/v=0)).  Cannot perform inference on this model.
       at MicrosoftResearch.Infer.Factors.IsPositiveOp.XAverageConditional_Helper(Bernoulli isPositive, Gaussian x, Boolean forceProper) in c:\Builds\2\infernet\External\src\infernet\Runtime\Factors\IsPositive.cs:line 144
       at MicrosoftResearch.Infer.Factors.IsPositiveOp_Proper.XAverageConditional(Bernoulli isPositive, Gaussian x) in c:\Builds\2\infernet\External\src\infernet\Runtime\Factors\IsPositive.cs:line 447
       at MicrosoftResearch.Infer.Models.User.Model5_EP.Changed_numberOfIterationsDecreased_response(Int32 numberOfIterations) in ***********\AppData\Local\Temp\gpycjy1l.0.cs:line 622
       at MicrosoftResearch.Infer.Models.User.Model5_EP.Execute(Int32 numberOfIterations, Boolean initialise) in ***********\AppData\Local\Temp\gpycjy1l.0.cs:line 206
       at MicrosoftResearch.Infer.Models.User.Model5_EP.Execute(Int32 numberOfIterations) in ***********\AppData\Local\Temp\gpycjy1l.0.cs:line 215
       at MicrosoftResearch.Infer.InferenceEngine.Execute(IGeneratedAlgorithm ca) in c:\Builds\2\infernet\External\src\infernet\Compiler\Infer\InferenceEngine.cs:line 527
       at MicrosoftResearch.Infer.InferenceEngine.Infer[TReturn](IVariable var) in c:\Builds\2\infernet\External\src\infernet\Compiler\Infer\InferenceEngine.cs:line 273
       at MicrosoftResearch.Infer.Tutorials.DifficultyAbility.Run()
    ===================================================

    Do you know what is the possible problem? 

    Thank you very much.

    Monday, August 29, 2016 9:54 AM

All replies

  • This is covered in the FAQ.  It can be a convergence issue.  Try monitoring the results of inference after each iteration to determine this.  If it is a convergence problem, then initializing the variables or using stronger priors can help.
    Tuesday, August 30, 2016 2:41 PM
    Owner
  • hi Tom,

    Thank you very much for your reply and your work. 

    I also checked the FAQ following your reply. 

    Although I did not find another stronger priors, the solution of reordering the data seems work (with using the default priors in the code).   

    Best Regards,

    Thursday, September 1, 2016 6:17 AM