relife.data.CountData
relife.data.CountData¶
- class relife.data.CountData(T: float, n_indices: int, n_samples: int, indices: numpy.ndarray, samples: numpy.ndarray, times: numpy.ndarray)[source]¶
Bases:
object
Counting process data.
Methods
Converts the dataclass attributes as a tuple.
Mean number of events with respect to time.
Counts the number of events with respect to times.
Attributes
The number of indices.
Time at the end of the observation.
Number of initial assets.
Numbers of samples.
Indices of assets.
Indices of samples.
Times of observed events.
- T: float¶
Time at the end of the observation.
- n_indices: int¶
Number of initial assets.
- n_samples: int¶
Numbers of samples.
- indices: numpy.ndarray¶
Indices of assets.
- samples: numpy.ndarray¶
Indices of samples.
- times: numpy.ndarray¶
Times of observed events.
- property size: int¶
The number of indices.
- Returns
Size of indices array.
- Return type
int
- number_of_events(sample: int) Tuple[numpy.ndarray, numpy.ndarray] [source]¶
Counts the number of events with respect to times.
- Parameters
sample (int) – Index of the sample.
- Returns
The ordered times and total number of events as a tuple (times, counts).
- Return type
Tuple[ndarray, ndarray]