Bas de Haas <w.b.deh...@uu.nl> writes: > Dear List, > > I’m implementing a probabilistic model for recognising musical chords in > Haskell. This model relies on a multivariate normal distribution. I’ve > been searching the internet and mainly hackage for a Haskell library to > do this for me, but so far I’ve been unsuccessful. > > What I’m looking for is a Haskell function that does exactly what the > mvnpdf function in matlab does: > http://www.mathworks.nl/help/stats/multivariate-normal-distribution.html > > Does anyone know a library that can help me out? > As you are likely aware, the trouble with the multivariate normal is the required inversion of the covariance. If you make assumptions concerning the nature of the covariance (e.g. force it to be diagonal or low dimensional) the problem gets much easier. To treat the general, high dimensional case, you pretty much need a linear algebra library (e.g. HMatrix) to perform the inversion (and determinant for proper normalization). Otherwise, implementing the function given the inverse is quite straightforward.
Cheers, - Ben _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe