Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

(RhetTbull) Re: Re: Faster Statistics for Discrete Data

by RhetTbull (Curate)
on Feb 22, 2002 at 01:24 UTC ( #146851=note: print w/replies, xml ) Need Help??

in reply to Re: Faster Statistics for Discrete Data
in thread Faster Statistics for Discrete Data

Thanks for the suggestions. Unfortunately, even something like Tie::IxHash would defeat the purpose of this module. If you have to preserve order, you might as well use an array since you'd need to know where every data point came in. I suppose you could do something like run-length encoding if you had long runs of the same value but the hash overhead would probably eat up the savings for all but very limited data sets. Fortunately, there's very few statistical things (at least that I'm aware of) that depend on the order of the data (The least_squares_fit method of Statistics::Descriptive is the only one I can think of off the top of my head). There are some things that require the data to be in sorted order, and for that my method works quite well since all I have to sort is the hash keys not all the values.
  • Comment on (RhetTbull) Re: Re: Faster Statistics for Discrete Data

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146851]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2021-01-27 16:24 GMT
Find Nodes?
    Voting Booth?