@contract
def loess_parameter_estimates(data):
    """ Calculate Loess parameter estimates.

    :param data: A data set.
     :type data: list(float)

    :return: The parameter estimates.
     :rtype: list(float)
    """
    def f(p, x, y, weights):
        return weights * (y - (p[0] + p[1] * x))

    n = len(data)
    estimates, _ = leastsq(f, [1., 1.], args=(
        np.array(range(1, n + 1)),
        np.array(data),
        np.array(tricube_weights(n))))

    return estimates.tolist()
dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/overload/statistics.py/loess_parameter_estimates/original