Package weka.classifiers.evaluation

Examples of weka.classifiers.evaluation.ThresholdCurve


 
  private void drawTheROC(Evaluation eval){
    // load data

    // generate curve
    ThresholdCurve tc = new ThresholdCurve();
    int classIndex = 0;
    Instances curve = tc.getCurve(eval.predictions(), classIndex);

    // plot curve
    ThresholdVisualizePanel tvp = new ThresholdVisualizePanel();
    tvp.setROCString("(Area under ROC = " +
  Utils.doubleToString(ThresholdCurve.getROCArea(curve), 4) + ")");
View Full Code Here


        PhaseIwrep.PII_maxParents = ((K2) ((BayesNet) currentClassifier).getSearchAlgorithm()).getMaxNrOfParents();

        PhaseIwrep.res_graph_xml = ((BayesNet) eval_clas).graph();


        ThresholdCurve tc = new ThresholdCurve();
        Instances tcEachClass[] = new Instances[randData.numClasses()];
        Instances tcResult2 = tc.getCurve(eval_validationE.predictions(),0);
        tcResult2.delete();
        double[] attValues = new double[tcResult2.numAttributes()];
        for (int i = 0; i < attValues.length; i++) {attValues[i] = 1;}
        tcResult2.add(new Instance(1, attValues)); // adds the point 1,1
        for (int i = 0; i < attValues.length; i++) {attValues[i] = 0;}

        try{
       
//        vmc.setVisible(true);

//        BufferedImage bi = new BufferedImage(300, 300, BufferedImage.TYPE_INT_RGB);
//        ImageIO.write(bi, "png",new File("C:/users/aaron/desktop/cool44.png"));
//                            jf.setVisible(true);
        }
        catch (Exception ex)
        {
            System.out.println(ex.toString());
        }

        //        PhaseIwrep.res_ROC_curves = new double[randData.numClasses()][2][tcEachClass.numInstances()];
            Plot2D myPlot2Db = new Plot2D();
            tc = new ThresholdCurve();
           
        for (int class_index =0 ; class_index< randData.numClasses();class_index++){
            tcEachClass[class_index] = tc.getCurve(eval_validationE.predictions(),class_index); // Uses Class 0-end
        }
        
           
        double[][] CL4 = new double[tcEachClass[0].numInstances()][randData.numClasses()];
        double[][] CL5 = new double[tcEachClass[0].numInstances()][randData.numClasses()];
View Full Code Here

TOP

Related Classes of weka.classifiers.evaluation.ThresholdCurve

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.