-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix * fix#2 * minor * initial neural mab * add context agents enum * add experiments * launch * minor * add contextual mab to pull arms * put NN in a separate class & add docstrings * adjust settings * change places of mutations * fixes after review * minors * minors * add contextual bandits * add experimenter & multiple fitness lines visualizer * experiments * probabilities for contexts * minors & docstrings * fix pep8 * fix requirements * minor * minor * add average visualizatio * fixes after review * minors * update requirements * Update unit-build.yml * Update unit-build.yml * fix pep8 * Update unit-build.yml
- Loading branch information
Showing
24 changed files
with
946 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
examples/adaptive_optimizer/context_mab_experiment_different_targets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from examples.adaptive_optimizer.experiment_setup import run_adaptive_mutations_with_context | ||
from examples.adaptive_optimizer.mab_experiment_different_targets import run_experiment_node_num, \ | ||
run_experiment_edge_num, run_experiment_graphs_ratio_edges_nodes, run_experiment_trees | ||
from golem.core.optimisers.adaptive.operator_agent import MutationAgentTypeEnum | ||
|
||
|
||
if __name__ == '__main__': | ||
"""Run adaptive optimizer on different targets to see how neural multi-armed bandit agent converges | ||
to different probabilities of actions (i.e. mutations) for different targets.""" | ||
adaptive_mutation_type = MutationAgentTypeEnum.contextual_bandit | ||
|
||
run_experiment_node_num(trial_timeout=2, adaptive_mutation_type=adaptive_mutation_type, | ||
run_func=run_adaptive_mutations_with_context) | ||
run_experiment_edge_num(trial_timeout=2, adaptive_mutation_type=adaptive_mutation_type, | ||
run_func=run_adaptive_mutations_with_context) | ||
run_experiment_trees(trial_timeout=10, trial_iterations=2000, adaptive_mutation_type=adaptive_mutation_type, | ||
run_func=run_adaptive_mutations_with_context) | ||
run_experiment_graphs_ratio_edges_nodes(trial_timeout=10, trial_iterations=2000, | ||
adaptive_mutation_type=adaptive_mutation_type, | ||
run_func=run_adaptive_mutations_with_context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
examples/adaptive_optimizer/neural_mab_experiment_different_targets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from examples.adaptive_optimizer.mab_experiment_different_targets import run_experiment_node_num, \ | ||
run_experiment_edge_num, run_experiment_graphs_ratio_edges_nodes, run_experiment_trees | ||
from golem.core.optimisers.adaptive.operator_agent import MutationAgentTypeEnum | ||
|
||
|
||
if __name__ == '__main__': | ||
"""Run adaptive optimizer on different targets to see how neural multi-armed bandit agent converges | ||
to different probabilities of actions (i.e. mutations) for different targets.""" | ||
adaptive_mutation_type = MutationAgentTypeEnum.neural_bandit | ||
|
||
run_experiment_node_num(trial_timeout=2, adaptive_mutation_type=adaptive_mutation_type) | ||
run_experiment_edge_num(trial_timeout=2, adaptive_mutation_type=adaptive_mutation_type) | ||
run_experiment_trees(trial_timeout=10, trial_iterations=2000, adaptive_mutation_type=adaptive_mutation_type) | ||
run_experiment_graphs_ratio_edges_nodes(trial_timeout=10, trial_iterations=2000, | ||
adaptive_mutation_type=adaptive_mutation_type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Oops, something went wrong.