statistics-dirichlet-0.6.1: Functions for working with Dirichlet densities and mixtures on vectors.

Safe HaskellSafe-Infered






empty :: Int -> Double -> DirichletDensitySource

empty n x is an "empty" Dirichlet density with size n and all alphas set to x.

fromList :: [Double] -> DirichletDensitySource

fromList xs constructs a Dirichlet density from a list of alpha values.

toList :: DirichletDensity -> [Double]Source

toList d deconstructs a Dirichlet density to a list of alpha values.

derive :: DirichletDensity -> Predicate -> StepSize -> TrainingVectors -> Result DirichletDensitySource

Derive a Dirichlet density using a maximum likelihood method as described by Karplus et al (equation 26). All training vectors should have the same length, however this is not verified.

cost :: TrainingVectors -> DirichletDensity -> DoubleSource

Cost function for deriving a Dirichlet density (equation 18). This function is minimized by derive.