Package statechum.analysis.learning

Examples of statechum.analysis.learning.RPNIBlueFringeLearnerTestComponentOpt.learnMachine()


    PTASequenceEngine sPlus = null, sMinus = null;int percent = 10;
    sPlus = rpg.getExtraSequences(percent/10-1);sMinus = rpg.getAllSequences(percent/10-1);

    int ptaSize = sMinus.numberOfLeafNodes();
    l.init(sMinus, ptaSize,ptaSize);// our imaginary positives are prefixes of negatives.
    DirectedSparseGraph learningOutcome = l.learnMachine();
    l.setQuestionCounter(0);
    LearnerGraph learned = new LearnerGraph(learningOutcome,config);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(learned);
    PTASequenceEngine engine = new PTA_FSMStructure(graph);
    precRec.crossWith(sMinus);
View Full Code Here


      int ptaElements = pta.numberOfLeafNodes();

      stats = stats+"Instance: "+instanceID+", learner: "+this+", pta: "+ptaElements+" tests: "+tests.size()+ "\n";
      l.init(pta, ptaElements/2,ptaElements/2);

      learningOutcome = l.learnMachine();
      result = result+l.getQuestionCounter()+FS+computeAccuracy(learningOutcome, graph.paths.getGraph(),tests);
      System.out.print(computeAccuracy(learningOutcome, graph.paths.getGraph(),tests)+",");
      //System.out.println(instanceID+","+result);
      //updateFrame(g,learningOutcome);
      l.setQuestionCounter(0);
View Full Code Here

        PTASequenceSet plusPTA = new PTASequenceSet();plusPTA.addAll(sPlus);PTASequenceSet minusPTA = new PTASequenceSet();minusPTA.addAll(sMinus);
        stats = stats + "Actual sequences, sPlus: "+plusPTA.size()+" sMinus: "+minusPTA.size()+ " ";
        changeParametersOnComputeStateScores(l.getScoreComputer());
        l.init(plusPTA, minusPTA);
        changeParametersOnLearner(l);
        learningOutcome = l.learnMachine();
        result = result+l.getQuestionCounter()+FS+computeAccuracy(learningOutcome, graph,tests);
        if(this.percent == 10)
          System.out.println();
        System.out.print(computeAccuracy(learningOutcome, graph,tests)+",");
        //System.out.println(instanceID+","+result);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.