这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix usage of Beta-KGE metric, add CITATION.cfg #82

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

Merged
merged 4 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Kratzert"
given-names: "Frederik"
- family-names: "Gauch"
given-names: "Martin"
- family-names: "Nearing"
given-names: "Grey"
- family-names: "Klotz"
given-names: "Daniel"
title: "NeuralHydrology --- A Python library for Deep Learning research in hydrology"
doi: 10.21105/joss.04050
url: "https://doi.org/10.21105/joss.04050"
preferred-citation:
type: article
authors:
- family-names: "Kratzert"
given-names: "Frederik"
- family-names: "Gauch"
given-names: "Martin"
- family-names: "Nearing"
given-names: "Grey"
- family-names: "Klotz"
given-names: "Daniel"
doi: "10.21105/joss.04050"
journal: "Journal of Open Source Software"
publisher:
name: "The Open Journal"
start: 4050 # First page number
end: 4050 # Last page number
title: "NeuralHydrology --- A Python library for Deep Learning research in hydrology"
number: 71
volume: 7
year: 2022
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ this code in our day-to-day research and will continue to integrate our new rese
- Research Blog: [neuralhydrology.github.io](https://neuralhydrology.github.io)
- Bug reports/Feature requests [https://github.com/neuralhydrology/neuralhydrology/issues](https://github.com/neuralhydrology/neuralhydrology/issues)

# Cite NeuralHydrology

In case you use NeuralHydrology in your research or work, it would be highly appreciated if you include a reference to our [JOSS paper](https://joss.theoj.org/papers/10.21105/joss.04050#) in any kind of publication.

```bibtex
@article{kratzert2022joss,
title = {NeuralHydrology --- A Python library for Deep Learning research in hydrology},
author = {Frederik Kratzert and Martin Gauch and Grey Nearing and Daniel Klotz},
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
year = {2022},
volume = {7},
number = {71},
pages = {4050},
doi = {10.21105/joss.04050},
url = {https://doi.org/10.21105/joss.04050},
}
```

# Contact

Expand Down
2 changes: 1 addition & 1 deletion neuralhydrology/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.3"
__version__ = "1.2.4"
8 changes: 7 additions & 1 deletion neuralhydrology/evaluation/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def get_available_metrics() -> List[str]:
List[str]
List of implemented metric names.
"""
metrics = ["NSE", "MSE", "RMSE", "KGE", "Alpha-NSE", "Pearson-r", "Beta-NSE", "FHV", "FMS", "FLV", "Peak-Timing"]
metrics = [
"NSE", "MSE", "RMSE", "KGE", "Alpha-NSE", "Pearson-r", "Beta-KGE", "Beta-NSE", "FHV", "FMS", "FLV",
"Peak-Timing"
]
return metrics


Expand Down Expand Up @@ -657,6 +660,7 @@ def calculate_all_metrics(obs: DataArray,
"RMSE": rmse(obs, sim),
"KGE": kge(obs, sim),
"Alpha-NSE": alpha_nse(obs, sim),
"Beta-KGE": beta_kge(obs, sim),
"Beta-NSE": beta_nse(obs, sim),
"Pearson-r": pearsonr(obs, sim),
"FHV": fdc_fhv(obs, sim),
Expand Down Expand Up @@ -715,6 +719,8 @@ def calculate_metrics(obs: DataArray,
values["KGE"] = kge(obs, sim)
elif metric.lower() == "alpha-nse":
values["Alpha-NSE"] = alpha_nse(obs, sim)
elif metric.lower() == "beta-kge":
values["Beta-KGE"] = beta_kge(obs, sim)
elif metric.lower() == "beta-nse":
values["Beta-NSE"] = beta_nse(obs, sim)
elif metric.lower() == "pearson-r":
Expand Down