This issue is caused by zero division leading to np.nan values, so this PR adds a fix by filling np.nan values with zero during the calculation of the SMAPE metric.
This PR also updates the test_performance_metrics() method in the TestPerformanceMetrics class in tests.test_diagnostics.py to cover all metrics handling zero values for y and yhat.
This PR resolves Issue #2577
This issue is caused by zero division leading to
np.nan
values, so this PR adds a fix by fillingnp.nan
values with zero during the calculation of the SMAPE metric.This PR also updates the
test_performance_metrics()
method in theTestPerformanceMetrics
class intests.test_diagnostics.py
to cover all metrics handling zero values fory
andyhat
.