Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Faster Statistics for Discrete Data

by Dog and Pony (Priest)
on Feb 21, 2002 at 17:24 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2021-04-13 13:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found