de.lmu.ifi.dbs.elki.algorithm.clustering
Class OPTICSXi<N extends NumberDistance<N,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<Clustering<OPTICSModel>>
      extended by de.lmu.ifi.dbs.elki.algorithm.clustering.OPTICSXi<N>
Type Parameters:
N - Number distance used by OPTICS
All Implemented Interfaces:
Algorithm, ClusteringAlgorithm<Clustering<OPTICSModel>>, InspectionUtilFrequentlyScanned, Parameterizable

public class OPTICSXi<N extends NumberDistance<N,?>>
extends AbstractAlgorithm<Clustering<OPTICSModel>>
implements ClusteringAlgorithm<Clustering<OPTICSModel>>

Class to handle OPTICS Xi extraction.


Nested Class Summary
static class OPTICSXi.Parameterizer<D extends NumberDistance<D,?>>
          Parameterization class.
static class OPTICSXi.SteepArea
          Data structure to represent a steep-down-area for the xi method.
static class OPTICSXi.SteepAreaResult
          Result containing the chi-steep areas.
static class OPTICSXi.SteepDownArea
          Data structure to represent a steep-down-area for the xi method.
private static class OPTICSXi.SteepScanPosition<N extends NumberDistance<N,?>>
          Position when scanning for steep areas
static class OPTICSXi.SteepUpArea
          Data structure to represent a steep-down-area for the xi method.
 
Field Summary
private static Logging logger
          The logger for this class.
(package private)  OPTICSTypeAlgorithm<N> optics
          The actual algorithm we use.
(package private)  double xi
          Xi parameter
static OptionID XI_ID
          Parameter to specify the steepness threshold.
static OptionID XIALG_ID
          Parameter to specify the actual OPTICS algorithm to use.
 
Constructor Summary
OPTICSXi(OPTICSTypeAlgorithm<N> optics, double xi)
          Constructor.
 
Method Summary
private  Clustering<OPTICSModel> extractClusters(ClusterOrderResult<N> clusterOrderResult, Relation<?> relation, double ixi, int minpts)
          Extract clusters from a cluster order result.
 TypeInformation[] getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
protected  Logging getLogger()
          Get the (STATIC) logger for this class.
 Clustering<OPTICSModel> run(Database database, Relation<?> relation)
           
private static void updateFilterSDASet(double mib, List<OPTICSXi.SteepDownArea> sdaset, double ixi)
          Update the mib values of SteepDownAreas, and remove obsolete areas.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
makeParameterDistanceFunction, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.algorithm.clustering.ClusteringAlgorithm
run
 

Field Detail

logger

private static final Logging logger
The logger for this class.


XIALG_ID

public static final OptionID XIALG_ID
Parameter to specify the actual OPTICS algorithm to use.


XI_ID

public static final OptionID XI_ID
Parameter to specify the steepness threshold.


optics

OPTICSTypeAlgorithm<N extends NumberDistance<N,?>> optics
The actual algorithm we use.


xi

double xi
Xi parameter

Constructor Detail

OPTICSXi

public OPTICSXi(OPTICSTypeAlgorithm<N> optics,
                double xi)
Constructor.

Parameters:
optics - OPTICS algorithm to use
xi - Xi value
Method Detail

run

public Clustering<OPTICSModel> run(Database database,
                                   Relation<?> relation)

extractClusters

private Clustering<OPTICSModel> extractClusters(ClusterOrderResult<N> clusterOrderResult,
                                                Relation<?> relation,
                                                double ixi,
                                                int minpts)
Extract clusters from a cluster order result.

Parameters:
clusterOrderResult - cluster order result
relation - Relation
ixi - Parameter 1 - Xi
minpts - Parameter minPts

updateFilterSDASet

private static void updateFilterSDASet(double mib,
                                       List<OPTICSXi.SteepDownArea> sdaset,
                                       double ixi)
Update the mib values of SteepDownAreas, and remove obsolete areas.

Parameters:
mib - Maximum in-between value
sdaset - Set of steep down areas.

getInputTypeRestriction

public TypeInformation[] getInputTypeRestriction()
Description copied from class: AbstractAlgorithm
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface Algorithm
Specified by:
getInputTypeRestriction in class AbstractAlgorithm<Clustering<OPTICSModel>>
Returns:
Type restriction

getLogger

protected Logging getLogger()
Description copied from class: AbstractAlgorithm
Get the (STATIC) logger for this class.

Specified by:
getLogger in class AbstractAlgorithm<Clustering<OPTICSModel>>
Returns:
the static logger

Release 0.4.0 (2011-09-20_1324)