Package weka.classifiers

Examples of weka.classifiers.Evaluation.pctCorrect()


    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());
   
View Full Code Here


    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());
View Full Code Here

//            bnCopyEv = Classifier.makeCopy(bn);
            ev = new Evaluation(learnPostSelNaive);
            ev.crossValidateModel(Classifier.makeCopy(bn), learnPostSelNaive,Math.min(CVfoldNum,learn.numInstances()),new Random(removeNaive_counter));
//            bnCopy.buildClassifier(learnPostSelNaive);   //this only gives the bayes score.. is that interesting?

            accuracyRes[removeNaive_counter] = ev.pctCorrect();
            ROCRes[removeNaive_counter] = ev.weightedAreaUnderROC();
        }

        wrep.BGS_multivariate_ROC_ACC = new double[2][learn.numAttributes()-3];
View Full Code Here

           
            ev = new Evaluation(learnPreRandRemove);
            ev.crossValidateModel(Classifier.makeCopy(bn), learnPreRandRemove,Math.min(CVfoldNum,learn.numInstances()),new Random(winningNaiveRemove));
//            bnCopy.buildClassifier(learnPostSelNaive);   //this only gives the bayes score.. is that interesting?

            double midAttACC = ev.pctCorrect();
            double midAttROC = ev.weightedAreaUnderROC();

            wrep.BGS_midAttributeACC = midAttACC;
            wrep.BGS_midAttributeROC = midAttROC;
View Full Code Here

                    Classifier yBNcopy = Classifier.makeCopy(yBN);

                    Evaluation evPostRand = new Evaluation(learnPostRandRemove);
                    evPostRand.crossValidateModel(yBNcopy, learnPostRandRemove,Math.min(CVfoldNum,learn.numInstances()),new Random(winningNaiveRemove));

                    accPostRandRemove[numToRem_counter][iteration_counter] = evPostRand.pctCorrect();
                    rocPostRandRemove[numToRem_counter][iteration_counter] = evPostRand.weightedAreaUnderROC();
//                    if ((numToRem_counter % 100)==0){System.out.print(numToRem_counter);System.out.println("RandomRemovalLoop: ".concat(String.valueOf(evPostRand.weightedAreaUnderROC())));}
                }
            }
View Full Code Here

                    Classifier zBNcopy = Classifier.makeCopy(zBN);

                    Evaluation evFinalRound = new Evaluation(learnFinalRound);
                    evFinalRound.crossValidateModel(zBNcopy, learnFinalRound,Math.min(CVfoldNum,learn.numInstances()),new Random(winningNaiveRemove));

                    accFinalRound[winningPostRandRemove] = evFinalRound.pctCorrect();
                    rocFinalRound[winningPostRandRemove] = evFinalRound.weightedAreaUnderROC();

                    if (evFinalRound.weightedAreaUnderROC() > rocFinal){
                        learnFinal = learnFinalRound;
                        holdFinal = holdFinalRound;
View Full Code Here

                    if (evFinalRound.weightedAreaUnderROC() > rocFinal){
                        learnFinal = learnFinalRound;
                        holdFinal = holdFinalRound;
                        rocFinal = evFinalRound.weightedAreaUnderROC();
                        accFinal = evFinalRound.pctCorrect();
                        wrep.BGS_postAttributeACC = accFinal;
                        wrep.BGS_postAttributeROC = rocFinal;
                    } else if (evFinalRound.weightedAreaUnderROC() == rocFinal){
                        if (evFinalRound.pctCorrect() > accFinal){
                            learnFinal = learnFinalRound;
View Full Code Here

                        rocFinal = evFinalRound.weightedAreaUnderROC();
                        accFinal = evFinalRound.pctCorrect();
                        wrep.BGS_postAttributeACC = accFinal;
                        wrep.BGS_postAttributeROC = rocFinal;
                    } else if (evFinalRound.weightedAreaUnderROC() == rocFinal){
                        if (evFinalRound.pctCorrect() > accFinal){
                            learnFinal = learnFinalRound;
                            holdFinal = holdFinalRound;
                            rocFinal = evFinalRound.weightedAreaUnderROC();
                            accFinal = evFinalRound.pctCorrect();
                            wrep.BGS_postAttributeACC = accFinal;
View Full Code Here

                    } else if (evFinalRound.weightedAreaUnderROC() == rocFinal){
                        if (evFinalRound.pctCorrect() > accFinal){
                            learnFinal = learnFinalRound;
                            holdFinal = holdFinalRound;
                            rocFinal = evFinalRound.weightedAreaUnderROC();
                            accFinal = evFinalRound.pctCorrect();
                            wrep.BGS_postAttributeACC = accFinal;
                            wrep.BGS_postAttributeROC = rocFinal;
                        }
                    }
                }
View Full Code Here

                            Evaluation eval = new Evaluation(WinningShuffle_Learn);
                            eval.evaluateModel(Classifier.makeCopy(cpyCls[bestIndex]), WinningShuffle_Hold);

                            //////Send to another sub for report generating
//                            generateReport(learn, hold, WinningShuffle_Learn, WinningShuffle_Hold, cpyCls[bestIndex], eval);
                            PhaseIIwrep.res_pctCorrect_valid = eval.pctCorrect();
                            PhaseIIwrep.res_ROC_valid = eval.weightedAreaUnderROC();


                            ////////// Output the results
//                            txtForOutput.append(reportingCls (cpyCls[bestIndex])).append("\n"); !!!
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.