knn
Class ANN

java.lang.Object
  |
  +--knn.ANN

public class ANN
extends java.lang.Object

API for interface to ANN (Approximate Nearest Neighbor) classification. Copyright (c) 1999-2004, Michael Abramoff. All rights reserved.


Constructor Summary
ANN()
           
 
Method Summary
(package private) static void ()
          Load the C++ ANN API library ann_java.dll, which should be in the mdasources ImageJ directory.
static int annkEstimates(float[] classes, float[][] querypts, int k, int nrclasses, double epsilon, float[] estimates)
           
static int annkPriSearch(float[] querypt, int k, int[] indices, float[] distances, double epsilon)
           
static int bdtree(float[][] datapts, int dim)
          Train a ANN classifier (bd_tree).
static float[] estimate(float[][] querypts, float[] trueclasses, int nrclasses, int k, double epsilon)
          Determine the ANN classification for an array of feature vectors.
static int getvote(float[] classes, int nrclasses)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ANN

public ANN()
Method Detail

bdtree

public static int bdtree(float[][] datapts,
                         int dim)
Train a ANN classifier (bd_tree).

getvote

public static int getvote(float[] classes,
                          int nrclasses)

annkPriSearch

public static int annkPriSearch(float[] querypt,
                                int k,
                                int[] indices,
                                float[] distances,
                                double epsilon)

annkEstimates

public static int annkEstimates(float[] classes,
                                float[][] querypts,
                                int k,
                                int nrclasses,
                                double epsilon,
                                float[] estimates)

static void ()
Load the C++ ANN API library ann_java.dll, which should be in the mdasources ImageJ directory.

estimate

public static float[] estimate(float[][] querypts,
                               float[] trueclasses,
                               int nrclasses,
                               int k,
                               double epsilon)
                        throws java.lang.Exception
Determine the ANN classification for an array of feature vectors. The classification for the ANN tree is in trueclasses.
Parameters:
querypts - the points to be queried.
trueclasses - the true classification for the current ANN training set (not for the querypts!)