Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: creating and managing many hashes

by Cristoforo (Curate)
on Feb 20, 2018 at 03:10 UTC ( [id://1209523]=note: print w/replies, xml ) Need Help??


in reply to creating and managing many hashes

What formula do you use to calculate the correlation between the pairs? Does it involve the stddev, mean?

Replies are listed 'Best First'.
Re^2: creating and managing many hashes
by Gtforce (Sexton) on Feb 24, 2018 at 13:25 UTC

    Definitely involves mean and stddev. Hopefully the snippet shows how I'm trying to do this, but do let me know if there is another way, thanks.

    foreach my $subrow (keys %pair1data) { $zee1 = ( ( $pair1data{$subrow} - $submean1 ) / $substddev1 ); $zee2 = ( ( $pair2data{$subrow} - $submean2 ) / $substddev2 ); $sigma += ( $zee1 * $zee2 ); $datasetcounter ++; } $r = ( $sigma / ( $datasetcounter - 1 ) ); return $r;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found