tick icon indicating copy to clipboard operation
tick copied to clipboard

Please add parameter 'end_times' for tick.hawkes.HawkesExpKern.fit()

Open yaowang74 opened this issue 4 years ago • 0 comments

In tick/tick/hawkes/model/base/model_hawkes.py, lines 91 to 94, we have

91 end_times = self._end_times 92 if end_times is None: 93 non_empty_events = [[r for r in e if len(r) > 0] for e in events] 94 end_times = np.array([max(map(max, e)) for e in non_empty_events])

if non_empty_events list is also empty, line 94 will spit an error on using max function on empty list.

In practice, it would be great if we can have an option to manually specify the 'end_times' for .fit() method. Thank you.

yaowang74 avatar May 17 '20 18:05 yaowang74