pychemia.searcher package

Routines related to stochastic optimization techniques

Submodules

pychemia.searcher.annealing module

class pychemia.searcher.annealing.SimulatedAnnealing(population, params, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.ant module

class pychemia.searcher.ant.AntColony(population, params, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.bee module

class pychemia.searcher.bee.BeeAlgorithm(population, params=None, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

create_foragers(scout, n)[source]
get_params()[source]
process_scouts(scouts, selection)[source]
run_one()[source]
set_params(params)[source]

Set all the parameters required by the bee algorithm, Check right values for all the parameters

Parameters:params

pychemia.searcher.firefly module

class pychemia.searcher.firefly.FireFly(population, params=None, generation_size=32, stabilization_limit=10, target_value=None)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.genetic module

class pychemia.searcher.genetic.GeneticAlgorithm(population, params=None, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.grey module

class pychemia.searcher.grey.GreyWolf(population, params=None, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.harmony module

class pychemia.searcher.harmony.HarmonySearch(population, params=None, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]

Run one cycle for the Harmony Search Method

set_params(params)[source]

Set the parameters for the Harmony Search algorithm There are 4 parameters

Parameters:params

pychemia.searcher.mhm module

class pychemia.searcher.mhm.MinimaHoppingMethod(population, params, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

class MinimaHopping

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.searcher module

class pychemia.searcher.searcher.Searcher(population, generation_size=32, stabilization_limit=10, target_value=None, searcher_id=None)[source]

Bases: object

actives_in_generation
advance(father, son, change)[source]
clean()[source]
correct_extras(changedb=False)[source]
enforce_generation_size()[source]
get_all_generations(generation_number=None)[source]
get_generation(generation_number=None)[source]

Return all the elements tagged as belonging to a given generation

Parameters:generation_number – Number of generation to get
Returns:(list) Identifiers of all candidates for a given generation number
Return type:list
get_params()[source]
pass_to_new_generation(entry_id, reason=None)[source]
print_status(level='DEBUG')[source]
recover(changedb=False)[source]
replace_by_changed(entry_id_old, reason=None)[source]
replace_by_other(entry_id_old, entry_id_new, reason=None)[source]
replace_by_random(entry_id_old, reason=None)[source]
replace_failed()[source]
run()[source]

Execute the total number of cycles

Returns:
run_one()[source]
save_generations()[source]
save_info()[source]
searcher_name
set_generation(entry_id, value)[source]
set_params(params)[source]
to_dict
update_generation()[source]
update_lineages()[source]
write_change(entry_id, change)[source]

pychemia.searcher.swarm module

class pychemia.searcher.swarm.ParticleSwarm(population, params=None, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]

pychemia.searcher.swarm2 module

class pychemia.searcher.swarm2.ParticleSwarm(population, params=None, generation_size=32, stabilization_limit=10)[source]

Bases: pychemia.searcher.searcher.Searcher

get_params()[source]
run_one()[source]
set_params(params)[source]