Browse Source

Update use of optimization module from crossover

Jérôme BUISINE 2 years ago
parent
commit
46db33ffad
2 changed files with 7 additions and 4 deletions
  1. 6 3
      find_best_attributes.py
  2. 1 1
      optimization

+ 6 - 3
find_best_attributes.py

@@ -27,8 +27,11 @@ import models as mdl
 from optimization.algorithms.IteratedLocalSearch import IteratedLocalSearch as ILS
 from optimization.solutions.BinarySolution import BinarySolution
 
-from optimization.updators.mutators.SimpleMutation import SimpleMutation, SimpleBinaryMutation
-from optimization.updators.policies.RandomPolicy import RandomPolicy
+from optimization.operators.mutators.SimpleMutation import SimpleMutation
+from optimization.operators.mutators.SimpleBinaryMutation import SimpleBinaryMutation
+from optimization.operators.crossovers.SimpleCrossover import SimpleCrossover
+
+from optimization.operators.policies.RandomPolicy import RandomPolicy
 
 # variables and parameters
 models_list         = cfg.models_names_list
@@ -128,7 +131,7 @@ def main():
         return test_roc_auc
 
     # prepare optimization algorithm
-    updators = [SimpleBinaryMutation, SimpleMutation]
+    updators = [SimpleBinaryMutation(), SimpleMutation(), SimpleCrossover()]
     policy = RandomPolicy(updators)
 
     algo = ILS(init, evaluate, updators, policy, validator, True)

+ 1 - 1
optimization

@@ -1 +1 @@
-Subproject commit bc898fd70c72a6dda423884805bd634429a1be11
+Subproject commit 6dcd32014ae07124470a2428bddbb05c7fee2a1d