Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

geometric mean #259

Closed
wants to merge 1 commit into from
Closed

geometric mean #259

wants to merge 1 commit into from

Conversation

douglaskariuki
Copy link

the geometric mean could also be useful for other types of calculations

@Fil
Copy link
Member

Fil commented Aug 23, 2022

Copy link

@curran curran left a comment

Choose a reason for hiding this comment

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

I notice that tabs are used in the new file, whereas the rest of the codebase uses spaces.

Also curious, is this implementation derived from any existing work, or inspired from any particular source?

@@ -0,0 +1,34 @@
export default function gmean(values, valueof) {
const r = 64;
Copy link

Choose a reason for hiding this comment

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

Using tabs is inconsistent with the rest of the codebase, which uses spaces.

Copy link
Author

Choose a reason for hiding this comment

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

I changed this commit a few times before pushing and didn't notice the last change was using tabs instead of spaces. Making the necessary changes..

Using tabs is inconsistent with the rest of the codebase, which uses spaces.

Copy link
Author

Choose a reason for hiding this comment

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

I notice that tabs are used in the new file, whereas the rest of the codebase uses spaces.

Also curious, is this implementation derived from any existing work, or inspired from any particular source?

Yes, this PR was inspired by d3.mean(), used to calculate the arithmetic mean because I noticed similarities between the two. Will also work on showing differences between the geometric and arithmetic mean calculations and update this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants