LogLikelihoodCriterion

abstract class LogLikelihoodCriterion(val name: String, val worstValue: Double = defaultWorstValue) : MixtureCriterionIfc(source)

Shared machinery for criteria built from the observed-data log-likelihood.

The screening this performs is the reason these are separate classes rather than direct calls to the library's helpers. Those helpers require a finite log-likelihood and throw otherwise, while a mixture yields a non-finite one whenever a component assigns zero density to an observation. That is an expected outcome of a candidate whose components do not cover the data, not a programming error, so it is reported as an incomparable value with a bounded magnitude, following the pattern the library's own scoring models use for the same situation.

Parameters

name

the criterion name

worstValue

the magnitude assigned when the criterion cannot be computed

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, worstValue: Double = defaultWorstValue)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val name: String
Link copied to clipboard
override val smallerIsBetter: Boolean = true

Whether smaller values indicate a better fit. Information criteria are smaller-is-better; a held-out mean log-likelihood is not. Ranking machinery must consult this rather than assuming a direction.

Link copied to clipboard
protected val worstValue: Double

Functions

Link copied to clipboard
protected abstract fun compute(candidate: MixtureCandidate, data: DoubleArray, logLikelihood: Double): Double

Computes the criterion from a log-likelihood already known to be finite.

Link copied to clipboard

Evaluates the criterion for the supplied candidate against the supplied observations.

Link copied to clipboard
open override fun metric(): MetricIfc

A metric describing this criterion, for use with the library's multi-objective decision analysis machinery. The direction is taken from this interface.