Closed ryoherisson closed 3 years ago
When all values in real or pred are 0, prts/base/time_series_metrics._prepare_data() will return AssertionError.
change assert np.allclose(np.unique(values_pred), np.array([0, 1])) to np.all(np.isin(np.unique(values_pred), np.array([0, 1])))
np.allclose(np.unique(values_pred), np.array([0, 1]))
np.all(np.isin(np.unique(values_pred), np.array([0, 1])))
np.allclose(np.unique(values_real), np.array([0, 1]))
np.all(np.isin(np.unique(values_real), np.array([0, 1])))
yyyy / mm / dd
If the parent issue exists, post a link here.
If there are any reference links, they are described here.
Other comments.
This issue is not needed.
Summary
When all values in real or pred are 0, prts/base/time_series_metrics._prepare_data() will return AssertionError.
Goal
change assert
np.allclose(np.unique(values_pred), np.array([0, 1]))
tonp.all(np.isin(np.unique(values_pred), np.array([0, 1])))
Todo
np.allclose(np.unique(values_pred), np.array([0, 1]))
tonp.all(np.isin(np.unique(values_pred), np.array([0, 1])))
np.allclose(np.unique(values_real), np.array([0, 1]))
tonp.all(np.isin(np.unique(values_real), np.array([0, 1])))
Deadline
yyyy / mm / dd
Parent issue
If the parent issue exists, post a link here.
References
If there are any reference links, they are described here.
Notes
Other comments.