Codeminer42/cm42-central

View on GitHub
app/services/statistics.rb

Summary

Maintainability
A
0 mins
Test Coverage

Complex method Statistics::variance (20.1)
Open

  def self.variance(enumerable, sample_size = enumerable.size)
    slice = slice_to_sample_size(enumerable, sample_size)
    total = slice.size > 1 && (total(slice) < total(enumerable)) ? total(slice) - 1 : sample_size
    mean  = mean(slice)
    sum(slice.map { |sample| (mean - sample)**2 }) / total
Severity: Minor
Found in app/services/statistics.rb by flog

Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

You can read more about ABC metrics or the flog tool

There are no issues that match your filters.

Category
Status