Hi all,
I've exchanged a few emails with Liam about trying to add some functionality to GSLL that goes beyond what is found in GSL, to try and make a more useful overall platform for working with Matrices and Vectors. My personal aim is to make CL a viable alternative to MATLAB which in my field (Machine Learning / Computer Vision) is a de facto standard for quickly messing around with data. I plan to use GSLL for as much of my work as I can, and when I end up having to write any general utilities, try to get them into the main codebase. Liam said there was some related chat on #lisp so it seems sensible to take our discussion to the mailing list where maybe more people will have ideas / want to contribute.
My current efforts to this end are found in http://github.com/malcolmreynolds/GSLL - look in the branch malcolm-utils and then the utils/ directory. Nothing earthshaking, just some matrix looping macros and concatenation functions, but I plan to continue adding things here.
I apologise in advance for my code, I'm still pretty new to CL, so if you read something and say 'ewww', please tell me how I could do it better! Hopefully at some point this will be incorporated into the main GSLL tree, but for the time being I'll continue hacking on this as and when I think of something I should add. Ideas welcome!
Cheers,
Malcolm
I have checked in my start at array utilities which have been moldering around for a few weeks. They are in linear-algebra/matrix-generation.lisp. I wrote them so that I could generate matrices and vectors for the linear algebra tests which I added last month, but generalized somewhat based on a colleague's experience using GSLL in robotics. I still need to fold in Malcolm's and other ideas, so I've not exported the symbols, but they should be usable with a double colon.
My discussion with Sikander (and ntd, fe[nl]ix, rtoym) was very helpful. He suggested that the array handling of numpy be emulated. Based on his description, it sounds like a good model, but I'm not familiar with it. If anyone on the list is, I'd appreciate a quick synopsis and/or pointer to same.
I unfortunately didn't get Sikander's real name/email. He started the conversation by asking about what CL packages were available for linear algebra. He wasn't aware of GSLL but had used GSL in C quite a bit. By the time the conversation had ended, he had whipped up and tested a simulation using Runge-Kutta that had taken him hours in C. He was very impressed that it took him only 5 minutes in GSLL (while chatting on IRC). I invited him to join this mailing list and post his experiences but he had quit the room by the time I suggested it, unfortunately.
If you wish to see the discussion, look at http://tunes.org/~nef/logs/lisp/09.10.15 starting at 15:25:11
Liam
On Fri, Oct 16, 2009 at 8:37 AM, Malcolm Reynolds malcolm.reynolds@gmail.com wrote:
Hi all,
I've exchanged a few emails with Liam about trying to add some functionality to GSLL that goes beyond what is found in GSL, to try and make a more useful overall platform for working with Matrices and Vectors. My personal aim is to make CL a viable alternative to MATLAB which in my field (Machine Learning / Computer Vision) is a de facto standard for quickly messing around with data. I plan to use GSLL for as much of my work as I can, and when I end up having to write any general utilities, try to get them into the main codebase. Liam said there was some related chat on #lisp so it seems sensible to take our discussion to the mailing list where maybe more people will have ideas / want to contribute.
My current efforts to this end are found in http://github.com/malcolmreynolds/GSLL - look in the branch malcolm-utils and then the utils/ directory. Nothing earthshaking, just some matrix looping macros and concatenation functions, but I plan to continue adding things here.
I apologise in advance for my code, I'm still pretty new to CL, so if you read something and say 'ewww', please tell me how I could do it better! Hopefully at some point this will be incorporated into the main GSLL tree, but for the time being I'll continue hacking on this as and when I think of something I should add. Ideas welcome!
Cheers,
Malcolm
Gsll-devel mailing list Gsll-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
For those interested in this, I've just added slices which can be both read and written to. IMO This gets us a long way towards feature parity with matlab. Code is in the github branch, specifically this file:
http://github.com/malcolmreynolds/GSLL/blob/malcolm-utils/utils/slice.lisp
.. all code should be considered heavily alpha, and I'll probably tweak it quite a lot in the near future.
For those who don't know what I'm talking about, you can now read and write arbitrary bits of a matrix like this:
GSLU> m #<MATRIX-DOUBLE-FLOAT #2A((1.0d0 2.0d0 3.0d0 4.0d0) (5.0d0 6.0d0 7.0d0 8.0d0) (9.0d0 10.0d0 11.0d0 12.0d0))> GSLU> (mslice m :all '(3 1 2 0)) #<MATRIX-DOUBLE-FLOAT #2A((4.0d0 2.0d0 3.0d0 1.0d0) (8.0d0 6.0d0 7.0d0 5.0d0) (12.0d0 10.0d0 11.0d0 9.0d0))> GSLU> (mslice m '(0 2) '(3 0)) #<MATRIX-DOUBLE-FLOAT #2A((4.0d0 1.0d0) (12.0d0 9.0d0))> GSLU> (setf (mslice m '(0 2) '(1 3)) #m(101 102 ^ 103 104)) #<MATRIX-DOUBLE-FLOAT #2A((1.0d0 101.0d0 3.0d0 102.0d0) (5.0d0 6.0d0 7.0d0 8.0d0) (9.0d0 103.0d0 11.0d0 104.0d0))>
Any bug reports or comments gratefully received...
Malcolm