Quantcast
Channel: Pentaho Community Forums - BI Platform
Viewing all articles
Browse latest Browse all 2893

PROGRAMMING BAGGING IN JAVA(NetBeans)

$
0
0
Hi guys,

I have tried to programme bagging in java netbeans but the base
classifier is running in the default which is decision stump tree.
What could possibly cause this error?
Following is the necessary code:
Code:


String[]options;
        options = new String[6];
        options[0] = "100";
        options[1] = "false";
        options[2] = "1";
        options [3] = "10";
        options[4]  = "false";
        options[5] = "weka.classifiers.trees.NBTree";
        Bagging classifierB = new Bagging();
        double [] [] arrayC;
        arrayC = new double[2][2];
        Random rand = new Random(1);  // using seed = 1
        int folds = 10;
        try {
            textareaClassification.read(new FileReader(file.getAbsolutePath()), null);
        } catch ( IOException ex) {
            Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        try {
            classifierB.setOptions(options);
        } catch (Exception ex) {
            Logger.getLogger(mainformui.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            classifierB.buildClassifier(result);
        } catch (Exception ex) {
            Logger.getLogger(mainformui.class.getName()).log(Level.SEVERE, null, ex);
        }


Viewing all articles
Browse latest Browse all 2893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>