|
ocssw
V2022
|
Functions | |
| def | validate_shape (func) |
| def | only_finite (func) |
| def | only_positive (func) |
| def | label (name) |
| def | rmse (y, y_hat) |
| def | rmsle (y, y_hat) |
| def | nrmse (y, y_hat) |
| def | mae (y, y_hat) |
| def | mape (y, y_hat) |
| def | leqz (y, y_hat=None) |
| def | leqznan (y, y_hat=None) |
| def | mdsa (y, y_hat) |
| def | msa (y, y_hat) |
| def | sspb (y, y_hat) |
| def | bias (y, y_hat) |
| def | r_squared (y, y_hat) |
| def | slope (y, y_hat) |
| def | intercept (y, y_hat) |
| def | mwr (y, y_hat, y_bench) |
| def | performance (key, y, y_hat, metrics=[mdsa, sspb, slope, msa, rmsle, mae, leqznan], csv=False) |
Function Documentation
◆ bias()
| def MDN.metrics.bias | ( | y, | |
| y_hat | |||
| ) |
Mean Bias
Definition at line 155 of file metrics.py.
◆ intercept()
| def MDN.metrics.intercept | ( | y, | |
| y_hat | |||
| ) |
Locarithmic intercept
Definition at line 181 of file metrics.py.
◆ label()
| def MDN.metrics.label | ( | name | ) |
Label a function to aid in printing
Definition at line 43 of file metrics.py.
◆ leqz()
| def MDN.metrics.leqz | ( | y, | |
y_hat = None |
|||
| ) |
Less than or equal to zero (y_hat)
Definition at line 111 of file metrics.py.
◆ leqznan()
| def MDN.metrics.leqznan | ( | y, | |
y_hat = None |
|||
| ) |
Less than or equal to zero (y_hat)
Definition at line 119 of file metrics.py.
◆ mae()
| def MDN.metrics.mae | ( | y, | |
| y_hat | |||
| ) |
Mean Absolute Error
Definition at line 97 of file metrics.py.
◆ mape()
| def MDN.metrics.mape | ( | y, | |
| y_hat | |||
| ) |
Mean Absolute Percentage Error
Definition at line 104 of file metrics.py.
◆ mdsa()
| def MDN.metrics.mdsa | ( | y, | |
| y_hat | |||
| ) |
Median Symmetric Accuracy
Definition at line 128 of file metrics.py.
◆ msa()
| def MDN.metrics.msa | ( | y, | |
| y_hat | |||
| ) |
Mean Symmetric Accuracy
Definition at line 137 of file metrics.py.
◆ mwr()
| def MDN.metrics.mwr | ( | y, | |
| y_hat, | |||
| y_bench | |||
| ) |
Model Win Rate - Percent of samples in which model has a closer
estimate than the benchmark.
y: true, y_hat: model, y_bench: benchmark
Definition at line 189 of file metrics.py.
◆ nrmse()
| def MDN.metrics.nrmse | ( | y, | |
| y_hat | |||
| ) |
Normalized Root Mean Squared Error
Definition at line 90 of file metrics.py.
◆ only_finite()
| def MDN.metrics.only_finite | ( | func | ) |
Decorator to remove samples which are nan in any input array
Definition at line 19 of file metrics.py.
◆ only_positive()
| def MDN.metrics.only_positive | ( | func | ) |
Decorator to remove samples which are zero/negative in any input array
Definition at line 31 of file metrics.py.
◆ performance()
| def MDN.metrics.performance | ( | key, | |
| y, | |||
| y_hat, | |||
metrics = [mdsa, sspb, slope, msa, rmsle, mae, leqznan], |
|||
csv = False |
|||
| ) |
Return a string containing performance using various metrics.
y should be the true value, y_hat the estimated value.
Definition at line 208 of file metrics.py.
◆ r_squared()
| def MDN.metrics.r_squared | ( | y, | |
| y_hat | |||
| ) |
Logarithmic R^2
Definition at line 163 of file metrics.py.
◆ rmse()
| def MDN.metrics.rmse | ( | y, | |
| y_hat | |||
| ) |
Root Mean Squared Error
Definition at line 75 of file metrics.py.
◆ rmsle()
| def MDN.metrics.rmsle | ( | y, | |
| y_hat | |||
| ) |
Root Mean Squared Logarithmic Error
Definition at line 83 of file metrics.py.
◆ slope()
| def MDN.metrics.slope | ( | y, | |
| y_hat | |||
| ) |
Logarithmic slope
Definition at line 172 of file metrics.py.
◆ sspb()
| def MDN.metrics.sspb | ( | y, | |
| y_hat | |||
| ) |
Symmetric Signed Percentage Bias
Definition at line 146 of file metrics.py.
◆ validate_shape()
| def MDN.metrics.validate_shape | ( | func | ) |
Decorator to flatten all function input arrays, and ensure shapes are the same
Definition at line 7 of file metrics.py.


