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 Primarily used when testing the functions in ALT_fitters

Inputs: distribution - “Weibull”, “Exponential”, “Lognormal”, or “Normal” life_stress_model - “Exponential”, “Eyring”, “Power”, “Dual_Exponential”, “Power_Exponential”, “Dual_Power” stress_1 - array or list of the stresses. eg. [100,50,10]. stress_2 - array or list of the stresses. eg. [0.8,0.6,0.4]. Required only if using a dual stress model. Must match the length of stress_1. a - parameter from all models b - parameter from Exponential and Dual_Exponential models c - parameter from Eyring, Dual_Exponential, Power_Exponential, and Dual_Power models n - parameter from Power, Power_Exponential, and Dual_Power models m - parameter from Dual_Power model beta - shape parameter for Weibull distributon sigma - shape parameter for Normal or Lognormal distributions use_level_stress - Optional input. A number (if single stress) or list or array (if dual stress) number_of_samples - the number of samples to generate for each stress. Default is 100. The total data points will be equal to the number of samples x number of stress levels fraction_censored - 0 for no censoring or 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. seed - random seed for repeatability

Outputs: If using a single stress model: failures - list failure_stresses - list right_censored - list (only provided if fraction_censored > 0) right_censored_stresses - list (only provided if fraction_censored > 0)

If using a dual stress model: failures - list failure_stresses_1 - list failure_stresses_2 - list right_censored - list (only provided if fraction_censored > 0) right_censored_stresses_1 - list (only provided if fraction_censored > 0) right_censored_stresses_2 - list (only provided if fraction_censored > 0) mean_life_at_use_stress - float (only provided if use_level_stress is provided)