|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,R>
de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm<O,D,MultiResult>
de.lmu.ifi.dbs.elki.algorithm.outlier.LOF<O,D>
O
- the type of DatabaseObjects handled by this Algorithmpublic class LOF<O extends DatabaseObject,D extends NumberDistance<D,?>>
Algorithm to compute density-based local outlier factors in a database based
on a specified parameter K_ID
(-lof.k
).
This implementation diverts from the original LOF publication in that it allows the user to use a different distance function for the reachability distance and neighborhood determination (although the default is to use the same value.)
The k nearest neighbors are determined using the parameter
DistanceBasedAlgorithm.DISTANCE_FUNCTION_ID
, while the reference set used in reachability
distance computation is configured using REACHABILITY_DISTANCE_FUNCTION_ID
.
The original LOF parameter was called "minPts". Since kNN queries in ELKI have slightly
different semantics - exactly k neighbors are returned - we chose to rename the parameter to
K_ID
(-lof.k
) to reflect this difference.
Reference:
M. M. Breunig, H.-P. Kriegel, R. Ng, and J. Sander:
LOF: Identifying Density-Based Local Outliers.
In: Proc. 2nd ACM SIGMOD Int. Conf. on Management of Data (SIGMOD '00), Dallas, TX, 2000.
Field Summary | |
---|---|
(package private) int |
k
Holds the value of K_PARAM . |
static OptionID |
K_ID
OptionID for K_PARAM |
private IntParameter |
K_PARAM
Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOF_SCORE, must be an integer greater than 1. |
static AssociationID<Double> |
LOF_MAX
The association id to associate the maximum LOF_SCORE of an algorithm run. |
static AssociationID<Double> |
LOF_SCORE
The association id to associate the LOF_SCORE of an object for the LOF_SCORE algorithm. |
(package private) boolean |
objectIsInKNN
Include object itself in kNN neighborhood. |
(package private) MaterializeKNNPreprocessor<O,D> |
preprocessor1
Preprocessor Step 1 |
(package private) MaterializeKNNPreprocessor<O,D> |
preprocessor2
Preprocessor Step 2 |
static OptionID |
REACHABILITY_DISTANCE_FUNCTION_ID
OptionID for REACHABILITY_DISTANCE_FUNCTION_PARAM |
private ClassParameter<DistanceFunction<O,D>> |
REACHABILITY_DISTANCE_FUNCTION_PARAM
The distance function to determine the reachability distance between database objects. |
private DistanceFunction<O,D> |
reachabilityDistanceFunction
Holds the instance of the reachability distance function specified by REACHABILITY_DISTANCE_FUNCTION_PARAM . |
(package private) MultiResult |
result
Provides the result of the algorithm. |
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm |
---|
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
LOF()
Provides the Generalized LOF_SCORE algorithm, adding parameters K_PARAM and REACHABILITY_DISTANCE_FUNCTION_PARAM to the
option handler additionally to parameters of super class. |
Method Summary | |
---|---|
Description |
getDescription()
Returns a description of the algorithm. |
MultiResult |
getResult()
Returns the result of the algorithm. |
protected MultiResult |
runInTime(Database<O> database)
Performs the Generalized LOF_SCORE algorithm on the given database. |
List<String> |
setParameters(List<String> args)
Calls the super method and sets additionally the value of the parameter K_PARAM and instantiates reachabilityDistanceFunction
according to the value of parameter
REACHABILITY_DISTANCE_FUNCTION_PARAM . |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm |
---|
getDistanceFunction |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm |
---|
isTime, isVerbose, run, setTime, setVerbose |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
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.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
Field Detail |
---|
public static final OptionID REACHABILITY_DISTANCE_FUNCTION_ID
REACHABILITY_DISTANCE_FUNCTION_PARAM
private final ClassParameter<DistanceFunction<O extends DatabaseObject,D extends NumberDistance<D,?>>> REACHABILITY_DISTANCE_FUNCTION_PARAM
Default value: EuclideanDistanceFunction
Key: -lof.reachdistfunction
public static final AssociationID<Double> LOF_SCORE
public static final AssociationID<Double> LOF_MAX
private DistanceFunction<O extends DatabaseObject,D extends NumberDistance<D,?>> reachabilityDistanceFunction
REACHABILITY_DISTANCE_FUNCTION_PARAM
.
public static final OptionID K_ID
K_PARAM
private final IntParameter K_PARAM
Key: -lof.k
int k
K_PARAM
.
MultiResult result
MaterializeKNNPreprocessor<O extends DatabaseObject,D extends NumberDistance<D,?>> preprocessor1
MaterializeKNNPreprocessor<O extends DatabaseObject,D extends NumberDistance<D,?>> preprocessor2
boolean objectIsInKNN
Constructor Detail |
---|
public LOF()
K_PARAM
and REACHABILITY_DISTANCE_FUNCTION_PARAM
to the
option handler additionally to parameters of super class.
Method Detail |
---|
protected MultiResult runInTime(Database<O> database) throws IllegalStateException
runInTime
in class AbstractAlgorithm<O extends DatabaseObject,MultiResult>
database
- the database to run the algorithm on
IllegalStateException
- if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).public Description getDescription()
Algorithm
public List<String> setParameters(List<String> args) throws ParameterException
K_PARAM
and instantiates reachabilityDistanceFunction
according to the value of parameter
REACHABILITY_DISTANCE_FUNCTION_PARAM
. The remaining parameters are
passed to the reachabilityDistanceFunction
.
setParameters
in interface Parameterizable
setParameters
in class DistanceBasedAlgorithm<O extends DatabaseObject,D extends NumberDistance<D,?>,MultiResult>
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingpublic MultiResult getResult()
Algorithm
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |