Package weka.filters.unsupervised.attribute

Examples of weka.filters.unsupervised.attribute.Remove.useFilter()


        for (int removeNaive_counter = learnPostSel.numAttributes() -2;removeNaive_counter > 1 ; removeNaive_counter--){
            StringBuilder sb = new StringBuilder("");
            sb.append(removeNaive_counter).append("-").append(learnPostSel.numAttributes()-1);
            rm.setAttributeIndices(sb.toString());
            rm.setInputFormat(learnPostSel);
            Instances learnPostSelNaive = rm.useFilter(learnPostSel, rm);

            // TODO: make a chart here.

//            bnCopy = Classifier.makeCopy(bn);
//            bnCopyEv = Classifier.makeCopy(bn);
View Full Code Here


            StringBuilder sb = new StringBuilder("");
            sb.append(winningNaiveRemove).append("-").append(learnPostSel.numAttributes()-1);

            rm.setAttributeIndices(sb.toString());
            rm.setInputFormat(learnPostSel);
            Instances learnPreRandRemove = rm.useFilter(learnPostSel, rm);
            Instances holdPreRandRemove = rm.useFilter(holdPostSel, rm);

            wrep.BGS_midAttributeSelectionNumberOfFeatures = learnPreRandRemove.numAttributes();
           
            ev = new Evaluation(learnPreRandRemove);
View Full Code Here

            sb.append(winningNaiveRemove).append("-").append(learnPostSel.numAttributes()-1);

            rm.setAttributeIndices(sb.toString());
            rm.setInputFormat(learnPostSel);
            Instances learnPreRandRemove = rm.useFilter(learnPostSel, rm);
            Instances holdPreRandRemove = rm.useFilter(holdPostSel, rm);

            wrep.BGS_midAttributeSelectionNumberOfFeatures = learnPreRandRemove.numAttributes();
           
            ev = new Evaluation(learnPreRandRemove);
            ev.crossValidateModel(Classifier.makeCopy(bn), learnPreRandRemove,Math.min(CVfoldNum,learn.numInstances()),new Random(winningNaiveRemove));
View Full Code Here

//                        remString.append(theInt).append(";");
                        rmv.setAttributeIndices(theInt);

                        try{
                            rmv.setInputFormat(learnPostRandRemove);
                            learnPostRandRemove = rmv.useFilter(learnPostRandRemove, rmv);
//                            holdPostRandRemove = rmv.useFilter(holdPostRandRemove, rmv);
                        } catch (Exception ex) {System.out.println(ex.toString());}
                    } // rmv_counter

                     // now the postRandRemove instances are configured
View Full Code Here

                        remString.append(theInt).append(";");
                        rmv.setAttributeIndices(theInt);

                        try{
                            rmv.setInputFormat(learnFinalRound);
                            learnFinalRound = rmv.useFilter(learnFinalRound, rmv);
                            holdFinalRound = rmv.useFilter(holdFinalRound, rmv);
                        } catch (Exception ex) {System.out.println(ex.toString());}
                    } // rmv_counter

                     // now the postRandRemove instances are configured
View Full Code Here

                        rmv.setAttributeIndices(theInt);

                        try{
                            rmv.setInputFormat(learnFinalRound);
                            learnFinalRound = rmv.useFilter(learnFinalRound, rmv);
                            holdFinalRound = rmv.useFilter(holdFinalRound, rmv);
                        } catch (Exception ex) {System.out.println(ex.toString());}
                    } // rmv_counter

                     // now the postRandRemove instances are configured
View Full Code Here

            if (att_counter != classIndex){

                // Remove all attributes but the current attribute and the class variable
                rm.setAttributeIndicesArray(new int[] {att_counter,classIndex});
                rm.setInputFormat(data);
                setOf2 = rm.useFilter(data, rm);

               

                bnCopy = Classifier.makeCopy(bn);
                ev = new Evaluation(setOf2);
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.