Package weka.filters.unsupervised.attribute

Examples of weka.filters.unsupervised.attribute.Reorder


                            int[] shuff_withClass = new int[filteredInstances.numAttributes()];
                            for (int jj = 0; jj < filteredInstances.numAttributes()-1; jj++){shuff_noClass[jj]=String.valueOf(jj);}
                            if (i!=0){Collections.shuffle(Arrays.asList(shuff_noClass), new Random(i));}
                            for (int kk = 0; kk < filteredInstances.numAttributes()-1; kk++) {shuff_withClass[kk]=Integer.valueOf(shuff_noClass[kk]);AttOrder.append((1+shuff_withClass[kk])).append(";");}
                            shuff_withClass[filteredInstances.numAttributes()-1] = filteredInstances.numAttributes()-1; AttOrder.append("last");
                            Reorder reo = new Reorder();
                            reo.setAttributeIndicesArray(shuff_withClass);
                            Instances shuffledInstances;
                            reo.setInputFormat(filteredInstances);
                            shuffledInstances = Filter.useFilter(filteredInstances, reo);
                            validShuff = Filter.useFilter(validationSet, reo);

                            double avgRoc = 0;
                            double avgAcc = 0;
View Full Code Here

TOP

Related Classes of weka.filters.unsupervised.attribute.Reorder

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.