Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: median absolute deviation calculation #235

Closed
wants to merge 2 commits into from

Conversation

pallosp
Copy link
Contributor

@pallosp pallosp commented Jan 29, 2025

Context: #234

@@ -291,7 +291,7 @@ const absoluteDeviation = (
absoluteDeviations.push(Math.abs(sample - aggValue!))
}

return aggFn(absoluteDeviations)
return aggFn(absoluteDeviations.sort((a, b) => a - b))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorting unconditionally is not needed for most aggregation function. See #236.

@jerome-benoit
Copy link
Collaborator

Superseded by #236

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants