Beispiel #1
0
 def get_space():
     space = HyperSpace()
     with space.as_default():
         id1 = Identity(p1=Choice(['a', 'b']),
                        p2=Int(1, 100),
                        p3=Real(0, 1.0))
     return space
Beispiel #2
0
 def nn(self):
     solver = Choice(['lbfgs', 'sgd', 'adam'])
     return dict(
         cls=MLPClassifier,
         max_iter=Int(500, 5000, step=500),
         activation=Choice(['identity', 'logistic', 'tanh', 'relu']),
         solver=solver,
         learning_rate=Choice(['constant', 'invscaling', 'adaptive']),
         learning_rate_init_stub=Cascade(partial(self._cascade, self._nn_learning_rate_init, 'slvr'), slvr=solver),
         random_state=randint(),
     )
Beispiel #3
0
def get_space():
    space = HyperSpace()
    with space.as_default():
        p1 = Int(1, 100)
        p2 = Choice(['a', 'b', 'c'])
        p3 = Bool()
        p4 = Real(0.0, 1.0)
        id1 = Identity(p1=p1)
        id2 = Identity(p2=p2)(id1)
        id3 = Identity(p3=p3)(id2)
        id4 = Identity(p4=p4)(id3)
    return space
 def get_space():
     space = HyperSpace()
     with space.as_default():
         id1 = Identity(p1=Int(0, 10), p2=Choice(['a', 'b']))
         id2 = Identity(p3=Real(0., 1.), p4=Bool())(id1)
     return space
Beispiel #5
0
def func_early_stopping(p1=Choice(['a', 'b'], random_state=np.random.RandomState(9527)),
                        p2=Int(1, 10, 2, random_state=np.random.RandomState(9527)),
                        p3=Real(1.0, 5.0, random_state=np.random.RandomState(9527)),
                        p4=9):
    print(f'p1:{p1},p2:{p2},p3{p3},p4:{p4}')
    return 0.6