relife.data.RenewalData
relife.data.RenewalData¶
- class relife.data.RenewalData(T: float, n_indices: int, n_samples: int, indices: numpy.ndarray, samples: numpy.ndarray, times: numpy.ndarray, durations: numpy.ndarray)[source]¶
Bases:
relife.data.CountData
Renewal process data.
Notes
Inherit from CountData and add a durations attribute.
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 between events.
- durations: numpy.ndarray¶
Time between events.
- astuple() tuple ¶
Converts the dataclass attributes as a tuple.
- mean_number_of_events() Tuple[numpy.ndarray, numpy.ndarray] ¶
Mean number of events with respect to time.
- Returns
The ordered times and mean number of events as a tuple (times, counts).
- Return type
Tuple[ndarray, ndarray]
- number_of_events(sample: int) Tuple[numpy.ndarray, numpy.ndarray] ¶
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]
- property size: int¶
The number of indices.
- Returns
Size of indices array.
- Return type
int
- 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.