tags:

views:

355

answers:

2

Can anyone help me with example on using lapack with latest f#? Or it is not recommended for now?

I searched and only find http://fdatamining.blogspot.com/ but was not able to get FSharp.PowerPack.Math.Providers.dll compiled.

EDIT: @Yin, Thanks for your blog. On compiling FSharp.PowerPack.Math.Providers.dll from 1.9.7.8 source, Microsoft.FSharp.Compatibility.permutation is used several times and cannot be found. In your blog it is said just to define it explicitly:

type permutation = int –> int.

Alternatively I replace all Microsoft.FSharp.Compatibility.permutation with Microsoft.FSharp.Math.Permutation and got it compiled. Have not test it yet.

Could you please show us the test case for svd bug?

Thanks

+3  A: 

I wrote this blog. Do you use VS 2008? Have you installed PowerPack? What have you done so far? What compile errors did you get?

Using the math providers is NOT recommended by the F# team. However, this is the best I can find online for F# (The incomplete and alpha-test Math.Net needs time to mature). I can also tell you that the wrapper is buggy, e.g. there's a bug in the SVD wrapper. But this wrapper is small, you can maintain it yourself along the F# new releases and add new functions as you need (we have obvious license problem here!). My plan is to use and modify this wrapper until it is stable and rewrite a new one to clear license problem. Or, we can persuade MS or MSR to continue the development.

@ahala, the svd bug

search member this.dgesvd_((a:matrix)) = in lapack_service_netlib.fs

This function has a memory-access/segment-fault bug when doing SVD on a m-by-n(m>n) matrix.

To solve the problem, we need to change arg_jobu and arg_jobvt to 'S'. ref lapack doc here: http://linux.die.net/man/l/dgesvd

Yin Zhu
A: 

@Yin, Thanks for your blog. On compiling FSharp.PowerPack.Math.Providers.dll from 1.9.7.8 source, Microsoft.FSharp.Compatibility.permutation is used several times and cannot be found. in your blog it is said just to define it explicitly: type permutation = int –> int.

Alternatively I replace all Microsoft.FSharp.Compatibility.permutation with Microsoft.FSharp.Math.Permutation and got it compiled. have not test it yet.

Could you please show us the test case for svd bug?

(Sorry for the spam since I cannot use any IDs to log in to edit my original question or post comments. Please feel free to delete or move this post)

ahala
I edited your original question to include this info. You (or some moderator?) can delete this post.
Tomas Petricek