-
-
Notifications
You must be signed in to change notification settings - Fork 820
feat: add stats/base/dists/bradford/skewness
#6401
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
base: develop
Are you sure you want to change the base?
feat: add stats/base/dists/bradford/skewness
#6401
Conversation
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: passed - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
/stdlib update-copyright-years |
@anandkaranubc , @kgryte , Any suggestion on this |
@vivekmaurya001, that's the main reason I didn’t submit my PRs on skewness and kurtosis — they lead to large divergent results due to ("My Hypothesis"):
These are my local results:
There are actually two ways to implement this: k = ln(1.0 + c);
out = SQRT2;
out *= ( (12.0*c*c) - (9.0*k*c*(c+2.0)) + (2.0*k*k*(c*(c+3.0)+3.0)) );
out /= sqrt(c * (c*(k-2.0) + (2.0*k)));
out /= ( (3.0*c*(k-2.0)) + (6.0*k) );
return out; or var g1 = SQRT2 * (12*c*c - 9*c*k*(c+2) + 2*k*k*(c*(c+3)+3));
g1 /= sqrt(c*(c*(k-2)+2*k)) * (3*c*(k-2) + 6*k);
return g1; The second one gives better results than the first. Here, better results mean less divergence from SciPy. That said, I think we might need to check if there have been any changes in the upstream implementations of cc: @kgryte |
Yess, Also the scipy docs are using log(1+c) instead of log1p |
Would you mind checking the upstream implementation of |
Sure I will try it first |
@anandkaranubc , I found some slight differences in lg2, lg3 etc values in free bsd and our, I tried correcting it and running but still not improved, apart from this all looked same |
Edit: Are you sure about that? The values seem the same to me:
|
Oops yes, I realised some last digits were not matching |
Added |
Progresses #168.
This pull request:
stats/base/dists/bradford/skewness
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers