You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been trying to use the fit function for training using the HawkesExpKern function, but it seems that the data structure of my events list is wrong.
I'm working on some medical related data for a group of patients, so I have data for every patient, and each patient has some events that occur during a surgery. I have constructed the Hawkes process events timestamps list: that's a Python list containing sub-lists (also Python lists, one for every patient data) that contain 5 numpy.arrays each (each of these is indicating an event category, having their occurrence time in the surgery timeline (from 0 onward). Here's an extract from the list for the first 2 patients:
The problem is that I keep getting an error when running the fit function (after specifying the kernel parameters):
ValueError: Expecting a double numpy array
Am I doing something wrong ?
The text was updated successfully, but these errors were encountered:
Hi @Mbompr ,
Thank you for your response, I followed your suggestion and it magically worked !
Was I having that problem just because of me using int instead of float data type ? I'd like a simple explanation for this if possible. (since I don't think this was explicitly mentioned in the documentation, and that the error message I kept getting was not very expressive)
`
fit(events: list, start=None)
Fit the model according to the given training data.
Parameters
events : list of np.array
The events of each component of the Hawkes. Namely events[j] contains a one-dimensional numpy.array of the events’ timestamps of component j
...
`
Additionally, it'd be so helpful to know, for the events parameter, what are the acceptable data types (would it be possible if we use just nested Python lists or nested np.array lists ) ?
Hi, I've been trying to use the fit function for training using the HawkesExpKern function, but it seems that the data structure of my events list is wrong.
I'm working on some medical related data for a group of patients, so I have data for every patient, and each patient has some events that occur during a surgery. I have constructed the Hawkes process events timestamps list: that's a Python list containing sub-lists (also Python lists, one for every patient data) that contain 5 numpy.arrays each (each of these is indicating an event category, having their occurrence time in the surgery timeline (from 0 onward). Here's an extract from the list for the first 2 patients:
The problem is that I keep getting an error when running the fit function (after specifying the kernel parameters):
ValueError: Expecting a double numpy array
Am I doing something wrong ?
The text was updated successfully, but these errors were encountered: