Package org.integratedmodelling.riskwiz.io.xmlbif

Examples of org.integratedmodelling.riskwiz.io.xmlbif.XmlBifReader


    /**
     * Driver for testing this parser
     * @param args
     */
    public static void main(String[] args) {
        XmlBifReader r = new XmlBifReader();
        XmlBifWriter w = new  XmlBifWriter();

        try {
            BeliefNetwork bn = r.load(
                    new FileInputStream("examples/sprinkler.xml"));
            
            System.out.println("----------------------------------")
            w.save(System.out, bn);
        } catch (Exception e) {
View Full Code Here


     * @param args
     */
    public static void main(String[] args) {
   
        GenieReader r = new GenieReader();
        XmlBifReader rb = new XmlBifReader();

        try {
         
            System.out.println("ciao");
            BeliefNetwork bn = r.load(new FileInputStream("examples/water.xdsl"));
View Full Code Here

     * The following explains how to load network, run inference and output the
     * inference results, than learn from data
     */
    public static void learn(String networkFile, String dataFile) {
   
        XmlBifReader bifReader = new XmlBifReader();
        BeliefNetwork network;

        try {
            // load network and show the marginals
            network = bifReader.loadFromFile(networkFile);
            if (network == null) {
                System.out.println("Problems with loading the  network");
                return;
            }

View Full Code Here

     * of the nodes in network. The difference between this function and previous one
     * is just one line: learner.initializeWithPriors(network, NofVirtualSamples);
     */
    public static void learnWithPriors(String networkFile, String dataFile, int NofVirtualSamples) {
   
        XmlBifReader bifReader = new XmlBifReader();
        BeliefNetwork network;

        try {
            // load network and show the marginals
            network = bifReader.loadFromFile(networkFile);
            if (network == null) {
                System.out.println("Problems with loading the  network");
                return;
            }

View Full Code Here

     * inference results
     */
    public void sprinkler1() {
        // load network

        XmlBifReader bifReader = new XmlBifReader();
        BeliefNetwork network;

        try {
            network = bifReader.loadFromFile("examples/sprinkler.xml");
            if (network == null) {
                System.out.println("Problems with loading the  network");
                return;
            }
            // run inference
View Full Code Here

     * After that run inference and output the inference results (but this time
     * in different way) which does excactly the same examination of nodes in
     * the infered network
     */
    public void sprinkler2() {
        XmlBifReader bifReader = new XmlBifReader();
        BeliefNetwork network = null;

        try {
            network = bifReader.loadFromFile("examples/sprinkler.xml");
            if (network == null) {
                System.out.println("Problems with processing the  network");
                return;
            }
        } catch (Exception e) {
View Full Code Here

     * render results is used
     *
     */

    public void DryGrass() {
        XmlBifReader bifReader = new XmlBifReader();
    
        BeliefNetwork network = bifReader.loadFromFile("examples/sprinkler.xml");

        if (network == null) {
            System.out.println("Can't load network");
            return;
        }
View Full Code Here

     * This functions shows how to manipulate evidence information
     *
     */

    public void sprinklerWGev() {
        XmlBifReader bifReader = new XmlBifReader();

        try {
            BeliefNetwork network = bifReader.loadFromFile(
                    "examples/sprinkler.xml");

            if (network == null) {
                System.out.println("Can't load network");
                return;
View Full Code Here

    /**
     * @param args
     */
    public static void main(String[] args) {
        XmlBifReader r = new XmlBifReader();
        GenieWriter w = new  GenieWriter();

        try {
            BeliefNetwork bn = r.load(
                    new FileInputStream("examples/sprinkler.xml"));
            
            System.out.println("----------------------------------")
            w.save(System.out, bn);
            w.saveToFile("examples/sprinkler.xdsl", bn);
View Full Code Here

     * inference results
     */
    public static void decision(String bifFile) {
        // load network

        XmlBifReader bifReader = new XmlBifReader();
        BeliefNetwork network;

        try {
            network = bifReader.loadFromFile(bifFile);
            if (network == null) {
                System.out.println("Problems with loading the  network");
                return;
            }
            JTSolver solver = new JTSolver();
View Full Code Here

TOP

Related Classes of org.integratedmodelling.riskwiz.io.xmlbif.XmlBifReader

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.