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

linear regression: add xarray wrapper #123

Merged
merged 6 commits into from
Jan 20, 2022

Conversation

mathause
Copy link
Member

@mathause mathause commented Dec 17, 2021

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2021

Codecov Report

Merging #123 (dbe4ecf) into master (54d4406) will increase coverage by 0.54%.
The diff coverage is 97.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
+ Coverage   78.61%   79.16%   +0.54%     
==========================================
  Files          27       28       +1     
  Lines        1300     1339      +39     
==========================================
+ Hits         1022     1060      +38     
- Misses        278      279       +1     
Flag Coverage Δ
unittests 79.16% <97.50%> (+0.54%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mesmer/core/utils.py 94.11% <94.11%> (ø)
mesmer/core/linear_regression.py 100.00% <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 54d4406...dbe4ecf. Read the comment docs.

@mathause
Copy link
Member Author

I am not super happy with this because:

  • testing the sanity of 4 input DataArray inputs harms my sanity
  • (I could use mock but not sure how much better this is)
  • this should probably be encapsulated in a class?
class LinearRegression:don't really like

    def fit(predictors, target, dim, weights):
        pass

    def predict(predictors, dim):
        pass

    def residuals():
        pass

@mathause mathause requested a review from znicholls January 20, 2022 08:09
Copy link
Collaborator

@znicholls znicholls left a comment

Choose a reason for hiding this comment

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

lgtm

@mathause
Copy link
Member Author

I am merging this & move the tests/utils.py in another PR.

@mathause mathause merged commit a0fc099 into MESMER-group:master Jan 20, 2022
@mathause mathause deleted the linear_regression_xr branch January 20, 2022 12:57
@mathause mathause mentioned this pull request Jun 10, 2022
7 tasks
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.

xarray wrapper for linear_regression
3 participants