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

Add data tree and dataset formats to linear regression #566

Merged

Conversation

veni-vidi-vici-dormivi
Copy link
Collaborator

@veni-vidi-vici-dormivi veni-vidi-vici-dormivi commented Nov 21, 2024

I implement handling of DataTrees and xr.Datasets as predictor formats.

@veni-vidi-vici-dormivi
Copy link
Collaborator Author

Inlcudes #361

Copy link
Member

@mathause mathause left a comment

Choose a reason for hiding this comment

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

Looks good - some suggestions.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.93%. Comparing base (b80d031) to head (eb5d463).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
mesmer/stats/_linear_regression.py 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #566      +/-   ##
==========================================
+ Coverage   77.75%   77.93%   +0.17%     
==========================================
  Files          49       49              
  Lines        2967     2986      +19     
==========================================
+ Hits         2307     2327      +20     
+ Misses        660      659       -1     
Flag Coverage Δ
unittests 77.93% <97.61%> (+0.17%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@veni-vidi-vici-dormivi
Copy link
Collaborator Author

Okay it is good to go from my side. The only thing that is a little sad is that one cannot use a DataTree or Dataset to make predictions with a coordinate like time but in this case one just has to pass it as a dict. 🤷‍♀️

Copy link
Member

@mathause mathause left a comment

Choose a reason for hiding this comment

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

Two more questions but good to merge. Thanks!

@veni-vidi-vici-dormivi veni-vidi-vici-dormivi merged commit 9ebcd27 into MESMER-group:main Nov 26, 2024
11 checks passed
@veni-vidi-vici-dormivi veni-vidi-vici-dormivi deleted the dt_linreg branch November 26, 2024 13:31
veni-vidi-vici-dormivi added a commit to veni-vidi-vici-dormivi/mesmer that referenced this pull request Nov 27, 2024
)

* implement datatree and dataset in linear regression

* tests

* extend tests to root dt

---------

Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

stack predictors and targets for xarray objects
2 participants