DataType
- Type of data generated by the Distributionpublic class NegativeLogLikelihood<DataType> extends AbstractCostFunction<ComputableDistribution<DataType>,java.util.Collection<? extends DataType>>
costParameters
Constructor and Description |
---|
NegativeLogLikelihood()
Default constructor
|
NegativeLogLikelihood(java.util.Collection<? extends DataType> costParameters)
Creates a new instance of NegativeLogLikelihood
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluate(ComputableDistribution<DataType> target)
Computes the cost of the given target.
|
static <DataType> double |
evaluate(ProbabilityFunction<DataType> f,
java.util.Collection<? extends DataType> data)
Evaluates the negative log-likelihood of the given collection of data
according to the given probability function.
|
clone, getCostParameters, setCostParameters
public NegativeLogLikelihood()
public NegativeLogLikelihood(java.util.Collection<? extends DataType> costParameters)
costParameters
- Data generated by the target distributionpublic java.lang.Double evaluate(ComputableDistribution<DataType> target)
CostFunction
target
- The object to evaluate.public static <DataType> double evaluate(ProbabilityFunction<DataType> f, java.util.Collection<? extends DataType> data)
DataType
- The type of data generated by the distribution.f
- The function to compute the log-likelihood.data
- The data to compute the log-likelihood of.