Re: [Jprogramming] faster empirical cumulative distribution function

2014-08-14 Thread Joe Bogner
Thanks mike, your solution is about 2x faster and uses a bit more memory. I need to use ecdfunsorted. Thanks for sharing the additional solution. Each of these solutions will be more than fast enough for what I'm using it for. On Thu, Aug 14, 2014 at 4:11 AM, mike_liz@tiscali.co.uk < mike_liz

Re: [Jprogramming] Merging tables

2014-08-14 Thread Ric Sherlock
I came up with an alternative interface for merging tables that I like better. It is more flexible (handles more than 2 tables) with default key, but suffers on the performance front. NB.*mergeTables a Merge tables on key columns using join strategy NB. form: x u merge y NB. x is: list of of key

Re: [Jprogramming] Merging tables

2014-08-14 Thread Ric Sherlock
An alternative to your leftJoin leftJoin=: [ ,. i.~&:({."1) { a: ,~ }."1@] On Thu, Aug 14, 2014 at 1:57 AM, Joe Bogner wrote: > Thank you for sharing. > > I realized a simple alternate implementation of what I was trying for > yesterday[1] > > First get the indices of b in a > > (0{"1 b) i. (0{

Re: [Jprogramming] faster empirical cumulative distribution function

2014-08-14 Thread mike_liz....@tiscali.co.uk
Fair enough. I was mainly interested whether you found an improvement for your needs with the verbs I suggested, especially ecdfsorted. Since you wish to merge the probabilities with your data rows, if your input data is integer as in the example (unlikely?), it might be worth keeping the f