biosim.core.util
Class FastKNN

java.lang.Object
  extended by biosim.core.util.FastKNN

public class FastKNN
extends java.lang.Object


Constructor Summary
FastKNN(int sample_dim, int class_dim)
           
 
Method Summary
 void add(double[] sample, double[] class_vec)
           
 void add(double[] sample, double[] class_vec, double weight)
           
static void main(java.lang.String[] args)
           
 int numSamples()
           
 void printEverything()
           
 void query(double[] sample, double[][] neighbor_classes)
           
 void query(double[] sample, double[][] neighbor_classes, double[] weight_vec, double[][] neighbor_values)
           
 void setEps(double eps)
           
 void setFeatureWeights(double[] f_w)
           
 void sigmaNormalize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastKNN

public FastKNN(int sample_dim,
               int class_dim)
Method Detail

add

public void add(double[] sample,
                double[] class_vec)

add

public void add(double[] sample,
                double[] class_vec,
                double weight)

numSamples

public int numSamples()

setEps

public void setEps(double eps)

setFeatureWeights

public void setFeatureWeights(double[] f_w)

sigmaNormalize

public void sigmaNormalize()

query

public void query(double[] sample,
                  double[][] neighbor_classes)

query

public void query(double[] sample,
                  double[][] neighbor_classes,
                  double[] weight_vec,
                  double[][] neighbor_values)

printEverything

public void printEverything()

main

public static void main(java.lang.String[] args)