示例#1
0
def model_infl_point(quality,
                     wl_iterations,
                     k=-1,
                     L=-1,
                     infl_point=-1,
                     base_model={}):
    if k != -1 and L != -1:
        infl_point = SketchMatrix.get_inflation_point(k, L)
    m = model(quality, wl_iterations, base_model)
    m.update({"k": k, "L": L, "infl_point": infl_point})
    return m
示例#2
0
def model_score(score, k=-1, L=-1, infl_point=-1, base_model={}):
    if k != -1 and L != -1:
        infl_point = SketchMatrix.get_inflation_point(k, L)
    m = base_model.copy()
    m.update({
        "auc": score[0],
        "accuracy": score[1],
        "precision": score[2],
        "recall": score[3],
        "F1": score[4],
        "k": k,
        "L": L,
        "infl_point": infl_point
    })
    return m
示例#3
0
def model_score(score, k=-1, L=-1, infl_point=-1, base_model = {}):
    if k != -1 and L != -1:
        infl_point = SketchMatrix.get_inflation_point(k, L)
    m = base_model.copy()
    m.update({
        "auc": score[0],
        "accuracy": score[1],
        "precision": score[2],
        "recall": score[3],
        "F1": score[4],
        "k": k,
        "L": L,
        "infl_point": infl_point
    })
    return m
示例#4
0
def model_infl_point(quality, wl_iterations, k=-1, L=-1, infl_point=-1, base_model = {}):
    if k != -1 and L != -1:
        infl_point = SketchMatrix.get_inflation_point(k, L)
    m = model(quality, wl_iterations, base_model)
    m.update({"k": k, "L": L, "infl_point": infl_point})
    return m