in reply to Re^5: Data range detection?
in thread Data range detection?

Sorry, but unless my eye's are deceiving me (quite possible), but you don't appear to be fitting the data at all:

21 my @x = 1..@$d; ### Takes the values 1..3 +0, 1..31, and 1..32 22 my @logx = map log, @x; ### is the logs of those +sequential ranges 23 my @logd = map log, @$d; ### the loglogs of those +sequential ranges. 24 printf "%10.2f %10.2f %10.2f\n", fit( \@x, $d), fit( \@x, \@logd) +, fit( \@logx, \@logd );

The actual data is never passed to the fit sub?


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

Replies are listed 'Best First'.
Re^7: Data range detection?
by hdb (Monsignor) on Apr 13, 2015 at 19:22 UTC

    $d is a reference to the array containing your data sets. No comment on your eyesight....

      $d is a reference to the array containing your data sets

      I know that. But...

      @data = map int( rand 100 ), 1 ..30;; ## THE DATA $d = \@data;; ## A REFERENCE TO +IT print 1.. @$d;; ## AN UNRELATED SE +QUENCE OF INTEGERS! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 +7 28 29 30

      Look again!


      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

        I am doing a scatterplot of the data versus the sequence of integers. The latter is "linear" by definition. To this scatterplot I fit a straight line and measure how well the line fits. Then I try logs on the data or the integer sequence, fit again and see if the fit improves.