public abstract class WeightSet extends Object
Constructor and Description |
---|
WeightSet(String type)
Construct a WeightSet of the specified type.
|
Modifier and Type | Method and Description |
---|---|
void |
addExample(FeatureSet f)
Add an example to this classifier.
|
void |
clearExamples()
Clear the examples.
|
protected abstract FeatureSet |
computeMu()
Calculate the mu values for each feature in this class.
|
protected abstract FeatureSet |
computeSigma()
Calculate the sigma values for each feature in this class.
|
protected void |
debug(String s) |
protected Iterator |
examples()
Return an iterator over the examples of this classifier.
|
int |
getExampleCount()
Return the number of examples.
|
FeatureSet |
getMuValues()
Return the mu values.
|
FeatureSet |
getSigmaValues()
Return the sigma values.
|
String |
getType()
Return the type of this classifier.
|
String |
toString()
The text representation of this weight set.
|
void |
train()
Train on the examples by computing the mu and sigma values for
each feature.
|
public WeightSet(String type)
public void addExample(FeatureSet f)
public void clearExamples()
protected abstract FeatureSet computeMu() throws ClassifierException
ClassifierException
protected abstract FeatureSet computeSigma() throws ClassifierException
ClassifierException
protected void debug(String s)
protected Iterator examples()
public int getExampleCount()
public FeatureSet getMuValues()
public FeatureSet getSigmaValues()
public String getType()
public void train() throws ClassifierException
ClassifierException
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.