Package org.integratedmodelling.riskwiz.learning.dtable

Examples of org.integratedmodelling.riskwiz.learning.dtable.DistTable


        datasource.close();
   
    }

    protected void learnNodeParameters(BNNode node, IGraphData gtable, Vector<Vector<String>> tuples) {
        DistTable dtable = (DistTable) node.getProperty("distribution");
    
        for (Vector<String> tuple : tuples) {
            int[] cptquery = gtable.getQuery(node, tuple);

            if (isCompleteQuery(cptquery)) {
                Dirichlet dist = dtable.getValue1(cptquery);

                dist.increment(cptquery[0]);
            }
        }

        node.setFunction(dtable.createCPF());
    }
View Full Code Here


        for (BNNode node : nodes) {
            if (node.getFunction() instanceof TabularCPD) {
                TabularCPD function = (TabularCPD) node.getFunction();
         
                DistTable dtable = new DistTable(
                        (DiscreteDomain) function.getDomain(),
                        function.getParentsDomains());

                dtable.setUniformDistributions();
                node.setProperty("distribution", dtable);
                node.setFunction(dtable.createCPF());
            }
        }
    }
View Full Code Here

        Set<BNNode> nodes = bnet.vertexSet();

        for (BNNode node : nodes) {
            if (node.getFunction() instanceof TabularCPD) {
                TabularCPD function = (TabularCPD) node.getFunction();
                DistTable dtable = new DistTable(function, virtualSamples);

                node.setProperty("distribution", dtable);
                node.setFunction(dtable.createCPF());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.integratedmodelling.riskwiz.learning.dtable.DistTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.