GithubHelp home page GithubHelp logo

byu-hydroinformatics / hydroerr Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 6.0 834 KB

Goodness of Fit metrics for use in comparison studies, specifically in the field of hydrology.

License: MIT License

Python 100.00%

hydroerr's Introduction

Build Status codecov

Goodness of fit metrics for use in comparison studies, specifically for use in the field of hydrology

HydroErr provides:

  • A library of over 70 error metrics to measure hydrologic skill
  • Treatment of NaN, Inf, negative, and zero values.
  • Scholarly journal sources and code examples for metric methods in the documentation.

Publications:

  • Roberts, W., Williams, G., Jackson, E., Nelson, E., Ames, D., 2018. Hydrostats: A Python Package for Characterizing Errors between Observed and Predicted Time Series. Hydrology 5(4) 66, doi:10.3390/hydrology5040066

We would request that if you use this package that you please cite the above paper. The journal paper is open access and can be found at https://doi.org/10.3390/hydrology5040066. BibTeX, EndNote, and RIS files can be downloaded at the journal site.

Powered by BYU Hydroinformatics

hydroerr's People

Contributors

pythonweb2 avatar

Stargazers

 hydroGuo avatar Amin Shakya avatar Vivek avatar Dillon Ragar avatar Michel Wortmann avatar Alex avatar Matt Bartos avatar  avatar  avatar  avatar Constantine Karos avatar Huang Zeqin avatar Fernando Aristizabal avatar Jemma Stachelek avatar Taher Chegini avatar Tim Cera avatar Yuhang Zhang avatar Pangam Heramb avatar taruma sakti megariansyah avatar Jason A. Regina avatar baoqingling avatar Felix Froehlich avatar Ryoko Araki avatar xiong shaotang  avatar Saswata Nandi avatar Nina Effenberger avatar JianFei Zhao avatar  avatar Allie .S Ubisse avatar Pieter Jan Haest avatar foo2d avatar Çağrı Karaman avatar Jack Kittle avatar Zaiyang MA avatar Hongren avatar Kent avatar Daniele Nerini avatar Tero Niemi avatar Liang-Jun Zhu avatar Paul avatar Martin Roberge avatar

Watchers

Jack Kittle avatar James Cloos avatar  avatar

hydroerr's Issues

HydroErr R_squared vs HydroErr NSE vs Sklearn R_squared

I tried comparing the output of HydroErr's r_squared and nse with SKLearn's r2 score.

I found out that HydroErr's NSE and Sklearn's r2 scores are the same. Meanwhile HydroErr's R_squared is different from SKLearn's R2 score. Is this a bug? If not, can someone help me understand the reason for the discrepancy?

Below is a sample code:

from sklearn.metrics import r2_score
import HydroErr as he

y_true = [3, -0.5, 2, 7]
y_pred = [2.5, 0.0, 2, 8]
sklearn_r2 = r2_score(y_true=y_true, y_pred=y_pred)
hydroer_nse = he.nse(simulated_array=y_pred, observed_array=y_true)
hydroer_r2 = he.r_squared(simulated_array=y_pred, observed_array=y_true)

print("SKLearn R2: ", sklearn_r2)
print("HydroErr NSE: ", hydroer_nse)
print("HydroErr R2: ", hydroer_r2)

# # Output ##
# SKLearn R2:  0.9486081370449679
# HydroErr NSE:  0.9486081370449679
# HydroErr R2:  0.9699681653424412

As you can see above, SKLearn's R2 and HydroErr's NSE are the exact same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.