Esempio n. 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
Esempio n. 2
0
 def _lr_l1_ratio(penalty):
     if penalty in [
             'elasticnet',
     ]:
         return 'l1_ratio', Real(0.0, 1.0, step=0.1)
     else:
         return 'l1_ratio', Constant(None)
Esempio n. 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
Esempio n. 4
0
 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
Esempio n. 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