lib/benchmark/trend.rb
def fit_power(xs, ys)
      a, b, rr = fit(xs, ys, tran_x: ->(x) { Math.log(x) },
                             tran_y: ->(y) { Math.log(y) })

      [a, Math.exp(b), rr]
    end
def fit_power(xs, ys)
      a, b, rr = fit(xs, ys, tran_x: ->(x) { Math.log(x) },
                             tran_y: ->(y) { Math.log(y) })

      [a, Math.exp(b), rr]
    end
def fit_power ( xs , ys ) a , b , rr = fit ( xs , ys , tran_x : -> ( x ) { Math . log ( x ) } , tran_y : -> ( y ) { Math . log ( y ) } ) [ a , Math . exp ( b ) , rr ] end
Finds a line of best fit that approxmimates power function

 Function form: y = bx^a

 @return [Numeric, Numeric, Numeric]
   returns a, b, and rr values

 @api public
Finds a line of best fit that approxmimates power function