Perl: the Markov chain saw | |
PerlMonks |
Re^4: Data Normalization (homework?)by BrowserUk (Patriarch) |
on Apr 12, 2015 at 02:43 UTC ( [id://1123168]=note: print w/replies, xml ) | Need Help?? |
Please note that, as implied in the post above, the log scale generator is actually a cheat, based on noticing that the input & output ranges specified happened to lend themselves to a simplified calculation. Ie. log( 8000 ) + 1 is very close to 10. However, that means that genLogScaler() is basically ignoring most of its input parameters and thus won't work for the generic case. Here's a fixed version that works for your case and (a couple of other tested examples of) the generic case:
Produces:
But note: it still contains the hack-y $in = 1 if $in < 1; fix. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
In Section
Seekers of Perl Wisdom
|
|