https://raw.githubusercontent.com/MatthewReid854/reliability/master/docs/images/logo.png

make_ALT_data

class reliability.Other_functions.make_ALT_data(distribution, life_stress_model, stress_1, stress_2=None, a=None, b=None, c=None, n=None, m=None, beta=None, sigma=None, use_level_stress=None, number_of_samples=100, fraction_censored=0.5, seed=None)

Generates Accelerated Life Test (ALT) data based on model parameters. This function is primarily used when testing the functions in ALT_fitters.

Parameters:
  • distribution (str) – Must be either “Weibull”, “Exponential”, “Lognormal”, or “Normal”.

  • life_stress_model (str) – Must be either “Exponential”, “Eyring”, “Power”, “Dual_Exponential”, “Power_Exponential”, or “Dual_Power”

  • stress_1 (array, list) – The stresses for the ALT data. eg. [100,50,10].

  • stress_2 (array, list) – The stresses for the ALT data. eg. [0.8,0.6,0.4]. Required only if using a dual stress model. Must match the length of stress_1.

  • a (float, int) – Parameter from all models.

  • b (float, int, optional) – Parameter from Exponential and Dual_Exponential models.

  • c (float, int, optional) – Parameter from Eyring, Dual_Exponential, Power_Exponential, and Dual_Power models.

  • n (float, int, optional) – Parameter from Power, Power_Exponential, and Dual_Power models.

  • m (float, int, optional) – Parameter from Dual_Power model.

  • beta (float, int, optional) – Shape parameter for Weibull distribution.

  • sigma (float, int, optional) – Shape parameter for Normal or Lognormal distributions.

  • use_level_stress (float, int, list, array, optional) – A float or int (if single stress) or a list or array (if dual stress). Optional input. Default = None.

  • number_of_samples (int, optional) – The number of samples to generate for each stress. Default = 100. The total data points will be equal to the number of samples x number of stress levels

  • fraction_censored (int, float, optional) – Use 0 for no censoring or specify a float between 0 and 1 for right censoring. Censoring is “multiply censored” meaning that there is no threshold above which all the right censored values will occur. Default = 0.5.

  • seed (int, optional) – The random seed for repeatability. Default = None.

Returns:

  • failures (list) – The failure data.

  • failure_stresses (list) – The failure stresses that are paired with the failure data. Only provided if using a single stress model.

  • failure_stresses_1 (list) – The failure stresses for stress_1 that are paired with the failure data. Only provided if using a dual stress model.

  • failure_stresses_2 (list) – The failure stresses for stress_2 that are paired with the failure data. Only provided if using a dual stress model.

  • right_censored (list) – The right censored data. This is only provided if fraction_censored > 0.

  • right_censored_stresses (list) – The failure stresses that are paired with the right censored data. This is only provided if fraction_censored > 0. Only provided if using a single stress model.

  • right_censored_stresses_1 (list) – The failure stresses that are paired with the right censored data. This is only provided if fraction_censored > 0. Only provided if using a dual stress model.

  • right_censored_stresses_2 (list) – The failure stresses that are paired with the right censored data. This is only provided if fraction_censored > 0. Only provided if using a dual stress model.

  • mean_life_at_use_stress (float) – This is only provided if use_level_stress is provided.