relife.reward.FailureCost

relife.reward.FailureCost

class relife.reward.FailureCost[source]

Bases: relife.reward.Reward

Run-to-failure costs.

The replacements occur upon failures with costs cf.

Methods

conditional_expectation

Conditional expected reward.

sample

Reward conditional sampling.

conditional_expectation(x: numpy.ndarray, cf: numpy.ndarray) numpy.ndarray[source]

Conditional expected reward.

Parameters
  • x (ndarray) – Duration.

  • *reward_args (ndarray) – Extra arguments of the reward random variable.

Returns

The conditional expected reward with respect to the duration.

Return type

ndarray

sample(x: numpy.ndarray, *reward_args: numpy.ndarray) numpy.ndarray

Reward conditional sampling.

Parameters
  • x (ndarray) – Duration.

  • *reward_args (ndarray) – Extra arguments of the reward random variable.

Returns

Random drawing of a reward with respect to the duration.

Return type

ndarray