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

WIP: Better parallel implementation of linear regression #62

Merged
merged 3 commits into from
Apr 12, 2020

Conversation

jbusecke
Copy link
Owner

@jbusecke jbusecke commented Apr 10, 2020

The previous implementation of xr_linregress, required to chunk data in one piece in time, making it wildly unpractical for e.g. long climate simulations (which are typically chunked in time).

This PR implements the basic methodology behind scipy.stats.linregress in mostly xarray.
Extensive testing makes sure that the results are exactly as if scipy.stats.linregress was applied along single vectors along the dimension dim.

I am fast tracking this PR without much documentation, since I need it for a project and also this might have to be refactored, once xarray implements part of this functionality (see e.g. here).

  • Tests

    • Pass locally
    • CI
  • Docs

    • Minimal example in notebook
    • Entry in whats new (This is a breaking change)

@codecov
Copy link

codecov bot commented Apr 10, 2020

Codecov Report

Merging #62 into master will decrease coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   48.23%   48.05%   -0.19%     
==========================================
  Files          13       13              
  Lines        1391     1388       -3     
  Branches      324      319       -5     
==========================================
- Hits          671      667       -4     
  Misses        665      665              
- Partials       55       56       +1     
Impacted Files Coverage Δ
xarrayutils/utils.py 39.50% <100.00%> (-0.64%) ⬇️
xarrayutils/_version.py 36.91% <0.00%> (-0.36%) ⬇️

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 1943d8e...52166b1. Read the comment docs.

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

Successfully merging this pull request may close these issues.

None yet

1 participant