~ubuntu-branches/ubuntu/vivid/elki/vivid

« back to all changes in this revision

Viewing changes to src/de/lmu/ifi/dbs/elki/algorithm/outlier/AbstractDBOutlier.java

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2012-12-14 20:45:15 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20121214204515-4m0d0er9ivtu5w9d
Tags: 0.5.5-1
New upstream release: 0.5.5 interim release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import de.lmu.ifi.dbs.elki.data.type.TypeInformation;
28
28
import de.lmu.ifi.dbs.elki.data.type.TypeUtil;
29
29
import de.lmu.ifi.dbs.elki.database.Database;
30
 
import de.lmu.ifi.dbs.elki.database.datastore.DataStore;
 
30
import de.lmu.ifi.dbs.elki.database.datastore.DoubleDataStore;
31
31
import de.lmu.ifi.dbs.elki.database.relation.MaterializedRelation;
32
32
import de.lmu.ifi.dbs.elki.database.relation.Relation;
33
33
import de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction;
56
56
  /**
57
57
   * Parameter to specify the size of the D-neighborhood
58
58
   */
59
 
  public static final OptionID D_ID = OptionID.getOrCreateOptionID("dbod.d", "size of the D-neighborhood");
 
59
  public static final OptionID D_ID = new OptionID("dbod.d", "size of the D-neighborhood");
60
60
 
61
61
  /**
62
62
   * Holds the value of {@link #D_ID}.
83
83
   */
84
84
  public OutlierResult run(Database database, Relation<O> relation) {
85
85
    // Run the actual score process
86
 
    DataStore<Double> dbodscore = computeOutlierScores(database, relation, d);
 
86
    DoubleDataStore dbodscore = computeOutlierScores(database, relation, d);
87
87
 
88
88
    // Build result representation.
89
89
    Relation<Double> scoreResult = new MaterializedRelation<Double>("Density-Based Outlier Detection", "db-outlier", TypeUtil.DOUBLE, dbodscore, relation.getDBIDs());
99
99
   * @param d distance
100
100
   * @return computed scores
101
101
   */
102
 
  protected abstract DataStore<Double> computeOutlierScores(Database database, Relation<O> relation, D d);
 
102
  protected abstract DoubleDataStore computeOutlierScores(Database database, Relation<O> relation, D d);
103
103
 
104
104
  @Override
105
105
  public TypeInformation[] getInputTypeRestriction() {
113
113
   * 
114
114
   * @apiviz.exclude
115
115
   */
116
 
  public static abstract class Parameterizer<O, D extends Distance<D>> extends AbstractDistanceBasedAlgorithm.Parameterizer<O, D> {
 
116
  public abstract static class Parameterizer<O, D extends Distance<D>> extends AbstractDistanceBasedAlgorithm.Parameterizer<O, D> {
117
117
    /**
118
118
     * Query radius
119
119
     */