浏览代码

Merge branch 'release/v0.2.9'

Jérôme BUISINE 3 年之前
父节点
当前提交
0224e7f541
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      find_best_attributes.py

+ 4 - 4
find_best_attributes.py

@@ -50,10 +50,6 @@ def validator(solution):
 
     return True
 
-# init solution (26 attributes)
-def init():
-    return BinarySolution([], 26).random(validator)
-
 def loadDataset(filename):
 
     ########################
@@ -150,6 +146,10 @@ def main():
 
         return test_roc_auc
 
+    # init solution (`n` attributes)
+    def init():
+        return BinarySolution([], number_of_values).random(validator)
+
     if not os.path.exists(cfg.output_backup_folder):
         os.makedirs(cfg.output_backup_folder)