-
Notifications
You must be signed in to change notification settings - Fork 25
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
Central moments #23
Merged
LukeMathWalker
merged 47 commits into
rust-ndarray:master
from
LukeMathWalker:central-moments
Apr 6, 2019
Merged
Central moments #23
Changes from 44 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
62e8b02
Added definition of central order moment
LukeMathWalker 89d6b8c
Added stubbed implementation
LukeMathWalker 9a5b565
Add behaviour to return None if the array is empty
LukeMathWalker d9826e5
Handle edge cases
LukeMathWalker 316a0e5
Added test
LukeMathWalker 00782d8
First implementation completed
LukeMathWalker 1d634ac
Added test for second order moment (variance)
LukeMathWalker 05bf683
Implemented test and renamed to central_moment
LukeMathWalker 5921dd2
Using Horner's method for evaluating polynomials
LukeMathWalker c04e295
Add algorithm notes to the docs
LukeMathWalker 9cddde5
Added algorithmic complexity to the docs
LukeMathWalker 336a51a
Added two optimizations
LukeMathWalker 7f012af
Added signature for bulk central moment computation
LukeMathWalker cfd4dbe
Fixed trait signature
LukeMathWalker 2517b4d
Indent
LukeMathWalker b5a520c
Factored out logic from central_moment
LukeMathWalker 7eb268f
Implemented central_moments
LukeMathWalker 2e61f2e
Test implementation correctness
LukeMathWalker 9d37f15
Added skewness and kurtosis
LukeMathWalker 4829ca6
Added docs
LukeMathWalker c748c8e
Added tests for kurtosis and skewness
LukeMathWalker 4bf0035
Fixed assertions
LukeMathWalker da49a28
No need to get to order 4 for skewness
LukeMathWalker 4a193bb
Fixed kurtosis test
LukeMathWalker 5fe1fe8
Enriched docs
LukeMathWalker 36428c7
Fmt
LukeMathWalker cff93fe
Merge master
LukeMathWalker 25f3f0f
Avoid computing mean for p=0,1 central moments
jturner314 d9ba4bb
Replace map + clone with mapv
jturner314 4a05288
Check for moment order overflowing `i32`
jturner314 3aaab13
Take advantage of IterBinomial from num-integer
jturner314 7efba82
Remove unnecessary explicit clones
jturner314 0b0b0ba
Replace .map() with ?
jturner314 f992453
Test more cases in central moment tests
jturner314 a8af880
Rename central moment tests
jturner314 a701f33
Push diff to the lowest possible exponent
LukeMathWalker 94f0950
Merge pull request #3 from jturner314/central-moments
LukeMathWalker 595af7b
Merge branch 'master' into central-moments
LukeMathWalker 1796a48
Return a Result instead of Option, for consistency
LukeMathWalker e21ca2b
Match impl with trait definition
LukeMathWalker 8762490
Match test to trait+impl
LukeMathWalker 76b0077
Fmt
LukeMathWalker 74cc782
Converted order to u16
LukeMathWalker 31a3909
Fmt
LukeMathWalker 1f9bcf1
Fix typo. Change casting to use as.
LukeMathWalker fb65893
Fix typo. Change casting to use as.
LukeMathWalker c3a166e
Fix typo. Change casting to use as.
LukeMathWalker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that
order
isu16
, we can change this tolet order = order as i32
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, it can't fail anymore. I'll merge once the CI has finished 👍