CompML / PRTS

Unofficial Python implementation of "Precision and Recall for Time Series".
https://papers.nips.cc/paper/2018/file/8f468c873a32bb0619eaeb2050ba45d1-Paper.pdf
Apache License 2.0
38 stars 4 forks source link

fix when all values in pred or real are 0 #70

Closed ryoherisson closed 3 years ago

ryoherisson commented 3 years ago

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])) to np.all(np.isin(np.unique(values_pred), np.array([0, 1])))

Todo

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.

ryoherisson commented 3 years ago

This issue is not needed.