leaspy.io.data.individual_data
Classes
Container for an individual's data |
Module Contents
- class IndividualData(idx)
Container for an individual’s data
- Parameters:
- idxIDType
Unique ID
- Attributes:
- idxIDType
Unique ID
- timepointsnp.ndarray[float, 1D]
Timepoints associated with the observations
- observationsnp.ndarray[float, 2D]
Observed data points. Shape is
(n_timepoints, n_features)- cofactorsDict[FeatureType, Any]
Cofactors in the form {cofactor_name: cofactor_value}
- event_time: Float
Time of an event, if the event is censored, the time correspond to the last patient observation
- event_bool: bool
Boolean to indicate if an event is censored or not: 1 observed, 0 censored
- Parameters:
idx (leaspy.utils.typing.IDType)
- idx: leaspy.utils.typing.IDType
- add_observations(timepoints, observations)
Include new observations and associated timepoints
- add_event(event_time, event_bool)
Include event time and associated censoring bool