Ignore:
Timestamp:
05/17/16 13:39:16 (8 years ago)
Author:
sherbold
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/dataprocessing/TopMetricFilter.java

    r86 r102  
    7575    private void determineTopKAttributes(Instances testdata, SetUniqueList<Instances> traindataSet) throws Exception { 
    7676        Integer[] counts = new Integer[traindataSet.get(0).numAttributes()-1]; 
     77        IntStream.range(0,counts.length).forEach(val -> counts[val] = 0); 
    7778        for( Instances traindata : traindataSet ) { 
    7879            J48 decisionTree = new J48(); 
     
    8283                if(j!=traindata.classIndex()){ 
    8384                    if( decisionTree.toString().contains(traindata.attribute(j).name()) ) { 
    84                         if( counts[k]==null ){ 
    85                             counts[k] = 1; 
    86                         } else { 
    87                             counts[k] = counts[k]+1; 
    88                         } 
     85                        counts[k] = counts[k]+1; 
    8986                    } 
    9087                    k++; 
Note: See TracChangeset for help on using the changeset viewer.