Do you know where your variables are? PerlMonks

Re^3: Node Tension

by Roy Johnson (Monsignor)
 on Nov 18, 2005 at 17:25 UTC ( #509880=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Node Tension

I get pleasing results with this formula:
sub tension { my (\$hi, \$lo) = @_; \$lo or return 0; 2 * log(\$lo)/log(\$hi + .1); }
where \$hi is the higher number of votes (whichever direction) and \$lo is the number of votes in the other direction. Any result above 1 represents an interesting amount of tension, IMO. Here's a table of results:
Hi #Lo #Tension
3 31.9420
8 31.0504
8 81.9881
20 30.7322
20 81.3860
20201.9967
50 30.5614
50 81.0626
50201.5308
50501.9990
90 30.4882
90 80.9240
90201.3312
90501.7383
90901.9995

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^4: Node Tension
by mojotoad (Monsignor) on Nov 18, 2005 at 17:56 UTC
That looks pretty good, except it seems to lose the magnitude of the tension. 3 vs 3, 8 vs 8, 50 vs 50 all have similar results.

(of course that's probably just me visually eyeballing sig figs along a log curve...)

Cheers,
Matt

You're right. My notion was only to distinguish interesting from non-interesting. You regain the magnitude if you drop a log: I'd call < 1.3 low tension, 1.3-2 moderate, >2 strong.

Caution: Contents may have been coded under pressure.

Create A New User
Node Status?
node history
Node Type: note [id://509880]
help
Chatterbox?
 [Tanktalus]: What's so happy about it? :P [Tanktalus]: ww: your parens don't line up. Sure, perl can look like line noise, but the parens still have to line up. ;) [Tux]: 1nickt did you build 5.24.3, 5.26.1, and 5.27.4 yet? Tux now has 284 working versions of perl [1nickt]: Tux oh yes, have filed reports from them already :-) 1nickt has 44 for one version of one OS ... [Tux]: good boy :) [1nickt]: Had to beat on things for a bit to get cpanminus working on 5.8.9, and it just would not go on 5.6.2, so I abndoned that one for cpanm-reporter work. I mean realistically how many people are using 5.6.2 on OS X ? :-/ [Tux]: those 284 are all on my laptop (Linux x64)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-09-25 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
During the recent solar eclipse, I:

Results (282 votes). Check out past polls.

Notices?