Esempio n. 1
0
def correlation():
    "Check correlation between actual object LOC and hours"
    # according [HUMPHREY95] p.513 & p.151:
    # - when 0.9 <= r2 : the relationship is considered predictive
    # - when 0.7 <= r2 < 0.9 : there is a strong correlation
    # - when 0.5 <= r2 < 0.7 : there is an adequate correlation (use with caution)
    # - when r2 < 0.5 : not reliable for planning purposes
    actual_loc, hours = get_projects_metrics()
    r = calc_correlation(actual_loc, hours)
    r2 = r ** 2
    if 0.9 <= r2:
        corr = "high (predictive)"
    elif 0.7 <= r2 < 0.9:
        corr = "strong (planning)"
    elif 0.5 <= r2 < 0.7:
        corr = "adequate (use with care)"
    elif r2 < 0.5:
        corr = "weak (not reliable)"
    return {"loc": actual_loc, "hours": hours, "r2": r ** 2, "correlation": corr}
Esempio n. 2
0
def correlation():
    "Check correlation between actual object LOC and hours"
    # according [HUMPHREY95] p.513 & p.151:
    # - when 0.9 <= r2 : the relationship is considered predictive
    # - when 0.7 <= r2 < 0.9 : there is a strong correlation
    # - when 0.5 <= r2 < 0.7 : there is an adequate correlation (use with caution)
    # - when r2 < 0.5 : not reliable for planning purposes
    actual_loc, hours = get_projects_metrics()
    r = calc_correlation(actual_loc, hours)
    r2 = r**2
    if 0.9 <= r2:
        corr = 'high (predictive)'
    elif 0.7 <= r2 < 0.9:
        corr = 'strong (planning)'
    elif 0.5 <= r2 < 0.7:
        corr = 'adequate (use with care)'
    elif r2 < 0.5:
        corr = 'weak (not reliable)'
    return {'loc': actual_loc, 'hours': hours, 'r2': r**2, 'correlation': corr}
Esempio n. 3
0
def correlation():
    r = calc_correlation(x_values, y_values)
    return {'r2': r**2, 'ok': round(r**2, 4)==0.9107}