Beispiel #1
0
def many_dists():
    a = hp_choice('a', [0, 1, 2])
    b = hp_randint('b', 10)
    c = hp_uniform('c', 4, 7)
    d = hp_loguniform('d', -2, 0)
    e = hp_quniform('e', 0, 10, 3)
    f = hp_qloguniform('f', 0, 3, 2)
    g = hp_normal('g', 4, 7)
    h = hp_lognormal('h', -2, 2)
    i = hp_qnormal('i', 0, 10, 2)
    j = hp_qlognormal('j', 0, 2, 1)
    z = a + b + c + d + e + f + g + h + i + j
    return {'loss': scope.float(scope.log(1e-12 + z**2))}
Beispiel #2
0
def many_dists():
    a=hp_choice('a', [0, 1, 2])
    b=hp_randint('b', 10)
    c=hp_uniform('c', 4, 7)
    d=hp_loguniform('d', -2, 0)
    e=hp_quniform('e', 0, 10, 3)
    f=hp_qloguniform('f', 0, 3, 2)
    g=hp_normal('g', 4, 7)
    h=hp_lognormal('h', -2, 2)
    i=hp_qnormal('i', 0, 10, 2)
    j=hp_qlognormal('j', 0, 2, 1)
    z = a + b + c + d + e + f + g + h + i + j
    return {'loss': scope.float(scope.log(1e-12 + z ** 2))}
Beispiel #3
0
def many_dists():
    a = hp_choice('a', [0, 1, 2])
    b = hp_randint('b', 10)
    c = hp_uniform('c', 4, 7)
    d = hp_loguniform('d', -2, 0)
    e = hp_quniform('e', 0, 10, 3)
    f = hp_qloguniform('f', 0, 3, 2)
    g = hp_normal('g', 4, 7)
    h = hp_lognormal('h', -2, 2)
    i = hp_qnormal('i', 0, 10, 2)
    j = hp_qlognormal('j', 0, 2, 1)
    k = hp_pchoice('k', [(.1, 0), (.9, 1)])
    z = a + b + c + d + e + f + g + h + i + j + k
    return {
        'loss': scope.float(scope.log(1e-12 + z**2)),
        'status': base.STATUS_OK
    }
Beispiel #4
0
def hp_qlognormal(label, *args, **kwargs):
    if not isinstance(label, basestring):
        raise TypeError("require string label")
    return scope.float(scope.hyperopt_param(label, scope.qlognormal(*args, **kwargs)))
def hp_loguniform(label, *args, **kwargs):
    if not isinstance(label, basestring):
        raise TypeError('require string label')
    return scope.float(
            scope.hyperopt_param(label,
                scope.loguniform(*args, **kwargs)))
Beispiel #6
0
def hp_lognormal(label, *args, **kwargs):
    return scope.float(
        scope.hyperopt_param(label, scope.lognormal(*args, **kwargs)))
Beispiel #7
0
def hp_qloguniform(label, *args, **kwargs):
    return scope.float(
        scope.hyperopt_param(label, scope.qloguniform(*args, **kwargs)))
Beispiel #8
0
def hp_qlognormal(label, *args, **kwargs):
    if not isinstance(label, basestring):
        raise TypeError('require string label')
    return scope.float(
        scope.hyperopt_param(label, scope.qlognormal(*args, **kwargs)))
Beispiel #9
0
def hp_normal(label, *args, **kwargs):
    return scope.float(
            scope.hyperopt_param(label,
                scope.normal(*args, **kwargs)))
Beispiel #10
0
def hp_qloguniform(label, *args, **kwargs):
    return scope.float(
            scope.hyperopt_param(label,
                scope.qloguniform(*args, **kwargs)))