de.lmu.ifi.dbs.elki.algorithm.outlier.spatial.neighborhood.weighted
Class LinearWeightedExtendedNeighborhood

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.outlier.spatial.neighborhood.weighted.LinearWeightedExtendedNeighborhood
All Implemented Interfaces:
WeightedNeighborSetPredicate

public class LinearWeightedExtendedNeighborhood
extends Object
implements WeightedNeighborSetPredicate

Neighborhood obtained by computing the k-fold closure of an existing neighborhood. Objects are weighted linearly by their distance: the object itself has a weight of 1 and this decreases linearly to 1/(n+1) for the nth-step neighbors. TODO: make actual weighting parameterizable?


Nested Class Summary
static class LinearWeightedExtendedNeighborhood.Factory<O>
          Factory class.
 
Field Summary
private  NeighborSetPredicate inner
          The data store to use
private  int steps
          The number of steps to extend to.
 
Constructor Summary
LinearWeightedExtendedNeighborhood(NeighborSetPredicate inner, int steps)
          Constructor.
 
Method Summary
private  double computeWeight(int tsteps)
          Compute the weight from the number of steps needed.
 Collection<DoubleObjPair<DBID>> getWeightedNeighbors(DBID reference)
          Get the neighbors of a reference object for DBSCAN.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inner

private NeighborSetPredicate inner
The data store to use


steps

private int steps
The number of steps to extend to.

Constructor Detail

LinearWeightedExtendedNeighborhood

public LinearWeightedExtendedNeighborhood(NeighborSetPredicate inner,
                                          int steps)
Constructor.

Parameters:
inner - Inner neighborhood
steps - Number of steps to expand
Method Detail

computeWeight

private double computeWeight(int tsteps)
Compute the weight from the number of steps needed.

Parameters:
tsteps - steps to target
Returns:
weight

getWeightedNeighbors

public Collection<DoubleObjPair<DBID>> getWeightedNeighbors(DBID reference)
Description copied from interface: WeightedNeighborSetPredicate
Get the neighbors of a reference object for DBSCAN.

Specified by:
getWeightedNeighbors in interface WeightedNeighborSetPredicate
Parameters:
reference - Reference object
Returns:
Weighted Neighborhood

Release 0.4.0 (2011-09-20_1324)