def rss_for_region2(params, ols_data):
    # deprecated
    """
    DEPRECATED: use likelihood_util.rss_line_segment
    """

    print("DEPRECATED: use likelihood_util.rss_line_segment")

    u, v, m = params

    num_data = ols_data[0]
    sum_x = ols_data[1]
    sum_y = ols_data[2]
    sum_xx = ols_data[3]
    sum_yy = ols_data[4]
    sum_xy = ols_data[5]

    two_m = 2.0 * m
    mm = m * m
    mmu = mm * u
    return ((v * v - two_m * u * v + mmu * u) * num_data
            + 2.0 * (m * v - mmu) * sum_x
            + 2.0 * (m * u - v) * sum_y
            + mm * sum_xx
            + sum_yy
            - two_m * sum_xy)