Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by RhetTbull (Curate)
on Feb 22, 2002 at 01:24 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found