Closed dmitra79 closed 4 years ago
I've run into the following following Runtime Warning in similar situation (but not both this and above at once):
../anaconda3/envs/mindsynchro-test/lib/python3.7/site-packages/numpy/core/fromnumeric.py:3118: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
../anaconda3/envs/mindsynchro-test/lib/python3.7/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
../flyingsquid/flyingsquid/label_model.py:667: RuntimeWarning: invalid value encountered in less
marginal_vals[marginal_vals < 0] = marginal_vals[marginal_vals < 0] * -1
The graph that you've specified can't be solved with our method -- in order to run, we need to be able to put each labeling function into a triplet of three conditionally-independent labeling functions.
Generally speaking, two labeling functions are conditionally-independent if there's no path between them in lambda_edges
(technically, this is only true for the single Y case). So in your graph, labeling function 0 is conditionally-independent from labeling functions 1, 2, and 3 -- but labeling functions 1, 2, and 3 aren't conditionally-independent of each other. So we can't form a triplet of three labeling functions where all three of them are conditionally-independent of each other.
There's now a check for this built-in on label model creation -- it should throw an error if it can't find valid triplets for all labeling functions.
Thank you for the explanation! I tried with the latest version just now, but the exception you've added (below) did not get raised - behavior was same as before
if not self._check():
raise NotImplementedError('Cannot run triplet method for specified graph.')
Thanks for flagging -- there was a bug in the check function. Should be fixed now!
Yes, seems to be working. Thanks!
Hello,
I've ran into the following error:
The labelled model I am creating has m=4 weak labels, and the label_edges are: [(1, 2), (1, 3), (2, 3)]. The data summary is:
It seems that it's due to very rare weak labels?