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

Features/#11/gamma select #22

Closed ryoherisson closed 3 years ago

ryoherisson commented 3 years ago

Summary

Implement the common function _gamma_select as follows:

    def _gamma_select(self, gamma, overlap):
        if gamma == "one":
            return 1.0
        elif gamma == "reciprocal":
            if overlap > 1:
                return 1.0 / overlap
            else:
                return 1.0
        elif gamma == "udf_gamma":
            if overlap > 1:
                return 1.0 / self._udf_gamma(overlap)
            else:
                return 1.0

Goal

Make it possible to select the gamma value according to the parameters.

Todo

Deadline

yyyy / mm / dd

Parent issue

11

References

If there are any reference links, they are described here.

Notes

Other comments.

ryoherisson commented 3 years ago

utestで、W292 no newline at end of file と出るので、各ファイル最後に空行追加しておく必要あり

nocotan commented 3 years ago

@ryoherisson LGTM

sarrrrry commented 3 years ago

@ryoherisson

Issue消化ありがとうございます! mergeされた後で申し訳ないのですが、 Interfaceには実装を記述するのは運用の想定と違うため以下のいずれかに修正おねがいできますでしょうか?

参考: Interfaceとは

nocotan commented 3 years ago

@sarrrrry @ryoherisson OK, I will create another issue w.r.t rewriting interface to base class.