Examples of Evaluation


Examples of teammates.testing.object.Evaluation

    System.out.println("testEvaluationNameCaseSensitivity: evaluation name - insensitive");
   
    bi.gotoEvaluations();
   
    // evaluation 1
    Evaluation eval = Evaluation.createEvaluation(scn.course.courseId, EVALUATION_NAME_LOWER, "true", "Please please fill in the forth evaluation", 10);
    bi.addEvaluation(eval);
   
    bi.waitForElementText(bi.statusMessage, bi.MESSAGE_EVALUATION_ADDED);
    assertTrue(bi.isEvaluationPresent(scn.course.courseId, EVALUATION_NAME_LOWER));
   
View Full Code Here

Examples of teammates.testing.object.Evaluation

   */
  public void testDuplicateEvaluation() {
    cout("TestCoordEvaluation: TestCreatingEvaluationPreviouslyNamed");
    gotoEvaluations();
   
    Evaluation eval = nsc.evaluation;
    clickEvaluationTab();
    // Select the course
    waitAndClick(inputCourseID);
    cout("click " + eval.courseID);
    selectDropdownByValue(By.id("courseid"), eval.courseID);   
View Full Code Here

Examples of teammates.testing.object.Evaluation

   
   
    cout("testSystemCaseSensitivity: evaluation name - insensitive");
    clickEvaluationTab();
    //evaluation 1
    Evaluation eval = Evaluation.createEvaluation(COURSE_ID_LOWER, EVALUATION_NAME_LOWER, "true", "Please please fill in the forth evaluation", 10);
    addEvaluation(eval, 0);
    //EVALUATION 1
    eval = Evaluation.createEvaluation(COURSE_ID_LOWER, EVALUATION_NAME_UPPER, "true", "Please please fill in the forth evaluation", 10);
    addEvaluation(eval, 1);
    //verify evaluations: evaluation 1 == EVALUATION 1
View Full Code Here

Examples of tv.floe.metronome.eval.Evaluation

    Matrix predict = dbn.predict( x_xor_Matrix );
    System.out.println("--- Predictions XOR ----");
    MatrixUtils.debug_print(predict);
    //log.info(predict.toString());

    Evaluation eval = new Evaluation();
    eval.eval( y_xor_Matrix, predict );
    //log.info(eval.stats());
    System.out.println( eval.stats() );

    System.out.println( "Total Correct: " + eval.correctScores() + " out of " + x_xor_Matrix.numRows() );
 
 
  }
View Full Code Here

Examples of types.Evaluation

      this.precWeight = precWeight;
    }
  }

  public double calculate(int truth, int guess) {
    Evaluation eval = Evaluate.eval(truth, guess, tagOfInterest);
    // this ensures that we don't make an update if fn = 0.
    if (precWeight == 0 && eval.fn == 0)
      return -1e10;
    return eval.fp * precWeight + eval.fn * recWeight;
  }
 
View Full Code Here

Examples of weka.classifiers.Evaluation

    delTransform.setInputFormat(trainCopy);
    trainCopy = Filter.useFilter(trainCopy, delTransform);

    // max of 5 repetitions of cross validation
    for (i = 0; i < 5; i++) {
      m_Evaluation = new Evaluation(trainCopy);
      m_Evaluation.crossValidateModel(m_BaseClassifier, trainCopy, m_folds, Rnd);
     
      switch (m_evaluationMeasure) {
      case EVAL_DEFAULT:
        repError[i] = m_Evaluation.errorRate();
View Full Code Here

Examples of weka.classifiers.Evaluation

    if (classifier instanceof weka.classifiers.misc.InputMappedClassifier) {
      Instances mappedClassifierHeader =
        ((weka.classifiers.misc.InputMappedClassifier)classifier).
        getModelHeader(new Instances(inst, 0));

      eval = new Evaluation(new Instances(mappedClassifierHeader, 0));

      if (!eval.getHeader().equalHeaders(inst)) {
        // When the InputMappedClassifier is loading a model,
        // we need to make a new dataset that maps the test instances to
        // the structure expected by the mapped classifier - this is only
View Full Code Here

Examples of weka.classifiers.Evaluation

     
      if (ce.getTrainSet().getDataSet() == null ||
          ce.getTrainSet().getDataSet().numInstances() == 0) {
        // we have no training set to estimate majority class
        // or mean of target from
        m_eval = new Evaluation(ce.getTestSet().getDataSet());
        m_PlotInstances = ExplorerDefaults.getClassifierErrorsPlotInstances();
        m_PlotInstances.setInstances(ce.getTestSet().getDataSet());
        m_PlotInstances.setClassifier(ce.getClassifier());
        m_PlotInstances.setClassIndex(ce.getTestSet().getDataSet().classIndex());
        m_PlotInstances.setEvaluation(m_eval);

        m_eval = adjustForInputMappedClassifier(m_eval, ce.getClassifier(),
            ce.getTestSet().getDataSet(), m_PlotInstances);
        m_eval.useNoPriors();
      } else {
        // we can set up with the training set here
        m_eval = new Evaluation(ce.getTrainSet().getDataSet());
        m_PlotInstances = ExplorerDefaults.getClassifierErrorsPlotInstances();
        m_PlotInstances.setInstances(ce.getTrainSet().getDataSet());
        m_PlotInstances.setClassifier(ce.getClassifier());
        m_PlotInstances.setClassIndex(ce.getTestSet().getDataSet().classIndex());
        m_PlotInstances.setEvaluation(m_eval);
View Full Code Here

Examples of weka.classifiers.Evaluation

      throw new Exception("On-demand cost file doesn't exist: " + costFile);
    }
    CostMatrix costMatrix = new CostMatrix(new BufferedReader(
    new FileReader(costFile)));
   
    Evaluation eval = new Evaluation(train, costMatrix);   
    m_Classifier = AbstractClassifier.makeCopy(m_Template);
   
    trainTimeStart = System.currentTimeMillis();
    if(canMeasureCPUTime)
      CPUStartTime = thMonitor.getThreadUserTime(thID);
    m_Classifier.buildClassifier(train);
    if(canMeasureCPUTime)
      trainCPUTimeElapsed = thMonitor.getThreadUserTime(thID) - CPUStartTime;
    trainTimeElapsed = System.currentTimeMillis() - trainTimeStart;
    testTimeStart = System.currentTimeMillis();
    if(canMeasureCPUTime)
      CPUStartTime = thMonitor.getThreadUserTime(thID);
    eval.evaluateModel(m_Classifier, test);
    if(canMeasureCPUTime)
      testCPUTimeElapsed = thMonitor.getThreadUserTime(thID) - CPUStartTime;
    testTimeElapsed = System.currentTimeMillis() - testTimeStart;
    thMonitor = null;
   
    m_result = eval.toSummaryString();
    // The results stored are all per instance -- can be multiplied by the
    // number of instances to get absolute numbers
    int current = 0;
    result[current++] = new Double(train.numInstances());
    result[current++] = new Double(eval.numInstances());
   
    result[current++] = new Double(eval.correct());
    result[current++] = new Double(eval.incorrect());
    result[current++] = new Double(eval.unclassified());
    result[current++] = new Double(eval.pctCorrect());
    result[current++] = new Double(eval.pctIncorrect());
    result[current++] = new Double(eval.pctUnclassified());
    result[current++] = new Double(eval.totalCost());
    result[current++] = new Double(eval.avgCost());
   
    result[current++] = new Double(eval.meanAbsoluteError());
    result[current++] = new Double(eval.rootMeanSquaredError());
    result[current++] = new Double(eval.relativeAbsoluteError());
    result[current++] = new Double(eval.rootRelativeSquaredError());
   
    result[current++] = new Double(eval.SFPriorEntropy());
    result[current++] = new Double(eval.SFSchemeEntropy());
    result[current++] = new Double(eval.SFEntropyGain());
    result[current++] = new Double(eval.SFMeanPriorEntropy());
    result[current++] = new Double(eval.SFMeanSchemeEntropy());
    result[current++] = new Double(eval.SFMeanEntropyGain());
   
    // K&B stats
    result[current++] = new Double(eval.KBInformation());
    result[current++] = new Double(eval.KBMeanInformation());
    result[current++] = new Double(eval.KBRelativeInformation());
   
    // Timing stats
    result[current++] = new Double(trainTimeElapsed / 1000.0);
    result[current++] = new Double(testTimeElapsed / 1000.0);
    if(canMeasureCPUTime) {
View Full Code Here

Examples of weka.classifiers.Evaluation

    boolean canMeasureCPUTime = thMonitor.isThreadCpuTimeSupported();
    if(!thMonitor.isThreadCpuTimeEnabled())
      thMonitor.setThreadCpuTimeEnabled(true);
   
    Object [] result = new Object[overall_length];
    Evaluation eval = new Evaluation(train);
    m_Classifier = AbstractClassifier.makeCopy(m_Template);
    double [] predictions;
    long thID = Thread.currentThread().getId();
    long CPUStartTime=-1, trainCPUTimeElapsed=-1, testCPUTimeElapsed=-1,
         trainTimeStart, trainTimeElapsed, testTimeStart, testTimeElapsed;   

    //training classifier
    trainTimeStart = System.currentTimeMillis();
    if(canMeasureCPUTime)
      CPUStartTime = thMonitor.getThreadUserTime(thID);
    m_Classifier.buildClassifier(train);   
    if(canMeasureCPUTime)
      trainCPUTimeElapsed = thMonitor.getThreadUserTime(thID) - CPUStartTime;
    trainTimeElapsed = System.currentTimeMillis() - trainTimeStart;
   
    //testing classifier
    testTimeStart = System.currentTimeMillis();
    if(canMeasureCPUTime)
      CPUStartTime = thMonitor.getThreadUserTime(thID);
    predictions = eval.evaluateModel(m_Classifier, test);
    if(canMeasureCPUTime)
      testCPUTimeElapsed = thMonitor.getThreadUserTime(thID) - CPUStartTime;
    testTimeElapsed = System.currentTimeMillis() - testTimeStart;
    thMonitor = null;
   
    m_result = eval.toSummaryString();
    // The results stored are all per instance -- can be multiplied by the
    // number of instances to get absolute numbers
    int current = 0;
    result[current++] = new Double(train.numInstances());
    result[current++] = new Double(eval.numInstances());
    result[current++] = new Double(eval.correct());
    result[current++] = new Double(eval.incorrect());
    result[current++] = new Double(eval.unclassified());
    result[current++] = new Double(eval.pctCorrect());
    result[current++] = new Double(eval.pctIncorrect());
    result[current++] = new Double(eval.pctUnclassified());
    result[current++] = new Double(eval.kappa());
   
    result[current++] = new Double(eval.meanAbsoluteError());
    result[current++] = new Double(eval.rootMeanSquaredError());
    result[current++] = new Double(eval.relativeAbsoluteError());
    result[current++] = new Double(eval.rootRelativeSquaredError());
   
    result[current++] = new Double(eval.SFPriorEntropy());
    result[current++] = new Double(eval.SFSchemeEntropy());
    result[current++] = new Double(eval.SFEntropyGain());
    result[current++] = new Double(eval.SFMeanPriorEntropy());
    result[current++] = new Double(eval.SFMeanSchemeEntropy());
    result[current++] = new Double(eval.SFMeanEntropyGain());
   
    // K&B stats
    result[current++] = new Double(eval.KBInformation());
    result[current++] = new Double(eval.KBMeanInformation());
    result[current++] = new Double(eval.KBRelativeInformation());
   
    // IR stats
    result[current++] = new Double(eval.truePositiveRate(m_IRclass));
    result[current++] = new Double(eval.numTruePositives(m_IRclass));
    result[current++] = new Double(eval.falsePositiveRate(m_IRclass));
    result[current++] = new Double(eval.numFalsePositives(m_IRclass));
    result[current++] = new Double(eval.trueNegativeRate(m_IRclass));
    result[current++] = new Double(eval.numTrueNegatives(m_IRclass));
    result[current++] = new Double(eval.falseNegativeRate(m_IRclass));
    result[current++] = new Double(eval.numFalseNegatives(m_IRclass));
    result[current++] = new Double(eval.precision(m_IRclass));
    result[current++] = new Double(eval.recall(m_IRclass));
    result[current++] = new Double(eval.fMeasure(m_IRclass));
    result[current++] = new Double(eval.areaUnderROC(m_IRclass));
   
    // Weighted IR stats
    result[current++] = new Double(eval.weightedTruePositiveRate());
    result[current++] = new Double(eval.weightedFalsePositiveRate());
    result[current++] = new Double(eval.weightedTrueNegativeRate());
    result[current++] = new Double(eval.weightedFalseNegativeRate());
    result[current++] = new Double(eval.weightedPrecision());
    result[current++] = new Double(eval.weightedRecall());
    result[current++] = new Double(eval.weightedFMeasure());
    result[current++] = new Double(eval.weightedAreaUnderROC());
   
    // Unweighted IR stats
    result[current++] = new Double(eval.unweightedMacroFmeasure());
    result[current++] = new Double(eval.unweightedMicroFmeasure());
   
    // Timing stats
    result[current++] = new Double(trainTimeElapsed / 1000.0);
    result[current++] = new Double(testTimeElapsed / 1000.0);
    if(canMeasureCPUTime) {
      result[current++] = new Double((trainCPUTimeElapsed/1000000.0) / 1000.0);
      result[current++] = new Double((testCPUTimeElapsed /1000000.0) / 1000.0);
    }
    else {
      result[current++] = new Double(Utils.missingValue());
      result[current++] = new Double(Utils.missingValue());
    }

    // sizes
    ByteArrayOutputStream bastream = new ByteArrayOutputStream();
    ObjectOutputStream oostream = new ObjectOutputStream(bastream);
    oostream.writeObject(m_Classifier);
    result[current++] = new Double(bastream.size());
    bastream = new ByteArrayOutputStream();
    oostream = new ObjectOutputStream(bastream);
    oostream.writeObject(train);
    result[current++] = new Double(bastream.size());
    bastream = new ByteArrayOutputStream();
    oostream = new ObjectOutputStream(bastream);
    oostream.writeObject(test);
    result[current++] = new Double(bastream.size());
   
    // Prediction interval statistics
    result[current++] = new Double(eval.coverageOfTestCasesByPredictedRegions());
    result[current++] = new Double(eval.sizeOfPredictedRegions());

    // IDs
    if (getAttributeID() >= 0){
      String idsString = "";
      if (test.attribute(m_attID).isNumeric()){
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.