Comments (4)
Hi @elia-maracani ,
We will look into this. Do you have some example code for us to replicate this error?
Thanks
from libpgm.
Hi @irwincong ,
Yeah sure, at this github repository you can find all you need to try it, let me know.
Thanks
from libpgm.
Hi @elia-maracani,
Agreed that there is a source code issue as you pointed out -- variable usage without prior declaration. An internal version of the code has progressed since and has been refactored a bit, and it does not exhibit this error. We are currently working through how to best update this external repository. @cccabot - Do you have any suggested workarounds while we work through this?
Also, please note that the dictionary that you are using in your repo to construct the discrete node seems to be different from what the Discrete() class has documented, specifically, the 'cprob' portion. If you uncomment line 44 in examples/examples.py, you would get something like the following.
"Grade": {
"vals": [
"C",
"B",
"A"
],
"numoutcomes": 3,
"cprob": {
"['high', 'easy']": [
0.0,
0.029411764705882353,
0.9705882352941176
],
"['low', 'easy']": [
0.23529411764705882,
0.3764705882352941,
0.38823529411764707
],
"['low', 'hard']": [
0.7547169811320755,
0.20754716981132076,
0.03773584905660377
],
"['high', 'hard']": [
0.25,
0.42857142857142855,
0.32142857142857145
]
},
"parents": [
"Intelligence",
"Difficulty"
],
"children": [
"Letter"
]
},
Regards
from libpgm.
Hi @elia-maracani @irwincong it looks like a bug to me. Short of deleting line 71 I cannot think of a workaround. It looks like it doesn't break if the discrete node is a root node -- which is tested in example (3). But the case with a discrete non-root node (which triggers the bug) is not covered by the examples or tests.
from libpgm.
Related Issues (19)
- dev_struct_finding : typo + bug HOT 1
- Lgandd with discrete parents only HOT 2
- TableCPDFactorization.specificquery() for Discrete BN throws Value Error HOT 4
- Problematic 'utils' module at top level root in site-packages
- Issue with setting the seed for experiment replication HOT 1
- discrete_constraint_estimatestruct assert Graph contains a cycle
- Integer values HOT 4
- Compatability with Python 3 HOT 3
- compatablity with python3.4
- The build directory should probably be empty
- Soft evidence in libpgm
- Support for learning hybrid network parameters from data?
- Multiple specific queries? HOT 5
- Why was the lastest update three years ago? HOT 8
- Error while importing DiscreteBayesianNetwork on Colaboratory
- [old comment]
- [old comment] HOT 9
- lg_constraint_estimatestruct does not give the same ordering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libpgm.