コード例 #1
0
def tst_lomax():
    t = Lomax.samples_(1.1, 50, size=10000)
    start = time.time()
    params = Lomax.est_params(t)
    end = time.time()
    print("Estimating parameters of Lomax took: " + str(end - start))
    return abs(params[0] - 1.1) < 1e-1
コード例 #2
0
def compare_loglogistic_fitting_approaches():
    """
    This experiment convinced me to abandon the Lomax
    and Weibull based LogLogistic estimation.
    """
    ti, xi = mixed_loglogistic_model()
    wbl = Weibull.est_params(ti)
    lmx = Lomax.est_params(ti)
    #Now estimate Lomax and Weibull params and construct feature vector.
    x_features = cnstrct_feature(ti)
    beta = sum(x_features * LogLogistic.lin_betas)
    alpha = sum(x_features * LogLogistic.lin_alphas)