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

Features/98 moments - skew and kurtosis #615

Merged
merged 19 commits into from Jul 2, 2020
Merged

Conversation

coquelin77
Copy link
Member

@coquelin77 coquelin77 commented Jun 30, 2020

Description

Added skew() and kurtosis() functions. Also fixed the spectral bug (hopefully)

Issue/s resolved: #98

Changes proposed:

  • implement skew()
  • implement kurtosis()
  • changed np.inf to max dtype value in heat.spatial.distance._quadratic_expand to avoid issues with MKL backend

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Updated changelog.md under the title "Pending Additions"

Does this change modify the behaviour of other functions? If so, which?

yes, cdist with the use of _quadratic_expand will not return infinite values now.

@codecov
Copy link

codecov bot commented Jun 30, 2020

Codecov Report

Merging #615 into master will increase coverage by 0.00%.
The diff coverage is 97.58%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #615    +/-   ##
========================================
  Coverage   97.46%   97.47%            
========================================
  Files          77       77            
  Lines       15470    15663   +193     
========================================
+ Hits        15078    15267   +189     
- Misses        392      396     +4     
Impacted Files Coverage Δ
heat/core/statistics.py 96.80% <93.22%> (-1.04%) ⬇️
heat/cluster/spectral.py 93.33% <100.00%> (ø)
heat/core/dndarray.py 97.21% <100.00%> (+0.28%) ⬆️
heat/core/linalg/solver.py 68.36% <100.00%> (ø)
heat/core/tests/test_statistics.py 100.00% <100.00%> (ø)
heat/spatial/distance.py 95.74% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4117db8...eb7f7f5. Read the comment docs.

@Markus-Goetz Markus-Goetz added this to the 2-week sprint milestone Jun 30, 2020
Copy link
Member

@Markus-Goetz Markus-Goetz left a comment

Choose a reason for hiding this comment

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

Nice PR. All the good stuff is inside, I could only find some cosmetics, tiny performance increases and a missing test case. Should be fixed in no time. Thanks Daniel!

heat/core/statistics.py Show resolved Hide resolved
heat/core/statistics.py Outdated Show resolved Hide resolved
heat/core/statistics.py Outdated Show resolved Hide resolved
heat/core/statistics.py Show resolved Hide resolved
heat/core/statistics.py Outdated Show resolved Hide resolved
heat/core/dndarray.py Outdated Show resolved Hide resolved
heat/core/dndarray.py Show resolved Hide resolved
heat/core/statistics.py Outdated Show resolved Hide resolved
heat/core/statistics.py Outdated Show resolved Hide resolved
heat/core/statistics.py Outdated Show resolved Hide resolved
added reverences to skew and kurtosis

cleanup, removal of useless code

added warning to documentation

coverage increases and removal of code block in merge moments needed for skew and kurtosis, only required if said functions support multiple axes

coverage update

moved  to the correct alphabetical place in statistics

removed excess try except in

requested changes, doc strings, reordering of moments w axis
@Markus-Goetz Markus-Goetz merged commit d9391fd into master Jul 2, 2020
@Markus-Goetz Markus-Goetz deleted the features/98-moments branch July 2, 2020 08:25
@ClaudiaComito ClaudiaComito added this to Done in Current sprint Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Implement stable statistical (central) moments
2 participants