예제 #1
0
    sklearn_cv = SVCCVSkGridLinear(\
        C_range = [2 ** i for i in range(-5, 5, 2)],
        cv_method = KFold(20, 5))

    meta_model = DSESSVCLinearMetaModel(\
        window_size = 10,
        scaling = ScalingStandardscore(),
        crossvalidation = sklearn_cv,
        repair_mode = 'mirror')

    method = ORIDSESAlignedSVC(\
        mu = 15,
        lambd = 100,
        theta = 0.3,
        pi = 70,
        initial_sigma = matrix([[4.5, 4.5]]),
        delta = 4.5,
        tau0 = 0.5, 
        tau1 = 0.6,
        initial_pos = matrix([[10.0, 10.0]]),
        beta = 0.9,
        meta_model = meta_model) 

    return method

if __name__ == "__main__":
    problem = TRProblem() 
    optfit = problem.optimum_fitness()
    sim = Simulator(get_method(), problem, Accuracy(optfit, 10**(-6)))
    results = sim.simulate()
예제 #2
0
파일: ORIDSES.py 프로젝트: jpzk/evopy
'''

from sys import path
path.append("../../../..")

from numpy import matrix
from evopy.strategies.ori_dses import ORIDSES 
from evopy.problems.tr_problem import TRProblem
from evopy.simulators.simulator import Simulator
from evopy.operators.termination.accuracy import Accuracy

def get_method():
    method = ORIDSES(\
        mu = 15,
        lambd = 100,
        theta = 0.3,
        pi = 70,
        initial_sigma = matrix([[4.5, 4.5]]),
        delta = 4.5,
        tau0 = 0.5, 
        tau1 = 0.6,
        initial_pos = matrix([[10.0, 10.0]])) 

    return method

if __name__ == "__main__":
    problem = TRProblem()
    termination = Accuracy(problem.optimum_fitness(), pow(10, -6))
    sim = Simulator(get_method(), problem, termination)
    results = sim.simulate()