public class DiscreteEstimatorBayes extends Estimator implements Scoreable
Constructor and Description |
---|
DiscreteEstimatorBayes(int nSymbols,
double fPrior)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double data,
double weight)
Add a new data value to the current estimator.
|
double |
getCount(double data)
Get a counts for a value
|
int |
getNumSymbols()
Gets the number of symbols this estimator operates with
|
double |
getProbability(double data)
Get a probability estimate for a value
|
java.lang.String |
getRevision()
Returns the revision string.
|
double |
logScore(int nType,
int nCardinality)
Gets the log score contribution of this distribution
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
java.lang.String |
toString()
Display a representation of this estimator
|
addValues, addValues, addValues, addValues, buildEstimator, buildEstimator, clone, debugTipText, equals, forName, getCapabilities, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions, testCapabilities
public DiscreteEstimatorBayes(int nSymbols, double fPrior)
nSymbols
- the number of possible symbols (remember to include 0)fPrior
- public void addValue(double data, double weight)
public double getProbability(double data)
getProbability
in class Estimator
data
- the value to estimate the probability ofpublic double getCount(double data)
data
- the value to get the counts forpublic int getNumSymbols()
public double logScore(int nType, int nCardinality)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void main(java.lang.String[] argv)
argv
- should contain a sequence of integers which
will be treated as symbolic.