probabilistic_models module

class probabilistic_model.probabilistic_models.Exponential(X_values, Y_values, X_values2=array([], dtype=float64))[source]

Bases: ProbModel

static estimate_params(data, **kwargs)[source]
log_likelihood(params, temp, sigma_values, strain_values=array([], dtype=float64))[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

  • strain (np.ndarray) – Defaults to np.array([]).

Returns:

Gives a negative sum of log likelihood for given data

predict(cdf, temperature_values)[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Returns:

Predict values according to the trained model

property st_description
transform(data, temp)[source]
two_var_predict(cdf, temperature_values, strain_values, params)[source]

To predict values when there are two accelerating variables

Args:

cdf (float) temperature_values (np.ndarray) strain_values (np.ndarray) params (np.ndarray): Parameters that will be needed to predict values

u,w,v= params.

Return type:

ndarray

class probabilistic_model.probabilistic_models.Gamma(X_values, Y_values, X_values2=array([], dtype=float64))[source]

Bases: ProbModel

static estimate_params(data, **kwargs)[source]

Fit a gamma model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted gamma model

log_likelihood(params, temp, sigma_values, strain_values=array([], dtype=float64))[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

  • strain (np.ndarray) – Defaults to np.array([]).

Returns:

Gives a negative sum of log likelihood for given data

predict(cdf, temperature_values, strain_values=array([], dtype=float64))[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Returns:

Predict values according to the trained model

property st_description
transform(data, temp)[source]
two_var_predict(cdf, temperature_values, strain_values, params)[source]

To predict values when there are two accelerating variables

Args:

cdf (float) temperature_values (np.ndarray) strain_values (np.ndarray) params (np.ndarray): Parameters that will be needed to predict values

shape,u,w,v= params.

Return type:

ndarray

class probabilistic_model.probabilistic_models.Gumbell(X_values, Y_values, X_values2=array([], dtype=float64))[source]

Bases: ProbModel

static estimate_params(data, **kwargs)[source]

Fit a gumbell model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted gumbell model

log_likelihood(params, temp, sigma_values, strain_values=array([], dtype=float64))[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

  • strain (np.ndarray) – Defaults to np.array([]).

Returns:

Gives a negative sum of log likelihood for given data

predict(cdf, temperature_values, strain_values=array([], dtype=float64))[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Returns:

Predict values according to the trained model

property st_description
transform(data, temp)[source]
two_var_predict(cdf, temperature_values, strain_values, params)[source]

To predict values when there are two accelerating variables

Args:

cdf (float) temperature_values (np.ndarray) strain_values (np.ndarray) params (np.ndarray): Parameters that will be needed to predict values

u,w,scale,v= params.

Return type:

ndarray

class probabilistic_model.probabilistic_models.LognormalModel(X_values, Y_values, X_values2=array([], dtype=float64), power_law=False)[source]

Bases: ProbModel

static estimate_params(data)[source]

Fit a Lognormal model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted Lognormal model

log_likelihood(params, temp, sigma_values, strain=array([], dtype=float64))[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

  • strain (np.ndarray) – Defaults to np.array([]).

Returns:

Gives a negative sum of log likelihood for given data

predict(cdf, temperature_values, strain_values=array([], dtype=float64))[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Returns:

Predict values according to the trained model

property st_description
transform(data, temp)[source]
two_var_predict(cdf, temperature_values, strain_values, params)[source]

To predict values when there are two accelerating variables

Args:

cdf (float) temperature_values (np.ndarray) strain_values (np.ndarray) params (np.ndarray): Parameters that will be needed to predict values

k, m, sigma, l= params.

Return type:

ndarray

class probabilistic_model.probabilistic_models.LognormalModel3(X_values, Y_values)[source]

Bases: ProbModel

static estimate_params(data)[source]

Fit a lognormal 3-parameter model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted lognormal 3-parameter model

log_likelihood(params, temp, sigma_values)[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

Returns:

Gives a negative sum of log likelihood for given data

minimize()[source]
predict(cdf, temperature_values)[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Returns:

Predict values according to the trained model

property st_description
transform(data, temp)[source]
class probabilistic_model.probabilistic_models.NormalModel(X_values, Y_values, X_values2=array([], dtype=float64))[source]

Bases: ProbModel

static estimate_params(data)[source]

Fit a normal model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted normal model

log_likelihood(params, temp, sigma_values, strain=array([], dtype=float64))[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

  • strain (np.ndarray) – Defaults to np.array([]).

Returns:

Gives a negative sum of log likelihood for given data

predict(cdf, temperature_values, strain_values=array([], dtype=float64))[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Returns:

Predict values according to the trained model

property st_description
transform(data, temp)[source]
two_var_predict(cdf, temperature_values, strain_values, params)[source]

To predict values when there are two accelerating variables

Args:

cdf (float) temperature_values (np.ndarray) strain_values (np.ndarray) params (np.ndarray): Parameters that will be needed to predict values

sigma, k, m, l= params.

Return type:

ndarray

class probabilistic_model.probabilistic_models.ProbModel[source]

Bases: ABC

abstract log_likelihood(params, temp, sigma_values, strain=array([], dtype=float64))[source]
minimize(bounds, args)[source]
Return type:

ndarray

power_st_description(cdf, pdf, re_cdf, ar_cdf, fatigue_cdf, variable_values)[source]
abstract predict()[source]
st_description(cdf, pdf, re_cdf, ar_cdf, fatigue_cdf, variable_values)[source]
class probabilistic_model.probabilistic_models.WalkerEq(df, isLinear=True)[source]

Bases: object

arrhenius_walker_regr()[source]
implement_paris_eq()[source]

Implementation of Paris–Erdoğan equation

implement_walker_eq()[source]
static lin_reg(X, Y)[source]
linear_walker_regr()[source]
plot_da_dN_vs_deltaK_equation()[source]
plot_da_dN_vs_r_ratio_equation()[source]
plot_da_dN_vs_temperature_equation()[source]
regression_dAdN_error_plot()[source]
regression_dAdN_plot()[source]
regression_plot(slope, intercept)[source]
regression_walker_eq()[source]
st_description()[source]
class probabilistic_model.probabilistic_models.WeibullModel(X_values, Y_values, X_values2=array([], dtype=float64), power_law=False)[source]

Bases: ProbModel

static estimate_params(data, **kwargs)[source]

Fit a weibull model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted weibull model

log_likelihood(params, temp, sigma_values, strain=array([], dtype=float64))[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

  • strain (np.ndarray) – Defaults to np.array([]).

Returns:

Gives a negative sum of log likelihood for given data

predict(cdf, temperature_values, strain_values=array([], dtype=float64))[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

  • strain_values (np.ndarray) – Defaults to np.array([])

Return type:

ndarray

Returns:

Predict values according to the trained model

property st_description

Description of this model to be used in the streamlit website

transform(data)[source]
two_var_predict(cdf, temperature_values, strain_values, params)[source]

To predict values when there are two accelerating variables

Args:

cdf (float) temperature_values (np.ndarray) strain_values (np.ndarray) params (np.ndarray): Parameters that will be needed to predict values

shape, intercept, slope, v = params.

Return type:

ndarray

class probabilistic_model.probabilistic_models.WeibullModel3(X_values, Y_values)[source]

Bases: ProbModel

static estimate_params(data, **kwargs)[source]

Fit a weibull 3-parameter model on the data

Parameters:

data (np.ndarray)

Returns:

Gives shape and scale of the fitted weibull 3-parameter model

log_likelihood(params, temp, sigma_values)[source]

Log likelihood

Parameters:
  • params (list) – parameters that are to be determined

  • temp (np.ndarray)

  • sigma_values (np.ndarray)

Returns:

Gives a negative sum of log likelihood for given data

minimize()[source]
predict(cdf, temperature_values)[source]

To predict values

Parameters:
  • cdf (float)

  • temperature_values (np.ndarray)

Returns:

Predict values according to the trained model

property st_description
transform(data)[source]