Imp
[using it]
Interface Manipulation Package v4.0 (2008-06-25) a-projector ©copyright Author


imp.classifier
Class Classifier.Data

java.lang.Object
  extended by imp.classifier.Classifier.Data
Enclosing class:
Classifier

public static class Classifier.Data
extends Object

Defines a classifier data set.


Nested Class Summary
static class Classifier.Data.Sample
          Defines a sample of the data set.
 
Constructor Summary
Classifier.Data()
          Constructs a data-set.
 
Method Summary
 void add(Classifier.Data.Sample sample)
          Adds a sample to this data set.
 void add(Classifier.Data data)
          Adds the a data-set to this data set.
 void add(double[] data, int category, double prob)
          Adds a sample to this data set.
 Classifier.Data.Sample get(int n)
          Returns the n-th sample.
 int getDimension()
          Returns the sample data dimension.
 double getMargin()
          Returns the margin: half the smallest distance between samples.
 double getRadius()
          Returns the minimal radius of a ball containing the samples.
 int getSize()
          Returns the number of samples.
 void remove(int n)
          Remove the n-th sample.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Classifier.Data

public Classifier.Data()
Constructs a data-set.

Method Detail

add

public void add(Classifier.Data.Sample sample)
Adds a sample to this data set.

Parameters:
sample - The sample to add.

add

public void add(Classifier.Data data)
Adds the a data-set to this data set.

Parameters:
data - The data set to add.

add

public void add(double[] data,
                int category,
                double prob)
Adds a sample to this data set.

Parameters:
data - calibration input value.
category - [optional, default is -1] category name or -1 if the category is undefined.
prob - [optional, default is 1] Sample precision probability: 1 for an exact sample, 0 for an undefined sample.

get

public Classifier.Data.Sample get(int n)
Returns the n-th sample.


getDimension

public int getDimension()
Returns the sample data dimension.


getMargin

public double getMargin()
Returns the margin: half the smallest distance between samples.


getRadius

public double getRadius()
Returns the minimal radius of a ball containing the samples.


getSize

public int getSize()
Returns the number of samples.


remove

public void remove(int n)
Remove the n-th sample.