Package trust.jfcm.learning

Examples of trust.jfcm.learning.LearningWeightedConnection


    end = 0;
   
    Collection<FcmConnection> cons = map.getConnections().values();
    for(FcmConnection f : cons){
      if(f instanceof LearningWeightedConnection){
        LearningWeightedConnection w = (LearningWeightedConnection) f;
        w.setChangeInWeight(0);
      }
    }
  }
View Full Code Here


        Iterator<FcmConnection> it1 = out.iterator();
       
        while(it1.hasNext()){
          FcmConnection conn = it1.next();
         
          LearningWeightedConnection wconn = null;
          if(conn instanceof LearningWeightedConnection){
            wconn = (LearningWeightedConnection) conn;
            /*
             * Update learning connection
             */
 
View Full Code Here

    Iterator<FcmConnection> it = in.iterator();
    double val = 0;
    while(it.hasNext()){
      FcmConnection conn = it.next();
     
      LearningWeightedConnection wconn = null;
      if(conn instanceof LearningWeightedConnection)
        wconn = (LearningWeightedConnection) conn;
     
      Concept cin = wconn.getFrom();
      LearningConcept lin = null;
      if(cin instanceof LearningConcept)
        lin = (LearningConcept) cin;
     
      if(!lin.isErrorCalculated()){
        //logger.debug("  Error for "+c+" cannot be yet calculated because "+lin+" is not updated");
        /*
         * Error cannot be computed yet
         */
        return false;
      }
     
      val += wconn.getWeight() * lin.getError();
      //val +=  wconn.getWeight()* wconn.getWeightUncertainty() * lin.getError();
     
    }
   
    /*
 
View Full Code Here

    end = 0;
   
    Collection<FcmConnection> cons = map.getConnections().values();
    for(FcmConnection f : cons){
      if(f instanceof LearningWeightedConnection){
        LearningWeightedConnection w = (LearningWeightedConnection) f;
        w.setChangeInWeight(0);
      }
    }
  }
View Full Code Here

        Iterator<FcmConnection> it1 = out.iterator();
       
        while(it1.hasNext()){
          FcmConnection conn = it1.next();
         
          LearningWeightedConnection wconn = null;
          if(conn instanceof LearningWeightedConnection){
            wconn = (LearningWeightedConnection) conn;
            /*
             * Update learning connection
             */
 
View Full Code Here

    InputLearningConcept ped = new InputLearningConcept();
    ped.setName("pediatrician");
    ped.setFixedOutput(true);
    ped.setTrainingFunction(new LinearBP());
    map.addConcept(ped);
    LearningWeightedConnection conn1 = new LearningWeightedConnection();
    conn1.setName("ped_ability");
    conn1.setFrom(ped);
    conn1.setTo(map.getConcept("static_ability"));
    conn1.setWeight(0.9);
    map.addConnection(conn1);
    map.connect(conn1.getFrom().getName(), conn1.getName(), conn1.getTo().getName());
   
    InputLearningConcept ent = new InputLearningConcept();
    ent.setName("ent");
    ent.setFixedOutput(true);
    ent.setTrainingFunction(new LinearBP());
    map.addConcept(ent);
    LearningWeightedConnection conn10 = new LearningWeightedConnection();
    conn10.setName("ent_ability");
    conn10.setFrom(ent);
    conn10.setTo(map.getConcept("static_ability"));
    conn10.setWeight(0.3);
    map.addConnection(conn10);
    map.connect(conn10.getFrom().getName(), conn10.getName(), conn10.getTo().getName());
   
   
    InputLearningConcept cautious = new InputLearningConcept();
    cautious.setName("cautious");
    cautious.setOutput(1.0);
    cautious.setFixedOutput(true);
    cautious.setTrainingFunction(new LinearBP());
    map.addConcept(cautious);
    LearningWeightedConnection conn2 = new LearningWeightedConnection();
    conn2.setName("cautious_disposition");
    conn2.setFrom(cautious);
    conn2.setTo(map.getConcept("static_disposition"));
    conn2.setWeight(0.9);
    map.addConnection(conn2);
    map.connect(conn2.getFrom().getName(), conn2.getName(), conn2.getTo().getName());
   
    InputLearningConcept female = new InputLearningConcept();
    female.setName("female");
    female.setOutput(1.0);
    female.setFixedOutput(true);
    female.setTrainingFunction(new LinearBP());
    map.addConcept(female);
    LearningWeightedConnection conn3 = new LearningWeightedConnection();
    conn3.setName("female_cross");
    conn3.setFrom(female);
    conn3.setTo(map.getConcept("cross"));
    conn3.setWeight(0.9);
    map.addConnection(conn3);
    map.connect(conn3.getFrom().getName(), conn3.getName(), conn3.getTo().getName());
   
    map.getConcept("static_disposition").setBinary(true);
    map.getConcept("static_ability").setBinary(true);
    map.getConcept("cross").setBinary(true);
  }
View Full Code Here

TOP

Related Classes of trust.jfcm.learning.LearningWeightedConnection

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.