Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def LL(params, T_f, T_rc): # log likelihood function (2 parameter weibull)
LL_f = 0
LL_rc = 0
LL_f += Fit_Normal_2P.logf(T_f, params[0], params[1]).sum() # failure times
LL_rc += Fit_Normal_2P.logR(T_rc, params[0], params[1]).sum() # right censored times
return -(LL_f + LL_rc)
def LL_fs(params, T_f, T_rc, force_sigma): # log likelihood function (2 parameter weibull) FORCED SIGMA
LL_f = 0
LL_rc = 0
LL_f += Fit_Normal_2P.logf(T_f, params[0], force_sigma).sum() # failure times
LL_rc += Fit_Normal_2P.logR(T_rc, params[0], force_sigma).sum() # right censored times
return -(LL_f + LL_rc)