de.lmu.ifi.dbs.elki.application.visualization
Class KNNExplorer<O extends NumberVector<?,?>,D extends NumberDistance<D,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.application.AbstractApplication
      extended by de.lmu.ifi.dbs.elki.application.visualization.KNNExplorer<O,D>
Type Parameters:
O - Object type
D - Distance type
All Implemented Interfaces:
InspectionUtilFrequentlyScanned, Parameterizable

@Reference(authors="E. Achtert, T. Bernecker, H.-P. Kriegel, E. Schubert, A. Zimek",
           title="ELKI in Time: ELKI 0.2 for the Performance Evaluation of Distance Measures for Time Series",
           booktitle="Proceedings of the 11th International Symposium on Spatial and Temporal Databases (SSTD), Aalborg, Denmark, 2009",
           url="http://dx.doi.org/10.1007/978-3-642-02982-0_35")
public class KNNExplorer<O extends NumberVector<?,?>,D extends NumberDistance<D,?>>
extends AbstractApplication

User application to explore the k Nearest Neighbors for a given data set and distance function. When selecting one or more data entries, the nearest neighbors each are determined and visualized.

Reference:
Elke Achtert, Thomas Bernecker, Hans-Peter Kriegel, Erich Schubert, Arthur Zimek:
ELKI in Time: ELKI 0.2 for the Performance Evaluation of Distance Measures for Time Series.
In Proc. 11th International Symposium on Spatial and Temporal Databases (SSTD 2009), Aalborg, Denmark, 2009.

Usage example:

Main invocation:
java -cp elki.jar de.lmu.ifi.dbs.elki.application.visualization.KNNExplorer

The application supports the usual parameterization, in particular parameters -dbc.in and -explorer.distancefunction to select an input file and the distance function to explore.


Nested Class Summary
(package private)  class KNNExplorer.ExplorerWindow
          Main window of KNN Explorer.
static class KNNExplorer.Parameterizer<O extends NumberVector<?,?>,D extends NumberDistance<D,?>>
          Parameterization class.
 
Field Summary
private  Database database
          Holds the database connection to have the algorithm run with.
static OptionID DISTANCE_FUNCTION_ID
          Parameter to specify the distance function to determine the distance between database objects, must extend DistanceFunction.
private  DistanceFunction<O,D> distanceFunction
          Holds the instance of the distance function specified by DISTANCE_FUNCTION_ID.
 
Fields inherited from class de.lmu.ifi.dbs.elki.application.AbstractApplication
INFORMATION, INPUT_ID, OUTPUT_ID, STATIC_LOGGER
 
Constructor Summary
KNNExplorer(boolean verbose, Database database, DistanceFunction<O,D> distanceFunction)
          Constructor.
 
Method Summary
static void main(String[] args)
          Main method to run this application.
 void run()
          Runs the application.
 
Methods inherited from class de.lmu.ifi.dbs.elki.application.AbstractApplication
isVerbose, printErrorMessage, runCLIApplication, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISTANCE_FUNCTION_ID

public static final OptionID DISTANCE_FUNCTION_ID
Parameter to specify the distance function to determine the distance between database objects, must extend DistanceFunction.

Key: -explorer.distancefunction

Default value: EuclideanDistanceFunction


database

private Database database
Holds the database connection to have the algorithm run with.


distanceFunction

private DistanceFunction<O extends NumberVector<?,?>,D extends NumberDistance<D,?>> distanceFunction
Holds the instance of the distance function specified by DISTANCE_FUNCTION_ID.

Constructor Detail

KNNExplorer

public KNNExplorer(boolean verbose,
                   Database database,
                   DistanceFunction<O,D> distanceFunction)
Constructor.

Parameters:
verbose - Verbose flag
database - Database
distanceFunction - Distance function
Method Detail

run

public void run()
         throws IllegalStateException
Description copied from class: AbstractApplication
Runs the application.

Specified by:
run in class AbstractApplication
Throws:
IllegalStateException

main

public static void main(String[] args)
Main method to run this application.

Parameters:
args - the arguments to run this application

Release 0.4.0 (2011-09-20_1324)