SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
fitmetrics.h
Go to the documentation of this file.
1
15#ifndef OPENSWMMVIS_PLOT_FITMETRICS_H
16#define OPENSWMMVIS_PLOT_FITMETRICS_H
17
18#include <vector>
19
20namespace openswmmvis::plot {
21
22struct FitMetrics {
23 double nse = 0.0;
24 double r2 = 0.0;
25 double rmse = 0.0;
26 double pbias = 0.0;
27 int n = 0;
28
30 static FitMetrics compute(const std::vector<double>& observed,
31 const std::vector<double>& simulated);
32};
33
34} // namespace openswmmvis::plot
35
36#endif // OPENSWMMVIS_PLOT_FITMETRICS_H
Definition chartproperties.h:34
Definition fitmetrics.h:22
double r2
Coefficient of determination, Pearson² (0..1).
Definition fitmetrics.h:24
double nse
Nash-Sutcliffe efficiency (≤1, =1 perfect; <0 worse than mean).
Definition fitmetrics.h:23
static FitMetrics compute(const std::vector< double > &observed, const std::vector< double > &simulated)
Compute metrics for two timestep-aligned series.
Definition fitmetrics.cpp:15
double rmse
Root mean square error, same units as inputs.
Definition fitmetrics.h:25
double pbias
Percent bias: 100 * Σ(sim-obs) / Σ(obs).
Definition fitmetrics.h:26
int n
Number of paired non-NaN samples used.
Definition fitmetrics.h:27