public static class ChineseRestaurantProcess.PMF extends ChineseRestaurantProcess implements ProbabilityMassFunction<Vector>
ChineseRestaurantProcess.PMFalpha, DEFAULT_ALPHA, DEFAULT_NUM_CUSTOMERS, numCustomers| Constructor and Description |
|---|
PMF()
Creates a new instance of ChineseRestaurantProcess
|
PMF(ChineseRestaurantProcess other)
Copy constructor
|
PMF(double alpha,
int numCustomers)
Creates a new instance of ChineseRestaurantProcess
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Double |
evaluate(Vector input)
Evaluates the function on the given input and returns the output.
|
double |
getEntropy()
Gets the entropy of the values in the histogram.
|
ChineseRestaurantProcess.PMF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
logEvaluate(Vector input)
Evaluate the natural logarithm of the distribution function.
|
clone, convertFromVector, convertToVector, getAlpha, getDomain, getDomainSize, getMean, getNumCustomers, sample, sampleInto, sampleNextCustomer, setAlpha, setNumCustomerssampleequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDomain, getDomainSizesample, sample, sampleIntoclonepublic PMF()
public PMF(double alpha,
int numCustomers)
alpha - CRP concentration parameter, must be greater than zero.numCustomers - Total number of customers that we will arrange around tables,
must be greater than zero.public PMF(ChineseRestaurantProcess other)
other - CRP to copypublic ChineseRestaurantProcess.PMF getProbabilityFunction()
ComputableDistributiongetProbabilityFunction in interface ComputableDistribution<Vector>getProbabilityFunction in interface DiscreteDistribution<Vector>getProbabilityFunction in interface ProbabilityMassFunction<Vector>getProbabilityFunction in class ChineseRestaurantProcesspublic double getEntropy()
ProbabilityMassFunctiongetEntropy in interface ProbabilityMassFunction<Vector>public double logEvaluate(Vector input)
ProbabilityFunctionlogEvaluate in interface ProbabilityFunction<Vector>input - The input to be evaluated