Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Improper distribution during inference #142

Open
caxelrud opened this issue Mar 24, 2019 · 5 comments
Open

Exception: Improper distribution during inference #142

caxelrud opened this issue Mar 24, 2019 · 5 comments

Comments

@caxelrud
Copy link

Need some help.
InferNet_2019.zip

I converted the DifficultyAbility.cs code from C# to F#. But, I am getting the exception "Microsoft.ML.Probabilistic.Factors.ImproperMessageException: Improper distribution during inference (Gaussian(m/v=-0.01752, 1/v=0)). Cannot perform inference on this model"
The source code and executions results are attached.

@tminka
Copy link
Contributor

tminka commented Mar 29, 2019

Thanks for converting this example. I will add this code to the TestFSharp folder, if you don't mind.

I am not able to reproduce the error that you are seeing. I get the following result:

Compiling model...done.
Iterating:
..... 5
99.000000 TrueAnswers correct
difficulty[0] = Gaussian(1.914, 0.3346) (sampled from 2.374285)
difficulty[1] = Gaussian(-0.2033, 0.08233) (sampled from -0.238398)
difficulty[2] = Gaussian(-0.341, 0.0806) (sampled from -0.212323)
difficulty[3] = Gaussian(-0.03086, 0.08715) (sampled from 0.263200)
discrimination[0] = Gamma(101.1, 0.00994)[mean=1.005] (sampled from 0.997799)
discrimination[1] = Gamma(104.1, 0.0096)[mean=0.9995] (sampled from 1.053059)
discrimination[2] = Gamma(104.4, 0.009614)[mean=1.004] (sampled from 1.088694)
discrimination[3] = Gamma(103.6, 0.009661)[mean=1.001] (sampled from 0.873162)
ability[0] = Gaussian(0.2524, 0.03589) (sampled from 0.579576)
ability[1] = Gaussian(0.5612, 0.03622) (sampled from 0.812904)
ability[2] = Gaussian(1.335, 0.04739) (sampled from 1.514625)
ability[3] = Gaussian(0.171, 0.03551) (sampled from 0.328675)

@caxelrud
Copy link
Author

caxelrud commented Mar 30, 2019 via email

@tminka
Copy link
Contributor

tminka commented Apr 1, 2019

I am using .NET framework version 4.0.30319.42000 mscorlib 4.7.3324.0 from Visual Studio 2017 15.9.8.
It also works under .NET Core version 4.0.30319.42000 mscorlib 4.6.27317.03 @BuiltBy: dlab14-DDVSOWINAGE101 @Branch: release/2.1 @srccode: https://github.com/dotnet/coreclr/tree/67716e18103217d501c5901e5a7e9c4da7d044c8

@tminka
Copy link
Contributor

tminka commented Apr 1, 2019

You can find the code that I used at DifficultyAbility.fs.

@caxelrud
Copy link
Author

caxelrud commented Apr 13, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants