Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Faster Statistics for Discrete Data

by Dog and Pony (Priest)
on Feb 21, 2002 at 17:24 UTC ( [id://146779]=note: print w/replies, xml ) Need Help??


in reply to Faster Statistics for Discrete Data

Indeed, any that depend on the original order of the data can't be implemented with this method

Maybe Tie::DxHash or Tie::IxHash could be of any help with this, in case it is an issue that should be dealt with?


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.
  • Comment on Re: Faster Statistics for Discrete Data

Replies are listed 'Best First'.
(RhetTbull) Re: Re: Faster Statistics for Discrete Data
by RhetTbull (Curate) on Feb 22, 2002 at 01:24 UTC
    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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found