-
- Downloads
Fix expanded-dim inputs handling in MAE, MSE and R2 metrics.
Until now, when provided with y_true:<shape>, y_pred:(<shape>, 1) inputs, the MAE, MSE and R2 metrics would be entirely wrong, due to the way numpy casts operations between such inputs. This patch adds some shape-verification and squeezing operations that fix the computations. Unit tests were added to cover this case.
parent
cfb294ea
No related branches found
No related tags found
Showing
- declearn/metrics/_mean.py 3 additions, 0 deletionsdeclearn/metrics/_mean.py
- declearn/metrics/_rsquared.py 2 additions, 0 deletionsdeclearn/metrics/_rsquared.py
- declearn/metrics/_utils.py 54 additions, 0 deletionsdeclearn/metrics/_utils.py
- test/metrics/test_mae_mse.py 24 additions, 2 deletionstest/metrics/test_mae_mse.py
declearn/metrics/_utils.py
0 → 100644
Please register or sign in to comment