Skip to content

Commit

Permalink
Improve outliers
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 26, 2021
1 parent e54621b commit 9dcf324
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/stats/outliers_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,13 @@ const getNextOutliersIndex = function (quantiles, maxIndex, minIndex) {

// eslint-disable-next-line fp/no-loops, fp/no-let, fp/no-mutation
for (let index = startIndex; index < endIndex; index += 1) {
const quantile = quantiles[index]
const widthPercentage = (max - quantiles[index]) / width

// eslint-disable-next-line max-depth
if (quantile === max) {
if (widthPercentage === 1) {
return maxIndex
}

const widthPercentage = (max - quantile) / width
const quantilePercentage = (index - maxIndex) / quantilesCount
const quantileRatio = getQuantileRatio(widthPercentage, quantilePercentage)

Expand Down

0 comments on commit 9dcf324

Please sign in to comment.