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

Only 0 probabilities for some examples #47

Open
hakank opened this issue May 27, 2021 · 5 comments
Open

Only 0 probabilities for some examples #47

hakank opened this issue May 27, 2021 · 5 comments

Comments

@hakank
Copy link

hakank commented May 27, 2021

On some examples, dice shows only 0 probabilities.

  • resources/caesar-iter.dice
$ dice caesar-iter.dice
================[ Joint Distribution ]================
Value	Probability	
0	0.	
1	0.	
2	0.	
3	0.	
  • benchmarks/simpleCaesar.dice
$  dice simpleCaesar.dice 
================[ Joint Distribution ]================
Value	Probability	
0	0.	
1	0.	
2	0.	
3	0.	
4	0.	
5	0.	
6	0.	
7	0.	
8	0.	
9	0.	
10	0.	
11	0.	
12	0.	
13	0.	
14	0.	
15	0.	
16	0.	
17	0.	
18	0.	
19	0.	
20	0.	
21	0.	
22	0.	
23	0.	
24	0.	
25	0.	
26	0.	
27	0.	
28	0.	
29	0.	
30	0.	
31	0.	
  • benchmarks/baselines/digitRecognition.dice
$ dice digitRecognition.dice
================[ Joint Distribution ]================
Value	Probability	
0	0.	
1	0.	
2	0.	
3	0.	
4	0.	
5	0.	
6	0.	
7	0.	
8	0.	
9	0.	
10	0.	
11	0.	
12	0.	
13	0.	
14	0.	
15	0.	

Have I missed something? Should one use some of Dice's flags on these programs?

I'm running Dice on a Linux Ubuntu 18.05LTS,

@SHoltzen
Copy link
Owner

Thanks so much for this bug report, and thanks for your interest in dice!

This is indeed unexpected behavior which should be handled better. This "all-zeros" output is occurring due to a floating point precision issue (these examples are observing very low probability of evidence).

One of the enhancements we are working on for dice is an arbitrary precision inference mode that can better handle these situations. This is a high priority for us so hopefully this will be implemented soon.

@hakank
Copy link
Author

hakank commented May 27, 2021

Thanks for your answer. Support for arbitrary precision sounds great.

@loopreal
Copy link

Hi,
I notice that the problem is resolved if I build Dice from source. Thanks so much. But the version in the docker image still has all-zeros for these examples. Is it possible to update the docker version?

@rishubn
Copy link

rishubn commented Dec 7, 2022

Is there any update on this?

@SHoltzen
Copy link
Owner

SHoltzen commented Dec 7, 2022

Yes, this is resolved now in the main branch. There is a command-line option -wmc-type which permits choosing between different WMC representations (including rational); choosing rational should fix this.

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

4 participants