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

adding RSS and RMS #176

Merged
merged 4 commits into from
Jan 20, 2024
Merged

adding RSS and RMS #176

merged 4 commits into from
Jan 20, 2024

Conversation

sebasmos
Copy link

Contributions:

included and tested the metrics RSS and RSM, it is suggested in the reference below

Reference:

Oliver, M. A., & Webster, R. (2015). Basic steps in geostatistics: the variogram and kriging (No. 11599). Cham, Switzerland: Springer International Publishing.

Link: https://link.springer.com/book/10.1007/978-3-319-15865-5

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (60a6ea5) 90.74% compared to head (6308149) 90.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   90.74%   90.77%   +0.02%     
==========================================
  Files          23       23              
  Lines        2475     2482       +7     
==========================================
+ Hits         2246     2253       +7     
  Misses        229      229              

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

Copy link
Owner

@mmaelicke mmaelicke left a comment

Choose a reason for hiding this comment

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

Hi,
Thanks a lot for your contribution!
I have a minor comment that needs clarification.

float
Root Mean Square of the residuals.
"""
return np.sqrt(np.nanmean(np.square(self.model_residuals)))
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry if I'm blind right now, but is this not the same as Variogram.rmse?
We could update the the existing rmse with this implementation, which is way cleaner; or let Variogram.rmse just call your function.

Copy link
Author

Choose a reason for hiding this comment

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

It seems like mean square of the residuals (RMS) could be the Root Mean Square Error (RMSE), however in the book 1 its not explicitaly menctioned ~ which is why I added it separately; similarly here is used with the same nomenclature 2.

It could be a typo in the book (?) and its just the RMSE, for me leaving RMSE is fine..

Copy link
Owner

Choose a reason for hiding this comment

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

I pointed my old Variogram.rmse to your Variogram.root_mean_square and all the tests still work, so in fact, it is the same thing.
Then, we keep both with Variogram.rmse simply calling Variogram.root_mean_square, as it has the much cleaner implementation.

Comment on lines +2417 to +2418
def rss(self):
return self.residual_sum_of_squares
Copy link
Owner

Choose a reason for hiding this comment

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

I added this, cause I like to have both, the full name and the short name.

Copy link
Author

Choose a reason for hiding this comment

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

Sounds great

@mmaelicke mmaelicke merged commit 871eb45 into mmaelicke:main Jan 20, 2024
12 checks passed
@mmaelicke
Copy link
Owner

Thanks again. Just published as 1.0.16 on PyPI.

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.

2 participants