Prev: Statistics in lisp
Next: Great mysteries of our time
From: allchemist on 14 Apr 2010 14:41 Thanks for answer. My quiestion is tired with another my today's question at c.l.l. I need some statistics functions, and lla does'n provide them. For example, I need to do some operation with lla-matrices, then to do some operation (which doesn't exist in lla) with the result of lla- operation, and then again with lla-array, and so on in a loop. then these transposing will cost a lot. > Judging from your posts on c.l.l., you are either working on an > application where squeezing out the last 10% of performance is > important (in which case you should be using blocks of Fortran, > perhaps controlled by CL at the highest level), or you are getting > distracted by "optimizing" operations which are very cheap in practice > and hardly worth bothering about. Among others, I'm searching for an efficient and universal set of linear algebra routines, which could be easyly combined with other matrix routines for lisp. It is clear, that such 'universal' interface is standard lisp array. Then, there is an asymmetric problem with GSLL. I can easily access lisp-array with cl-array (which is done by with (slot-value matrix 'grid::data), which leads to some routine in affi). But I can't convert a lisp matrix to gsl marray. The gsll:make-marray function has a key argument :cl-array, which seems to accept lisp-array, but doesn't work (or I simply don't understand how to use it). Providing a key :data instead of :cl-array gives a gsll marray, but it isn't simple-array, so some trivial operations, such as gsll:matrix-product couldn't be done.
From: allchemist on 14 Apr 2010 14:46 > How large are your matrices? What fraction of CPU time does copying > currently take up? They are of different sizes, from about 10 elements to about 10^7 elements. I have done some tests on LLA, GSLL and native lisp matrix multiplications. the result for LLA with copying from LLA->native, for GSLL with copying native->GSLL, and for native without any copying are very similar. So, copying is critical, mainly for large arrays.
From: Tamas K Papp on 14 Apr 2010 14:55 On Wed, 14 Apr 2010 11:41:25 -0700, allchemist wrote: > Thanks for answer. > > My quiestion is tired with another my today's question at c.l.l. I need > some statistics functions, and lla does'n provide them. For example, I > need to do some operation with lla-matrices, then to do some operation > (which doesn't exist in lla) with the result of lla- operation, and then > again with lla-array, and so on in a loop. then these transposing will > cost a lot. Again, you are not saying _what_ operations you need. LLA has facilities for fast element access (for loops, etc), see bind-extensions.lisp and the corresponding unit tests. I have another alpha-stage library called cl-random, also on github. It has examples of fast mean and variance calculations on LLA matrices. Use it at you own risk, I can't give any support. >> Judging from your posts on c.l.l., you are either working on an >> application where squeezing out the last 10% of performance is >> important (in which case you should be using blocks of Fortran, perhaps >> controlled by CL at the highest level), or you are getting distracted >> by "optimizing" operations which are very cheap in practice and hardly >> worth bothering about. > Among others, I'm searching for an efficient and universal set of linear > algebra routines, which could be easyly combined with other matrix > routines for lisp. It is clear, that such 'universal' interface is > standard lisp array. That's far from clear to me, if you want speed and efficiency. You seem to be on a quest for the "perfect" library, and so far you didn't say a whole lot about the actual problem you are trying to solve, and how the current solutions are lacking (with precise examples, benchmarks, code snippets, etc). It is very likely that your problems can be solved using GSLL, LLA, or perhaps other matrix packages. But until you explain what you want to do, you are unlikely to get better help. Given that I am not very interested in vague and abstract discussions about matrix libraries in CL, I think that I am wasting my time with this thread, so I will stop responding until it gets more specific. Best, Tamas
From: allchemist on 14 Apr 2010 15:12
> Again, you are not saying _what_ operations you need. LLA has > facilities for fast element access (for loops, etc), see > bind-extensions.lisp and the corresponding unit tests. (bind-generate-bindings :lla-matrix ...) seems to solve some part of problem > You seem to be on a quest for the "perfect" library, and so far you > didn't say a whole lot about the actual problem you are trying to > solve, and how the current solutions are lacking (with precise > examples, benchmarks, code snippets, etc). It is very likely that > your problems can be solved using GSLL, LLA, or perhaps other matrix > packages. It may sound funny, but I'm looking for an ideal library, but for a concrete task now. > But until you explain what you want to do, you are unlikely to get > better help. Given that I am not very interested in vague and > abstract discussions about matrix libraries in CL, I think that I am > wasting my time with this thread, so I will stop responding until it > gets more specific. I'm trying to write a full-featured suite for data mining in general: different neural network architectures for classification, clusterisation, temporal series prediction, statistical analysis, signal analysis, reducing data dimensions and others. To be more concrete, now I'm searchng the optimal representation and teaching of cascade correlation networks and cascade-correlation RBF networks. |