Package weka.clusterers

Examples of weka.clusterers.ClusterEvaluation.evaluateClusterer()


      ClusterEvaluation eval = new ClusterEvaluation();
      eval.setClusterer(clusterer);
      switch (testMode) {
        case 3: case 5: // Test on training
        m_Log.statusMessage("Clustering training data...");
        eval.evaluateClusterer(trainInst);
        plotInstances.setInstances(inst);
        plotInstances.setClusterEvaluation(eval);
        outBuff.append("=== Model and evaluation on training set ===\n\n");
        break;
View Full Code Here


        Instances test = new Instances(trainInst, trainSize, testSize);
        Instances testVis = new Instances(inst, trainSize, testSize);
        m_Log.statusMessage("Building model on training split...");
        clusterer.buildClusterer(train);
        m_Log.statusMessage("Evaluating on test split...");
        eval.evaluateClusterer(test);
        plotInstances.setInstances(testVis);
        plotInstances.setClusterEvaluation(eval);
        outBuff.append("=== Model and evaluation on test split ===\n");
        break;
   
View Full Code Here

        m_Log.statusMessage("Evaluating on test data...");
        Instances userTestT = new Instances(userTest);
        if (!m_ignoreKeyList.isSelectionEmpty()) {
    userTestT = removeIgnoreCols(userTestT);
        }
        eval.evaluateClusterer(userTestT);
        plotInstances.setInstances(userTest);
        plotInstances.setClusterEvaluation(eval);
        outBuff.append("=== Model and evaluation on test set ===\n");
        break;
View Full Code Here

              Instances userTestT = new Instances(userTest);
              if (ignoredAtts != null) {
                userTestT = removeIgnoreCols(userTestT, ignoredAtts);
              }

              eval.evaluateClusterer(userTestT);
     
              plotInstances.setClusterEvaluation(eval);
              plotInstances.setInstances(userTest);
              plotInstances.setUp();
View Full Code Here

    m_clusterer.buildClusterer(train);
    double numClusters = m_clusterer.numberOfClusters();
    eval.setClusterer(m_clusterer);
    long trainTimeElapsed = System.currentTimeMillis() - trainTimeStart;
    long testTimeStart = System.currentTimeMillis();
    eval.evaluateClusterer(test);
    long testTimeElapsed = System.currentTimeMillis() - testTimeStart;
    //    m_result = eval.toSummaryString();

    // The results stored are all per instance -- can be multiplied by the
    // number of instances to get absolute numbers
View Full Code Here

      ClusterEvaluation eval = new ClusterEvaluation();
      eval.setClusterer(clusterer);
      switch (testMode) {
        case 3: case 5: // Test on training
        m_Log.statusMessage(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_Log_StatusMessage_Third"));
        eval.evaluateClusterer(trainInst, "", false);
        predData = setUpVisualizableInstances(inst,eval);
        outBuff.append(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_OutBuffer_Text_TwentySecond"));
        break;

        case 2: // Percent split
View Full Code Here

        trainTimeStart = System.currentTimeMillis();
        clusterer.buildClusterer(train);
        trainTimeElapsed = System.currentTimeMillis() - trainTimeStart;
       
        m_Log.statusMessage(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_Log_StatusMessage_Sixth"));
        eval.evaluateClusterer(test, "", false);
        predData = setUpVisualizableInstances(testVis, eval);
        outBuff.append(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_OutBuffer_Text_TwentyThird"));
        outBuff.append(clusterer.toString() + '\n');
              outBuff.append(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_OutBuffer_Text_TimeTakenPercentage") +
                  Utils.doubleToString(trainTimeElapsed / 1000.0,2)
View Full Code Here

        m_Log.statusMessage(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_Log_StatusMessage_Seventh"));
        Instances userTestT = new Instances(userTest);
        if (!m_ignoreKeyList.isSelectionEmpty()) {
    userTestT = removeIgnoreCols(userTestT);
        }
        eval.evaluateClusterer(userTestT, "", false);
        predData = setUpVisualizableInstances(userTest, eval);
        outBuff.append(Messages.getInstance().getString("ClustererPanel_StartClusterer_Run_OutBuffer_Text_TwentyFourth"));
        break;

        default:
View Full Code Here

              Instances userTestT = new Instances(userTest);
              if (ignoredAtts != null) {
                userTestT = removeIgnoreCols(userTestT, ignoredAtts);
              }

              eval.evaluateClusterer(userTestT);
     
              predData = setUpVisualizableInstances(userTest, eval);

              outBuff.append(Messages.getInstance().getString("ClustererPanel_ReEvaluateModel_Run_OutBuffer_Text_First"));
              outBuff.append(Messages.getInstance().getString("ClustererPanel_ReEvaluateModel_Run_OutBuffer_Text_Second"))
View Full Code Here

      m_ActualClusterer.buildClusterer(clusterData);

      // evaluate clusterer on training set
      eval = new ClusterEvaluation();
      eval.setClusterer(m_ActualClusterer);
      eval.evaluateClusterer(clusterData);
      clusterAssignments = eval.getClusterAssignments();

      // determine classes-to-clusters mapping
      counts        = new int [eval.getNumClusters()][m_OriginalHeader.numClasses()];
      clusterTotals = new int[eval.getNumClusters()];
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.