relife.data.RenewalRewardData
relife.data.RenewalRewardData¶
- class relife.data.RenewalRewardData(T: float, n_indices: int, n_samples: int, indices: numpy.ndarray, samples: numpy.ndarray, times: numpy.ndarray, durations: numpy.ndarray, rewards: numpy.ndarray)[source]¶
Bases:
relife.data.RenewalData
Renewal reward process data.
Notes
Inherit from RenewalData and add a rewards attribute.
Methods
Converts the dataclass attributes as a tuple.
Mean number of events with respect to time.
Mean total reward with respect to time.
Counts the number of events with respect to times.
Total reward with respect to time.
Attributes
The number of indices.
Reward associated at each event.
- rewards: numpy.ndarray¶
Reward associated at each event.
- total_reward(sample: int) Tuple[numpy.ndarray, numpy.ndarray] [source]¶
Total reward with respect to time.
- Parameters
sample (int) – Index of the sample.
- Returns
The ordered times and total rewards as a tuple (times, z).
- Return type
Tuple[ndarray, ndarray]
- mean_total_reward() Tuple[numpy.ndarray, numpy.ndarray] [source]¶
Mean total reward with respect to time.
- Returns
The ordered times and mean total rewards as a tuple (times, z).
- Return type
Tuple[ndarray, ndarray]
- 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
- durations: numpy.ndarray¶
Time between events.