def prepare
      fail "No value field set up for numeric tracker #{inspect}" unless options[:value]
      fail "No categorizer set up for numeric tracker #{inspect}" unless options[:category]

      unless options[:multiple]
        @categorizer = create_lambda(options[:category])
        @valueizer   = create_lambda(options[:value])
      end

      @number_of_buckets = options[:number_of_buckets] || 1000
      @min_bucket_value  = options[:min_bucket_value] ? options[:min_bucket_value].to_f : 0.000001
      @max_bucket_value  = options[:max_bucket_value] ? options[:max_bucket_value].to_f : 1_000_000_000

      # precalculate the bucket size
      @bucket_size = (Math.log(@max_bucket_value) - Math.log(@min_bucket_value)) / @number_of_buckets.to_f

      @categories = {}
    end
def prepare
      fail "No value field set up for numeric tracker #{inspect}" unless options[:value]
      fail "No categorizer set up for numeric tracker #{inspect}" unless options[:category]

      unless options[:multiple]
        @categorizer = create_lambda(options[:category])
        @valueizer   = create_lambda(options[:value])
      end

      @number_of_buckets = options[:number_of_buckets] || 1000
      @min_bucket_value  = options[:min_bucket_value] ? options[:min_bucket_value].to_f : 0.000001
      @max_bucket_value  = options[:max_bucket_value] ? options[:max_bucket_value].to_f : 1_000_000_000

      # precalculate the bucket size
      @bucket_size = (Math.log(@max_bucket_value) - Math.log(@min_bucket_value)) / @number_of_buckets.to_f

      @categories = {}
    end
Sets up the numeric value tracker. It will check whether the value and category
 options are set that are used to extract and categorize the values during
 parsing. Two lambda procedures are created for these tasks