![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
java.lang.Objectimp.classifier.Classifier.Data
public static class Classifier.Data
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 |
---|
public Classifier.Data()
Method Detail |
---|
public void add(Classifier.Data.Sample sample)
sample
- The sample to add.public void add(Classifier.Data data)
data
- The data set to add.public void add(double[] data, int category, double prob)
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.public Classifier.Data.Sample get(int n)
public int getDimension()
public double getMargin()
public double getRadius()
public int getSize()
public void remove(int n)