|
|
|||||||||||||||||||||
| 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.preprocessing.MaterializeKNNPreprocessor<O,D>
O - the type of database objects the preprocessor can be applied toD - the type of distance the used distance function will return@Title(value="Materialize kNN Neighborhood preprocessor") @Description(value="Materializes the k nearest neighbors of objects of a database.") public class MaterializeKNNPreprocessor<O extends DatabaseObject,D extends Distance<D>>
A preprocessor for annotation of the k nearest neighbors (and their
distances) to each database object.
Used for example by LOF.
| Field Summary | |
|---|---|
static OptionID |
DISTANCE_FUNCTION_ID
OptionID for DISTANCE_FUNCTION_PARAM |
ObjectParameter<DistanceFunction<O,D>> |
DISTANCE_FUNCTION_PARAM
Parameter to indicate the distance function to be used to ascertain the nearest neighbors. |
protected DistanceFunction<O,D> |
distanceFunction
Hold the distance function to be used. |
protected 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 materialized. must be an integer greater than 1. |
protected HashMap<Integer,List<DistanceResultPair<D>>> |
materialized
Materialized neighborhood |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug, logger |
| Constructor Summary | |
|---|---|
MaterializeKNNPreprocessor(Parameterization config)
Constructor, adhering to Parameterizable |
|
| Method Summary | |
|---|---|
HashMap<Integer,List<DistanceResultPair<D>>> |
getMaterialized()
Materialize a neighborhood. |
void |
run(Database<O> database,
boolean verbose,
boolean time)
Annotates the nearest neighbors based on the values of k and
distanceFunction to each database object. |
| 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 |
| Field Detail |
|---|
public static final OptionID K_ID
K_PARAM
private final IntParameter K_PARAM
Key: -materialize.k
protected int k
K_PARAM.
public static final OptionID DISTANCE_FUNCTION_ID
DISTANCE_FUNCTION_PARAM
public final ObjectParameter<DistanceFunction<O extends DatabaseObject,D extends Distance<D>>> DISTANCE_FUNCTION_PARAM
Default value: EuclideanDistanceFunction
Key: materialize.distance
protected DistanceFunction<O extends DatabaseObject,D extends Distance<D>> distanceFunction
protected HashMap<Integer,List<DistanceResultPair<D extends Distance<D>>>> materialized
| Constructor Detail |
|---|
public MaterializeKNNPreprocessor(Parameterization config)
Parameterizable
config - Parameterization| Method Detail |
|---|
public void run(Database<O> database,
boolean verbose,
boolean time)
k and
distanceFunction to each database object.
run in interface Preprocessor<O extends DatabaseObject>database - the database for which the preprocessing is performedverbose - flag to allow verbose messages while performing the
algorithmtime - flag to request output of performance timepublic HashMap<Integer,List<DistanceResultPair<D>>> getMaterialized()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||