[Haskell-cafe] suggestions about a library for numerical calculation

31 views
Skip to first unread message

felipe zapata

unread,
Nov 20, 2014, 12:44:47 PM11/20/14
to haskel...@haskell.org
Hi all,
 I want to develop some tools on top of Vector and Repa, and I've wondered what tools   could be useful that are not already on hmatrix.

Any suggestions would be appreciated,

Felipe Z.

Tom Nielsen

unread,
Nov 24, 2014, 7:06:20 AM11/24/14
to felipe zapata, dom...@steinitz.org, Haskell-Cafe
I'd say we're lacking in the optimization and classification department. While there are libraries for this, they are mostly bindings to C libraries which makes it more difficult to get information out of the algorithm. We have implemented BFGS and Nelder-mead here: https://github.com/glutamate/probably-baysig/tree/master/src/Math/Probably but that isn't officially open sourced (and lacking L-BFGS).

We're also a lot of image processing now, and native Haskell implementations of SIFT and Gaussian mixture model fitting would be extremely useful.

Tom



_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Dominic Steinitz

unread,
Nov 25, 2014, 7:07:52 AM11/25/14
to Tom Nielsen, Frank Herrmann, felipe zapata, Haskell-Cafe
There’s at least two answers to this. 1) Most numerical methods do not have a native Haskell implementation (on Hackage) probably even RK4 so the world is your oyster 2) Most numerical methods have a highly optimised implementation that worries about overflow and underflow etc probably written in Fortran but maybe in C so why re-invent the wheel but just provide bindings to them.

My answer is that I would like to have my cake and eat it and I think the new Numeric.LinearAlgebra.Static module starts to do this. I get type safety at compile time and I get speed. Frank tells me he can get pretty close to C speed using unboxed vectors. Maybe we can go even faster using unsafe operations but keeping static guarantees by exploiting the type system in the same way that HMatrix does (type level literals).

Here’s what I would do if I had time. Look at Julia, pick an interesting library / application, use Vector and Repa to implement, compare speeds while using type level programming to preserve safety. I’d like Haskell to be faster and safer.

Tom Nielsen

unread,
Nov 25, 2014, 10:08:29 AM11/25/14
to Dominic Steinitz, Frank Herrmann, felipe zapata, Haskell-Cafe
Felipe,

Here is a fairly detailed paper that describes an image processing pipeline that was state-of-the-art a few years ago, before Deep Learning became the new uber-buzzword:


this is probably still competitive in performance to within a few percent. We are using CUDA code from https://dms.sztaki.hu/en/project/gaussian-mixture-modeling-gmm-and-fisher-vector-toolkit

Tom
Reply all
Reply to author
Forward
0 new messages