Package trust.jfcm.learning

Examples of trust.jfcm.learning.LearningConcept


     
      if(c==null)
        System.err.println("Error: Concept "+e1.getConcept().getName()+" not found");
     
     
        LearningConcept lc = null;
        if(c instanceof LearningConcept)
          lc = (LearningConcept) c;
       
        if(lc != null && lc.isOutput()){
          OutputLearningConcept oc = (OutputLearningConcept) lc;
          oc.setDesirableOutput(e1.getValue());
          sum += oc.getDesirableOutput() - oc.getOutput().doubleValue();
        }     
    }
   
    double mean_error = sum / outputs.size();
    //logger.debug("The sum error is: "+mean_error);
    /*
     * Put mean error on the input nodes of the whole map
     */
    int num=0;
    Iterator<Concept> it = map.getConceptsIterator();
    while(it.hasNext()){
      Concept c = it.next();
     
        LearningConcept lc = null;
        if(c instanceof LearningConcept)
          lc = (LearningConcept) c;
       
        if(lc != null && lc.isInput()){
          InputLearningConcept ic = (InputLearningConcept) lc;
          ic.setError(mean_error);
          num++;
          //logger.debug("Error on concept "+ic.getName()+": "+ic.getError());
        }
View Full Code Here


      Iterator<Concept> it = map.getConceptsIterator();
      while(it.hasNext()){
        Concept c = it.next();
       
        if(c instanceof LearningConcept){
          LearningConcept lc = (LearningConcept) c;
          if(!lc.isErrorCalculated()){
           
            //error to be calculated
            //logger.debug(" error to be calculated for " + lc.getName());
            if(calculateErrorOnConcept(lc)){
              //calculation successful
View Full Code Here

      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

  private void setTrainingInputs(List<EntryStructure> inputs){
    for(int i=0; i<inputs.size(); i++){
      EntryStructure e1 = inputs.get(i);
      //logger.debug("EntryStructure: "+e1);
     
      LearningConcept lc = (LearningConcept) e1.getConcept();
      if(lc != null && lc.isInput()){
        InputLearningConcept ilc = (InputLearningConcept) lc;
        ilc.setInput(e1.getValue());
      }

    }
View Full Code Here

    Iterator<Concept> it = map.getConcepts().values().iterator();
    while(it.hasNext()){
      Concept c = it.next();
       
      if(c instanceof LearningConcept){
        LearningConcept lc = (LearningConcept) c;
        Set<FcmConnection> out = lc.getOutConnections();
        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
             */
            lc.getTrainingFunction().update(wconn);
          }
         
        }
         
      }     
 
View Full Code Here

TOP

Related Classes of trust.jfcm.learning.LearningConcept

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.