src/orion/algo/tpe.py
def ramp_up_weights(total_num, flat_num, equal_weight):
    """Adjust weights of observed trials.

    :param total_num: total number of observed trials.
    :param flat_num: the number of the most recent trials which
        get the full weight where the others will be applied with a linear ramp
        from 0 to 1.0. It will only take effect if equal_weight is False.
    :param equal_weight: whether all the observed trails share the same weights.
    """
    if total_num < flat_num or equal_weight:
        return numpy.ones(total_num)

    ramp_weights = numpy.linspace(1.0 / total_num, 1.0, num=total_num - flat_num)
    flat_weights = numpy.ones(flat_num)
    return numpy.concatenate([ramp_weights, flat_weights])
Adjust weights of observed trials.

    :param total_num: total number of observed trials.
    :param flat_num: the number of the most recent trials which
        get the full weight where the others will be applied with a linear ramp
        from 0 to 1.0. It will only take effect if equal_weight is False.
    :param equal_weight: whether all the observed trails share the same weights.
    
Adjust weights of observed trials.
Adjust weights of observed trials .
def ramp_up_weights(total_num, flat_num, equal_weight):
    if total_num < flat_num or equal_weight:
        return numpy.ones(total_num)
    ramp_weights = numpy.linspace(1.0 / total_num, 1.0, num=total_num - flat_num)
    flat_weights = numpy.ones(flat_num)
    return numpy.concatenate([ramp_weights, flat_weights])
def ramp_up_weights ( total_num , flat_num , equal_weight ) : if total_num < flat_num or equal_weight : return numpy . ones ( total_num ) ramp_weights = numpy . linspace ( 1.0 / total_num , 1.0 , num = total_num - flat_num ) flat_weights = numpy . ones ( flat_num ) return numpy . concatenate ( [ ramp_weights , flat_weights ] )
Adjust weights of observed trials.
Adjust weights of observed trials .
"""Adjust weights of observed trials.

    :param total_num: total number of observed trials.
    :param flat_num: the number of the most recent trials which
        get the full weight where the others will be applied with a linear ramp
        from 0 to 1.0. It will only take effect if equal_weight is False.
    :param equal_weight: whether all the observed trails share the same weights.
    """
total_num
total number of observed trials.
total number of observed trials .
flat_num
the number of the most recent trials which
get the full weight where the others will be applied with a linear ramp
from 0 to 1.0. It will only take effect if equal_weight is False.
the number of the most recent trials which get the full weight where the others will be applied with a linear ramp from 0 to 1 . 0 . It will only take effect if equal_weight is False .
equal_weight
whether all the observed trails share the same weights.
whether all the observed trails share the same weights .