Bas de Haas | 13 Apr 15:26 2013
Picon

multivariate normal distribution in Haskell?

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?

Thanks.

Kind regards,
Bas de Haas

--

-- 
dr. W. Bas de Haas
Department of Information and Computing Sciences
Utrecht University

E: W.B.deHaas <at> uu.nl
T: +31 30 253 5965
I: http://www.uu.nl/staff/WBdeHaas/
Clark Gaebel | 14 Apr 19:45 2013
Picon
Picon

Re: multivariate normal distribution in Haskell?

Is [1] what you're looking for (see the 'multinormal' function)?

monte-carlo's pretty great... :)

  - Clark



On Sat, Apr 13, 2013 at 9:26 AM, Bas de Haas <W.B.deHaas <at> uu.nl> wrote:
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?

Thanks.

Kind regards,
Bas de Haas

--
dr. W. Bas de Haas
Department of Information and Computing Sciences
Utrecht University

E: W.B.deHaas <at> uu.nl
T: +31 30 253 5965
I: http://www.uu.nl/staff/WBdeHaas/

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ben Gamari | 14 Apr 21:57 2013
Picon

Re: multivariate normal distribution in Haskell?

Bas de Haas <W.B.deHaas <at> 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 <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane