Package trust.jfcm.learning

Examples of trust.jfcm.learning.EntryStructure


      /*
       * compute errors on the output nodes
       */
      List<EntryStructure> outputs = e.getOutputs();
      for(int i=0; i<outputs.size(); i++){
        EntryStructure e1 = outputs.get(i);
        Concept c = e1.getConcept();
       
        if(c==null)
          System.err.println("Error: Concept "+e1.getConcept().getName()+" not found");
       
       
          LearningConcept lc = null;
          if(c instanceof LearningConcept)
            lc = (LearningConcept) c;
View Full Code Here


     /*
     * compute errors on the output nodes
     */
    double error = 0;
    for(int i=0; i<outputs.size(); i++){
      EntryStructure e1 = outputs.get(i);
      Concept c = e1.getConcept();
     
      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;
          error += Math.pow(oc.getOutput() - e1.getValue(), 2);
          //System.out.println("  OutputNode: "+c.getName()+": "+c.getOutput()+", desirable value: "+e1.getValue());
        }
       
    }
   
View Full Code Here

    //System.out.println("- Calculating errors:");
    /*
     * Set desirable outputs
     */
    for(int i=0; i<outputs.size(); i++){
      EntryStructure e1 = outputs.get(i);
      Concept c = e1.getConcept();
     
      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());
          //System.out.println("  OutputNode: "+c.getName()+": "+c.getOutput()+", desirable value: "+e1.getValue());
        }
       
    }
  }
View Full Code Here

   * Set the inputs to the map from the given training set entry
   * @param inputs: training set entry of input data
   */
  private void setTrainingInputs(List<EntryStructure> inputs){
    for(int i=0; i<inputs.size(); i++){
      EntryStructure e1 = inputs.get(i);
      //System.out.println("EntryStructure: "+e1);
     
      LearningConcept lc = (LearningConcept) e1.getConcept();
      if(lc != null && lc.isInput()){
        InputLearningConcept ilc = (InputLearningConcept) lc;
        ilc.setInput(e1.getValue());
      }

    }
  }
View Full Code Here

      /*
       * compute errors on the output nodes
       */
      List<EntryStructure> outputs = e.getOutputs();
      for(int i=0; i<outputs.size(); i++){
        EntryStructure e1 = outputs.get(i);
        Concept c = e1.getConcept();
       
        if(c==null)
          System.err.println("Error: Concept "+e1.getConcept().getName()+" not found");
       
       
          LearningConcept lc = null;
          if(c instanceof LearningConcept)
            lc = (LearningConcept) c;
View Full Code Here

     /*
     * compute errors on the output nodes
     */
    double error = 0;
    for(int i=0; i<outputs.size(); i++){
      EntryStructure e1 = outputs.get(i);
      Concept c = e1.getConcept();
     
      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;
          error += Math.pow(oc.getOutput() - e1.getValue(), 2);
          //logger.debug("  OutputNode: "+c.getName()+": "+c.getOutput()+", desirable value: "+e1.getValue());
        }
       
    }
   
View Full Code Here

    /*
     * Set desirable outputs and compute the mean error
     */
    double sum=0;
    for(int i=0; i<outputs.size(); i++){
      EntryStructure e1 = outputs.get(i);
      Concept c = e1.getConcept();
     
      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();
View Full Code Here

   * Set the inputs to the map from the given training set entry
   * @param inputs: training set entry of input data
   */
  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

TOP

Related Classes of trust.jfcm.learning.EntryStructure

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.