Ignore:
Timestamp:
05/12/16 10:42:44 (9 years ago)
Author:
sherbold
Message:
  • fixed bug in DBSCANFilter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/DBSCANFilter.java

    r86 r92  
    8484        Clustering<Model> clusterer = dbscan.run(db); 
    8585        Relation<DoubleVector> rel = db.getRelation(TypeUtil.DOUBLE_VECTOR_FIELD); 
     86        int firstInternalIndex = rel.iterDBIDs().internalGetIndex(); 
    8687 
    8788        for (Cluster<Model> cluster : clusterer.getAllClusters()) { 
     
    9899                    .valid(); clusterIter.advance()) 
    99100                { 
    100                     int internalIndex = clusterIter.internalGetIndex() - testdata.size() - 1; 
     101                    int internalIndex = clusterIter.internalGetIndex() - testdata.size() - firstInternalIndex; 
    101102                    if (internalIndex >= 0) { 
    102103                        // index belongs to a training instance 
     
    107108            } 
    108109        } 
    109         System.out.println(filteredTraindata.size()); 
    110110 
    111111        return filteredTraindata; 
Note: See TracChangeset for help on using the changeset viewer.