bijnum
Class BIJmulticlass

java.lang.Object
  extended by bijnum.BIJmulticlass

public class BIJmulticlass
extends java.lang.Object

BIJ statistical methods for multiclass systems. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.


Constructor Summary
BIJmulticlass()
           
 
Method Summary
static double avg(float[] v, float[] c, int cj)
          Compute average of values in vector v of class c.
static double avg(float[] v, float[] c, int ci, int n)
          Compute average of values in vector v of all n classes in v but c
static double count(float[] v, float[] c, int cj)
          Compute count of all occurences of class c in v.
static double fisher(float[] v, float[] c, int ci, int n)
          Determine the Fisher criterior score - a measure of the distance between the mean of class c0 in v and c1 in v.
static ij.process.ColorProcessor histogram(java.lang.String name, float[] v, float[] gt, int n, int nrbins)
          Make a ColorProcessor multiclass histogram.
static int[][] occurences(float[] v, float[] gt, int n, int nrbins)
          Make a histogram of the occurence of n classes in gt corresponding to the feature value in v.
static double sum(float[] v, float[] c, int cj)
          sum(1) computes summation of values in vector v for class c.
static double var(float[] v, float[] c, int cj)
          Compute variance of values in vector v of class cj.
static double var(float[] v, float[] c, int cj, int n)
          Compute variance of values in vector v of all classes but cj.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BIJmulticlass

public BIJmulticlass()
Method Detail

fisher

public static double fisher(float[] v,
                            float[] c,
                            int ci,
                            int n)
Determine the Fisher criterior score - a measure of the distance between the mean of class c0 in v and c1 in v. |mu+j - mu-j|2 / (sigma+j2 + sigma-j2)

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int the class to compare to all the other classes 0n - the total number of classes.

var

public static double var(float[] v,
                         float[] c,
                         int cj)
Compute variance of values in vector v of class cj.

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int one of the classes to compare 0Returns:
the average.

var

public static double var(float[] v,
                         float[] c,
                         int cj,
                         int n)
Compute variance of values in vector v of all classes but cj.

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int one of the classes to compare 0Returns:
the average.

count

public static double count(float[] v,
                           float[] c,
                           int cj)
Compute count of all occurences of class c in v.

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int one of the classes to compare 0Returns:
the average.

avg

public static double avg(float[] v,
                         float[] c,
                         int ci,
                         int n)
Compute average of values in vector v of all n classes in v but c

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int the class not to include
n - the total number of classes.
Returns:
the average.

avg

public static double avg(float[] v,
                         float[] c,
                         int cj)
Compute average of values in vector v of class c.

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int one of the classes to compare 0Returns:
the average.

sum

public static double sum(float[] v,
                         float[] c,
                         int cj)
sum(1) computes summation of values in vector v for class c.

Parameters:
v - float[] a vector associated with gt
c - float[] a vector with the class for each element in v
ci - int one of the classes to compare 0Returns:
the sum.

occurences

public static int[][] occurences(float[] v,
                                 float[] gt,
                                 int n,
                                 int nrbins)
Make a histogram of the occurence of n classes in gt corresponding to the feature value in v. This determines the distribution of the different classes in gt over v.

Parameters:
v - float[] with the feature values.
gt - int[] the corresponding classifications
n - int number of classes (starting from 0) in gt.
nrbins - int resolution of the histogram
Returns:
int[][] the counts for each class.

histogram

public static ij.process.ColorProcessor histogram(java.lang.String name,
                                                  float[] v,
                                                  float[] gt,
                                                  int n,
                                                  int nrbins)
Make a ColorProcessor multiclass histogram. Bars shown will be relative max histogram count for each of the classes for feature v.

Parameters:
n - int the number of classes in gt.