@contract
def mad_threshold(param, limit, utilization):
    """ The MAD based threshold algorithm.

    :param param: The safety parameter.
     :type param: float

    :param limit: The minimum allowed length of the utilization history.
     :type limit: int

    :param utilization: The utilization history to analize.
     :type utilization: list(float)

    :return: A decision of whether the host is overloaded.
     :rtype: bool
    """
    return utilization_threshold_abstract(lambda x: 1 - param * mad(x),
                                          limit,
                                          utilization)
dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/overload/statistics.py/mad_threshold/original