Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
RegularNelderMead])
class MultiTorczon(RecyclingMetaTechnique):
def __init__(self):
super(MultiTorczon, self).__init__([RightTorczon, RandomTorczon,
RegularTorczon])
register(RandomNelderMead())
register(RegularNelderMead())
register(RightNelderMead())
register(MultiNelderMead())
register(RandomTorczon())
register(RegularTorczon())
register(RightTorczon())
register(MultiTorczon())
evolutionarytechniques.GA(crossover = 'op3_cross_PX', mutation_rate=0.01, crossover_rate=0.8),
evolutionarytechniques.GA(crossover = 'op3_cross_PMX', mutation_rate=0.01, crossover_rate=0.8),
evolutionarytechniques.UniformGreedyMutation(name='ga-base', mutation_rate=0.01)
], name = "PSO_GA_Bandit"))
register(AUCBanditMetaTechnique([
differentialevolution.DifferentialEvolutionAlt(),
simulatedannealing.PseudoAnnealingSearch()
], name = "test"))
register(AUCBanditMetaTechnique([
differentialevolution.DifferentialEvolutionAlt(),
evolutionarytechniques.UniformGreedyMutation(),
evolutionarytechniques.NormalGreedyMutation(mutation_rate=0.3),
simplextechniques.RandomNelderMead(),
simulatedannealing.PseudoAnnealingSearch()
], name = "test2"))
register(AUCBanditMetaTechnique([
PSO(crossover='op3_cross_OX1'),
PSO(crossover='op3_cross_PMX'),
PSO(crossover='op3_cross_PX'),
evolutionarytechniques.GA(crossover='op3_cross_OX1', crossover_rate=0.5),
evolutionarytechniques.GA(crossover='op3_cross_PMX', crossover_rate=0.5),
evolutionarytechniques.GA(crossover='op3_cross_PX', crossover_rate=0.5),
differentialevolution.DifferentialEvolutionAlt(),
globalGA.NormalGreedyMutation( crossover_rate=0.5, crossover_strength=0.2, name='GGA')
], name='PSO_GA_DE'))
"""seed mutation with global best"""
if (self.driver.best_result is not None and
self.driver.best_result.state == 'OK'):
return self.driver.best_result.configuration.data
else:
return self.manipulator.random()
from . import evolutionarytechniques
from . import differentialevolution
from . import simplextechniques
from . import patternsearch
from . import simulatedannealing
from .pso import PSO, HybridParticle
from . import globalGA
register(AUCBanditMutationTechnique())
register(AUCBanditMetaTechnique([
differentialevolution.DifferentialEvolutionAlt(),
evolutionarytechniques.UniformGreedyMutation(),
evolutionarytechniques.NormalGreedyMutation(mutation_rate=0.3),
simplextechniques.RandomNelderMead(),
], name = "AUCBanditMetaTechniqueA"))
register(AUCBanditMetaTechnique([
differentialevolution.DifferentialEvolutionAlt(),
evolutionarytechniques.UniformGreedyMutation(),
], name = "AUCBanditMetaTechniqueB"))
register(AUCBanditMetaTechnique([
differentialevolution.DifferentialEvolutionAlt(),
patternsearch.PatternSearch(),
], name = "AUCBanditMetaTechniqueC"))
register(AUCBanditMetaTechnique([
class UniformGreedyMutation(GreedySelectionMixin, EvolutionaryTechnique):
pass
class NormalGreedyMutation(NormalMutationMixin, GreedySelectionMixin, EvolutionaryTechnique):
pass
class GA(CrossoverMixin, UniformGreedyMutation):
pass
technique.register(GA(crossover = 'op3_cross_OX3', mutation_rate=0.10, crossover_rate=0.8))
technique.register(GA(crossover = 'op3_cross_OX1', mutation_rate=0.10,crossover_rate=0.8))
technique.register(GA(crossover = 'op3_cross_PX', mutation_rate=0.10, crossover_rate=0.8))
technique.register(GA(crossover = 'op3_cross_CX', mutation_rate=0.10, crossover_rate=0.8))
technique.register(GA(crossover = 'op3_cross_PMX', mutation_rate=0.10, crossover_rate=0.8))
technique.register(UniformGreedyMutation(name='ga-base', mutation_rate=0.10))
technique.register(UniformGreedyMutation(name='UniformGreedyMutation05', mutation_rate=0.05))
technique.register(UniformGreedyMutation(name='UniformGreedyMutation10', mutation_rate=0.10))
technique.register(UniformGreedyMutation(name='UniformGreedyMutation20', mutation_rate=0.20))
technique.register(NormalGreedyMutation(name='NormalGreedyMutation05', mutation_rate=0.05))
technique.register(NormalGreedyMutation(name='NormalGreedyMutation10', mutation_rate=0.10))
technique.register(NormalGreedyMutation(name='NormalGreedyMutation20', mutation_rate=0.20))
class MultiNelderMead(RecyclingMetaTechnique):
def __init__(self):
super(MultiNelderMead, self).__init__([RightNelderMead, RandomNelderMead,
RegularNelderMead])
class MultiTorczon(RecyclingMetaTechnique):
def __init__(self):
super(MultiTorczon, self).__init__([RightTorczon, RandomTorczon,
RegularTorczon])
register(RandomNelderMead())
register(RegularNelderMead())
register(RightNelderMead())
register(MultiNelderMead())
register(RandomTorczon())
register(RegularTorczon())
register(RightTorczon())
register(MultiTorczon())
pass
class MultiNelderMead(RecyclingMetaTechnique):
def __init__(self):
super(MultiNelderMead, self).__init__([RightNelderMead, RandomNelderMead,
RegularNelderMead])
class MultiTorczon(RecyclingMetaTechnique):
def __init__(self):
super(MultiTorczon, self).__init__([RightTorczon, RandomTorczon,
RegularTorczon])
register(RandomNelderMead())
register(RegularNelderMead())
register(RightNelderMead())
register(MultiNelderMead())
register(RandomTorczon())
register(RegularTorczon())
register(RightTorczon())
register(MultiTorczon())