Sha256: 3739b47d53763a2e59f19b4d1dfc8d336e25d2f9f4fd279773842bf9d536fd6d
Contents?: true
Size: 491 Bytes
Versions: 9
Compression:
Stored size: 491 Bytes
Contents
module MetricFu module HotspotScoringStrategies module_function # per project score percentile def percentile(ranking, item) ranking.percentile(item) end # Use the score you got # (ex flog score of 20 is not bad even if it is the top one in project) def identity(ranking, item) ranking.fetch(item) end def sum(scores) scores.inject(&:+) end def average(scores) sum(scores).to_f / scores.size.to_f end end end
Version data entries
9 entries across 9 versions & 3 rubygems