stereodisk
Class StereoDiskANNTester

java.lang.Object
  |
  +--stereodisk.StereoDiskAnalyzer
        |
        +--stereodisk.StereoDiskANNTester
Direct Known Subclasses:
StereoDiskANNMaker, StereoDiskROC

public class StereoDiskANNTester
extends StereoDiskAnalyzer

Stereo disk photograph analysis. Uses ANN to analyze stereo feature sets. Uses soft classification to determine the ROC curve for one specific set of features. Copyright (c) 1999-2005, Michael Abramoff. All rights reserved.


Field Summary
(package private) static boolean balanced
           
(package private) static double epsilon
           
(package private) static int k
           
(package private) static int nrclasses
           
(package private) static int ntestpixels
           
(package private) static int ntrainpixels
           
 
Fields inherited from class stereodisk.StereoDiskAnalyzer
height, PIXEL_SAMPLING, testing, training, width
 
Constructor Summary
StereoDiskANNTester()
           
 
Method Summary
protected static void addFeature(java.util.Vector c, java.lang.String ft, double accuracy, int[][] confusionMatrix)
           
(package private) static float[] createPixelSet(float[][] sampleGroundTruthPixels, int[][] coords, java.lang.String gtname)
           
(package private) static int[][] createTestingCoords(float[][] sampleGroundTruthTestPixels)
           
(package private) static int[][] createTrainingCoords(float[][] sampleGroundTruthTrainingPixels)
           
static void main(java.lang.String[] args)
           
(package private) static float[][] sampleGroundTruthTestingPixels(float[][] floatGroundTruth)
           
(package private) static float[][] sampleGroundTruthTrainingPixels(float[][] floatGroundTruth)
           
static double[] unitvars(float[][] m, double[] vars, double[] avgs)
          Make unit variance all elements in m columnwise.
static double[] zeromeans(float[][] m, double[] avgs)
          Zeromean all elements in m columnwise.
 
Methods inherited from class stereodisk.StereoDiskAnalyzer
analyzeProbabilities, buildString, createBalancedSampleBlock, createBalancedSampleBlocks, createSampleBlock, createSampleBlocks, imageFeaturePixels, loadFeatures, loadFloatImage, loadFloatImages, min, pixelsToDataset, plotProbs, sampleEvenImages, sampleFeatureImagePixels, sampleFeatureImagePixels, sampleImages, sampleOddImages, showAccuracies, subsample, subsample, subset, subset, testKNN, trainKNN
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

k

static final int k

nrclasses

static final int nrclasses

ntestpixels

static int ntestpixels

ntrainpixels

static int ntrainpixels

epsilon

static final double epsilon

balanced

static final boolean balanced
Constructor Detail

StereoDiskANNTester

public StereoDiskANNTester()
Method Detail

main

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

sampleGroundTruthTrainingPixels

static float[][] sampleGroundTruthTrainingPixels(float[][] floatGroundTruth)

sampleGroundTruthTestingPixels

static float[][] sampleGroundTruthTestingPixels(float[][] floatGroundTruth)

createTrainingCoords

static int[][] createTrainingCoords(float[][] sampleGroundTruthTrainingPixels)

createTestingCoords

static int[][] createTestingCoords(float[][] sampleGroundTruthTestPixels)

createPixelSet

static float[] createPixelSet(float[][] sampleGroundTruthPixels,
                              int[][] coords,
                              java.lang.String gtname)

addFeature

protected static void addFeature(java.util.Vector c,
                                 java.lang.String ft,
                                 double accuracy,
                                 int[][] confusionMatrix)

zeromeans

public static double[] zeromeans(float[][] m,
                                 double[] avgs)
                          throws java.lang.IllegalArgumentException
Zeromean all elements in m columnwise. If avgs != null, use those columnwise averages, otherwise compute columnwise averages of m, and subtract these averages from the elements in each column. Return the used averages.
Parameters:
m - a matrix of float[][] IS MODIFIED!
avgs - a double[] with the averages, null if averages have to be computed.

unitvars

public static double[] unitvars(float[][] m,
                                double[] vars,
                                double[] avgs)
                         throws java.lang.IllegalArgumentException
Make unit variance all elements in m columnwise. If vars != null, use those columnwise variances, otherwise compute columnwise variances of m, and divide the elements in each column of m by the square root of these variances
Parameters:
m - a matrix of float[][] IS MODIFIED!
vars - a double[] with the variances, null if these have to be computed.