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

Custom mean #959

Open
masoudMZB opened this issue Mar 7, 2023 · 1 comment
Open

Custom mean #959

masoudMZB opened this issue Mar 7, 2023 · 1 comment

Comments

@masoudMZB
Copy link

Can you explain this mean you wrote :

def custom_mean(x): return x.prod()**(2.0/np.sqrt(len(x)))

How is this calculating MEAN?
@rkcosmos

@YashPolu
Copy link

YashPolu commented May 10, 2023

x.prod()**(2.0/np.sqrt(len(x))) calculates the geometric mean of the values in the NumPy array x, with a correction factor to reduce the bias towards smaller values in the data set. @masoudMZB

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

No branches or pull requests

2 participants