From: Michele Silva Date: Wed, 7 Dec 2011 04:22:10 +0000 (-0200) Subject: Added unbbayes libs and bayesian network use example. X-Git-Url: http://200.18.67.61/gitweb/?a=commitdiff_plain;h=be675984da82db24147b1d700edbad5aa8e42332;p=simdecs.git Added unbbayes libs and bayesian network use example. --- diff --git a/config.cfg b/config.cfg new file mode 100644 index 0000000..a7ba392 Binary files /dev/null and b/config.cfg differ diff --git a/lib/avalon-framework-4.1.3.jar b/lib/avalon-framework-4.1.3.jar new file mode 100644 index 0000000..fd72580 Binary files /dev/null and b/lib/avalon-framework-4.1.3.jar differ diff --git a/lib/commons-logging-1.1.jar b/lib/commons-logging-1.1.jar new file mode 100644 index 0000000..2ff9bbd Binary files /dev/null and b/lib/commons-logging-1.1.jar differ diff --git a/lib/icu4j-3.8.jar b/lib/icu4j-3.8.jar new file mode 100644 index 0000000..2665486 Binary files /dev/null and b/lib/icu4j-3.8.jar differ diff --git a/lib/javahelp-2.0.02.jar b/lib/javahelp-2.0.02.jar new file mode 100644 index 0000000..6b894bc Binary files /dev/null and b/lib/javahelp-2.0.02.jar differ diff --git a/lib/jaxme2-0.5.1.jar b/lib/jaxme2-0.5.1.jar new file mode 100644 index 0000000..9696d43 Binary files /dev/null and b/lib/jaxme2-0.5.1.jar differ diff --git a/lib/jaxme2-rt-0.5.1.jar b/lib/jaxme2-rt-0.5.1.jar new file mode 100644 index 0000000..3ef8d91 Binary files /dev/null and b/lib/jaxme2-rt-0.5.1.jar differ diff --git a/lib/jaxmeapi-0.5.1.jar b/lib/jaxmeapi-0.5.1.jar new file mode 100644 index 0000000..dcf0556 Binary files /dev/null and b/lib/jaxmeapi-0.5.1.jar differ diff --git a/lib/jaxmejs-0.5.1.jar b/lib/jaxmejs-0.5.1.jar new file mode 100644 index 0000000..63cb385 Binary files /dev/null and b/lib/jaxmejs-0.5.1.jar differ diff --git a/lib/jaxmexs-0.5.1.jar b/lib/jaxmexs-0.5.1.jar new file mode 100644 index 0000000..17a7e65 Binary files /dev/null and b/lib/jaxmexs-0.5.1.jar differ diff --git a/lib/jpf-1.5.jar b/lib/jpf-1.5.jar new file mode 100644 index 0000000..5353d0c Binary files /dev/null and b/lib/jpf-1.5.jar differ diff --git a/lib/junit-4.1.jar b/lib/junit-4.1.jar new file mode 100644 index 0000000..2c46d67 Binary files /dev/null and b/lib/junit-4.1.jar differ diff --git a/lib/log4j-1.2.12.jar b/lib/log4j-1.2.12.jar new file mode 100644 index 0000000..9b5a720 Binary files /dev/null and b/lib/log4j-1.2.12.jar differ diff --git a/lib/logkit-1.0.1.jar b/lib/logkit-1.0.1.jar new file mode 100644 index 0000000..d3250ee Binary files /dev/null and b/lib/logkit-1.0.1.jar differ diff --git a/lib/servlet-api-2.3.jar b/lib/servlet-api-2.3.jar new file mode 100644 index 0000000..cd5b351 Binary files /dev/null and b/lib/servlet-api-2.3.jar differ diff --git a/lib/unbbayes-4.10.4-1s.jar b/lib/unbbayes-4.10.4-1s.jar new file mode 100755 index 0000000..c53c95e Binary files /dev/null and b/lib/unbbayes-4.10.4-1s.jar differ diff --git a/lib/xalan-2.7.0.jar b/lib/xalan-2.7.0.jar new file mode 100644 index 0000000..007be39 Binary files /dev/null and b/lib/xalan-2.7.0.jar differ diff --git a/lib/xml-apis-1.0.b2.jar b/lib/xml-apis-1.0.b2.jar new file mode 100644 index 0000000..ad33a5a Binary files /dev/null and b/lib/xml-apis-1.0.b2.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 4550ee3..740612b 100755 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -675,12 +675,46 @@ exists or setup the property manually. For example like this: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index b276730..594a486 100755 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=f5fca5b3 +build.xml.data.CRC32=4ef9c105 build.xml.script.CRC32=3c672195 build.xml.stylesheet.CRC32=651128d4@1.33.1.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=f5fca5b3 -nbproject/build-impl.xml.script.CRC32=add2363b +nbproject/build-impl.xml.data.CRC32=4ef9c105 +nbproject/build-impl.xml.script.CRC32=aa816119 nbproject/build-impl.xml.stylesheet.CRC32=0cbf5bb7@1.33.1.1 diff --git a/nbproject/project.properties b/nbproject/project.properties index 914f4d8..600c370 100755 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,6 +1,5 @@ annotation.processing.enabled=true annotation.processing.enabled.in.editor=true -annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets @@ -26,11 +25,28 @@ dist.javadoc.dir=${dist.dir}/javadoc dist.war=${dist.dir}/${war.name} endorsed.classpath= excludes= +file.reference.avalon-framework-4.1.3.jar=lib/avalon-framework-4.1.3.jar +file.reference.commons-logging-1.1.jar=lib/commons-logging-1.1.jar +file.reference.icu4j-3.8.jar=lib/icu4j-3.8.jar +file.reference.javahelp-2.0.02.jar=lib/javahelp-2.0.02.jar +file.reference.jaxme2-0.5.1.jar=lib/jaxme2-0.5.1.jar +file.reference.jaxme2-rt-0.5.1.jar=lib/jaxme2-rt-0.5.1.jar +file.reference.jaxmeapi-0.5.1.jar=lib/jaxmeapi-0.5.1.jar +file.reference.jaxmejs-0.5.1.jar=lib/jaxmejs-0.5.1.jar +file.reference.jaxmexs-0.5.1.jar=lib/jaxmexs-0.5.1.jar +file.reference.jpf-1.5.jar=lib/jpf-1.5.jar +file.reference.junit-4.1.jar=lib/junit-4.1.jar +file.reference.log4j-1.2.12.jar=lib/log4j-1.2.12.jar +file.reference.logkit-1.0.1.jar=lib/logkit-1.0.1.jar +file.reference.servlet-api-2.3.jar=lib/servlet-api-2.3.jar +file.reference.unbbayes-4.10.4-1s.jar=lib/unbbayes-4.10.4-1s.jar +file.reference.xalan-2.7.0.jar=lib/xalan-2.7.0.jar +file.reference.xml-apis-1.0.b2.jar=lib/xml-apis-1.0.b2.jar includes=** j2ee.compile.on.save=true j2ee.deploy.on.save=true j2ee.platform=1.5 -j2ee.platform.classpath=${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/jaxr-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/jstl-impl.jar +j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxrpc-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/jaxr-api-osgi.jar:${j2ee.server.home}/modules/javax.transaction.jar j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar @@ -40,7 +56,24 @@ j2ee.server.type=gfv3ee6 jar.compress=false javac.classpath=\ ${libs.primefaces.classpath}:\ - ${libs.hibernate-support.classpath} + ${libs.hibernate-support.classpath}:\ + ${file.reference.avalon-framework-4.1.3.jar}:\ + ${file.reference.commons-logging-1.1.jar}:\ + ${file.reference.icu4j-3.8.jar}:\ + ${file.reference.javahelp-2.0.02.jar}:\ + ${file.reference.jaxme2-0.5.1.jar}:\ + ${file.reference.jaxme2-rt-0.5.1.jar}:\ + ${file.reference.jaxmeapi-0.5.1.jar}:\ + ${file.reference.jaxmejs-0.5.1.jar}:\ + ${file.reference.jaxmexs-0.5.1.jar}:\ + ${file.reference.jpf-1.5.jar}:\ + ${file.reference.junit-4.1.jar}:\ + ${file.reference.log4j-1.2.12.jar}:\ + ${file.reference.logkit-1.0.1.jar}:\ + ${file.reference.servlet-api-2.3.jar}:\ + ${file.reference.unbbayes-4.10.4-1s.jar}:\ + ${file.reference.xalan-2.7.0.jar}:\ + ${file.reference.xml-apis-1.0.b2.jar} # Space-separated list of extra javac options javac.compilerargs= javac.debug=true diff --git a/nbproject/project.xml b/nbproject/project.xml index 21b6535..3cd8dec 100755 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -14,6 +14,74 @@ ${libs.hibernate-support.classpath} WEB-INF/lib + + ${file.reference.avalon-framework-4.1.3.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-1.1.jar} + WEB-INF/lib + + + ${file.reference.icu4j-3.8.jar} + WEB-INF/lib + + + ${file.reference.javahelp-2.0.02.jar} + WEB-INF/lib + + + ${file.reference.jaxme2-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxme2-rt-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxmeapi-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxmejs-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxmexs-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jpf-1.5.jar} + WEB-INF/lib + + + ${file.reference.junit-4.1.jar} + WEB-INF/lib + + + ${file.reference.log4j-1.2.12.jar} + WEB-INF/lib + + + ${file.reference.logkit-1.0.1.jar} + WEB-INF/lib + + + ${file.reference.servlet-api-2.3.jar} + WEB-INF/lib + + + ${file.reference.unbbayes-4.10.4-1s.jar} + WEB-INF/lib + + + ${file.reference.xalan-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-1.0.b2.jar} + WEB-INF/lib + diff --git a/samples/headache.xml b/samples/headache.xml new file mode 100644 index 0000000..7e5d5b5 --- /dev/null +++ b/samples/headache.xml @@ -0,0 +1,1277 @@ + + + + 1.0 + Headache + UnBBayes + + + 40 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Rest Relief + + + + + Nuchal rigidity + + + + + Nasal Obstruction + + + + + Uncommon episodies + + + + + Visual Disturbance + + + + + High frequency + + + + + Antimicrobians + + + + + Fever + + + + + Nasal Discharge + + + + + Sinusitis + + + + + Facial Pain + + + + + Painful mastication + + + + + Temporomandibular + + + + + Aneurysmal History + + + + + Acute weakness + + + + + Diplopy + + + + + Seizure + + + + + Imaging Investigation + + + + + Specialist + + + + + Profilaxy + + + + + Analgesia + + + + + Unilateral Red Eye + + + + + Photophobia + + + + + Pulsating Pain + + + + + Hemicranial Pain + + + + + Cluster Headache + + + + + Migraine + + + + + Tension-type Headache + + + + + Nausea + + + + + Holocranial Pain + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.10000000149011612 + 0.8999999761581421 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + + 0.10000000149011612 + 0.8999999761581421 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + 0.4000000059604645 + 0.6000000238418579 + 0.30000001192092896 + 0.699999988079071 + 0.3499999940395355 + 0.6499999761581421 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + 0.9990000128746033 + 0.0010000000474974513 + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.10000000149011612 + 0.8999999761581421 + + + + + + + + + + + + 0.949999988079071 + 0.05000000074505806 + 0.75 + 0.25 + 0.699999988079071 + 0.30000001192092896 + 0.3499999940395355 + 0.6499999761581421 + 0.8999999761581421 + 0.10000000149011612 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.15000000596046448 + 0.8500000238418579 + 0.8999999761581421 + 0.10000000149011612 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.15000000596046448 + 0.8500000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.20000000298023224 + 0.800000011920929 + 0.30000001192092896 + 0.699999988079071 + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.5 + 0.5 + 0.800000011920929 + 0.20000000298023224 + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + + + + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.8999999761581421 + 0.10000000149011612 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.699999988079071 + 0.30000001192092896 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.8999999761581421 + 0.10000000149011612 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.8999999761581421 + 0.10000000149011612 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.0010000000474974513 + 0.9990000128746033 + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.20000000298023224 + 0.800000011920929 + 0.6499999761581421 + 0.3499999940395355 + 0.30000001192092896 + 0.699999988079071 + 0.8999999761581421 + 0.10000000149011612 + 0.10000000149011612 + 0.8999999761581421 + 0.6000000238418579 + 0.4000000059604645 + 0.20000000298023224 + 0.800000011920929 + 0.6499999761581421 + 0.3499999940395355 + 0.4000000059604645 + 0.6000000238418579 + 0.800000011920929 + 0.20000000298023224 + 0.30000001192092896 + 0.699999988079071 + 0.800000011920929 + 0.20000000298023224 + 0.4000000059604645 + 0.6000000238418579 + 0.4000000059604645 + 0.6000000238418579 + 0.009999999776482582 + 0.9900000095367432 + 0.9900000095367432 + 0.009999999776482582 + 0.4000000059604645 + 0.6000000238418579 + 0.8999999761581421 + 0.10000000149011612 + 0.20000000298023224 + 0.800000011920929 + 0.949999988079071 + 0.05000000074505806 + 0.20000000298023224 + 0.800000011920929 + 0.800000011920929 + 0.20000000298023224 + 0.10000000149011612 + 0.8999999761581421 + 0.009999999776482582 + 0.9900000095367432 + 0.20000000298023224 + 0.800000011920929 + 0.10000000149011612 + 0.8999999761581421 + 0.05000000074505806 + 0.949999988079071 + 0.10000000149011612 + 0.8999999761581421 + 0.009999999776482582 + 0.9900000095367432 + 0.550000011920929 + 0.44999998807907104 + 0.0010000000474974513 + 0.9990000128746033 + 0.949999988079071 + 0.05000000074505806 + 0.6499999761581421 + 0.3499999940395355 + 0.8999999761581421 + 0.10000000149011612 + 0.550000011920929 + 0.44999998807907104 + 0.8999999761581421 + 0.10000000149011612 + 0.550000011920929 + 0.44999998807907104 + 0.8999999761581421 + 0.10000000149011612 + 0.550000011920929 + 0.44999998807907104 + 0.550000011920929 + 0.44999998807907104 + 0.10000000149011612 + 0.8999999761581421 + 0.6000000238418579 + 0.4000000059604645 + 0.10000000149011612 + 0.8999999761581421 + 0.15000000596046448 + 0.8500000238418579 + 0.05000000074505806 + 0.949999988079071 + 0.05000000074505806 + 0.949999988079071 + 0.009999999776482582 + 0.9900000095367432 + 0.9900000095367432 + 0.009999999776482582 + 0.30000001192092896 + 0.699999988079071 + 0.8999999761581421 + 0.10000000149011612 + 0.20000000298023224 + 0.800000011920929 + 0.8181819915771484 + 0.18181799352169037 + 0.30000001192092896 + 0.699999988079071 + 0.550000011920929 + 0.44999998807907104 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.20000000298023224 + 0.800000011920929 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + + + + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.44999998807907104 + 0.550000011920929 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.44999998807907104 + 0.550000011920929 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.44999998807907104 + 0.550000011920929 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.3499999940395355 + 0.6499999761581421 + 0.009999999776482582 + 0.9900000095367432 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.699999988079071 + 0.30000001192092896 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.30000001192092896 + 0.699999988079071 + 0.5 + 0.5 + 0.31818199157714844 + 0.6818180084228516 + 0.30000001192092896 + 0.699999988079071 + 0.009999999776482582 + 0.9900000095367432 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.6666669845581055 + 0.33333298563957214 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.44999998807907104 + 0.550000011920929 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.3499999940395355 + 0.6499999761581421 + 0.30000001192092896 + 0.699999988079071 + 0.009999999776482582 + 0.9900000095367432 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.6499999761581421 + 0.3499999940395355 + 0.699999988079071 + 0.30000001192092896 + 0.44999998807907104 + 0.550000011920929 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.550000011920929 + 0.44999998807907104 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.550000011920929 + 0.44999998807907104 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.550000011920929 + 0.44999998807907104 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.550000011920929 + 0.44999998807907104 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + + + + + + + + + + + 0.6000000238418579 + 0.4000000059604645 + 0.20000000298023224 + 0.800000011920929 + 0.4000000059604645 + 0.6000000238418579 + 0.15000000596046448 + 0.8500000238418579 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + + + + + + 0.029999999329447746 + 0.9700000286102295 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + \ No newline at end of file diff --git a/src/java/org/ufcspa/simdecs/diagram/bn/BayesianNetwork.java b/src/java/org/ufcspa/simdecs/diagram/bn/BayesianNetwork.java new file mode 100644 index 0000000..9cef230 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/diagram/bn/BayesianNetwork.java @@ -0,0 +1,68 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.diagram.bn; + +import java.io.File; +import java.util.ArrayList; +import java.util.Vector; + +import unbbayes.io.xmlbif.version6.*; +import unbbayes.prs.Node; +import unbbayes.prs.bn.ProbabilisticNetwork; +import unbbayes.simdecs.PerguntaNodo; +/** + * + * @author mchelem + */ +public class BayesianNetwork { + + public static ProbabilisticNetwork loadNetwork(String filename) throws Exception { + ProbabilisticNetwork bayesianNetwork = new ProbabilisticNetwork(null); + XMLBIFIO.loadXML(new File(filename),bayesianNetwork); + return bayesianNetwork; + } + + /* Testing */ + public static void main(String[] args) throws Exception { + ProbabilisticNetwork bn = BayesianNetwork.loadNetwork("samples/headache.xml"); + + // Get bayesian network name + System.out.println("Network name: "+ bn.getName()); + + // Get all the nodes + System.out.println("All nodes: "); + ArrayList nodes = bn.getNodes(); + for (Node node: nodes){ + System.out.println("-> " + node.getName()); + } + + // Get node by name and its children + Node facialPainNode = bn.getNode("facial_pain"); + System.out.println("\nNode: " + facialPainNode.getName()); + + // Atenção: campos adicionados aos nodos usando unbbayes. + // No projeto será utilizado o armazenado pelo banco de dados. + // Foi incluído aqui apenas para uso temporário. + System.out.println("Custo: " + facialPainNode.getCustoEtapa()); + System.out.println("Tempo: " + facialPainNode.getTempoEtapa()); + + // Mostrando as perguntas e respostas do nodo + Vector perguntas = facialPainNode.getPerguntas(); + for (PerguntaNodo pergunta: perguntas) { + // Setting questions because it is not set in the saved net + pergunta.setPergunta("Minha pergunta?"); + System.out.println("Pergunta: " + pergunta.getPergunta()); + } + + ArrayList childrenNodes = facialPainNode.getChildren(); + System.out.println("Children:"); + for (Node node: childrenNodes){ + System.out.println("-> " + node.getName()); + } + } + + +} +