-
Notifications
You must be signed in to change notification settings - Fork 193
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
mean_and_var and mean_and_std default value for "corrected" in source does not agree with documentation #604
Comments
Good catch. The right value is |
Hi, I would be happy to try but let me clarify some things first: Also the Statistics.std (in StatsBase moments.jl line 121) is currently documented with
from which I understand that the current implementation would call depcheck, which in turn (defined in common.jl) would give a warning that the current implementation is
But this does not happen when I do a simple test like
while
So I naively would have thought that Can you explain this to me? If everything is correct I would work on the pull request (which I do not have a lot of experience with, so it takes a while for me, but I am eager to learn) and would also use the depcheck method for consistency, correct?. |
AFAICT you're confusing The docstring for |
You are right, I did confuse these two. Thanks for clarifying! Concerning your last point, however, I wonder if it would be more consistent to make Otherwise, I will try to just fix the documentation string tonight. |
What do you mean? |
Okay, now I start to understand the logic here. I thought that everything within StatsBase should be consistent. If consistency with Statistics is the goal, I will try to create a pull request for the documentation tonight . Thanks for bearing with me and explaining! |
Here I am again, I am more confused than ever. Nevertheless to get some practice I created a pull request to demonstrate the arising inconsistency within StatsBase that would arise from making the one dispatch consistent with I hope I did not make too many mistakes along the way. I am still trying to learn the right procedures with github and julia. Thanks for letting me try this out. |
Let me start with a big thank you for the nice package.
I have noticed that there is a mismatch between the documentation and implementation of the default values for the "corrected" flag in mean_and_var and mean_and_std. In the documentation it says
mean_and_std(x, [w::AbstractWeights], [dim]; corrected=false) -> (mean, std)
but everywhere in the code (whenever corrected::Bool is explicitly set which is somehow only for mean_and_std and mean_and_var) it is set to true, e.g.,
I would have started to change it, but I was unsure which one you agreed on to be the proper default case. After finding depcheck in common.jl I was even more unsure. Probably those function that set corrected explicitly should be updated to use depcheck?
The text was updated successfully, but these errors were encountered: