Changeset 1306 for framspy/evolalg
- Timestamp:
- 05/13/24 03:59:10 (8 months ago)
- Location:
- framspy/evolalg
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/base/experiment_niching_abc.py
r1304 r1306 10 10 from .experiment_abc import ExperimentABC 11 11 from .remove_diagonal import remove_diagonal 12 from FramsticksLib import DissimMethod # since the descendant ExperimentFramsNiching class does not introduce any Framsticks-specific dissimilarity methods, all of them must be known here (in ExperimentNiching) 12 13 13 14 … … 189 190 def get_args_for_parser(): 190 191 parser = ExperimentABC.get_args_for_parser() 191 parser.add_argument("-dissim",type= int, default=1, 192 help="Dissimilarity measure type. Available: -3:freq, -2:dens, -1:Leven, 1:frams-struct (default}, 2:frams-descr") 192 parser.add_argument("-dissim", type = lambda arg: DissimMethod[arg], choices = DissimMethod, 193 default=DissimMethod.PHENE_STRUCT_OPTIM, 194 help="Dissimilarity measure type. Available: " + str(DissimMethod._member_names_)) 193 195 parser.add_argument("-fit",type= str, default="raw", 194 196 help="Fitness type, availible types: niching, novelty, knn_niching (local), knn_novelty (local), nsga2, nslc and raw (default)") -
framspy/evolalg/tests/test_diferent_settings.py
r1296 r1306 3 3 import numpy as np 4 4 5 from FramsticksLib import FramsticksLib 5 from FramsticksLib import FramsticksLib, DissimMethod 6 6 7 7 from ..frams_base.experiment_frams_niching import ExperimentFramsNiching … … 14 14 15 15 16 GENERATIONS = 10 16 GENERATIONS = 10 17 17 18 18 SETTINGS_TO_TEST_NUMERIC = { … … 47 47 'hof_size': [0, 10], 48 48 'normalize': ['none', 'max', 'sum'], 49 'dissim': [ -2, -1, 1, 2],49 'dissim': [DissimMethod.GENE_LEVENSHTEIN, DissimMethod.PHENE_STRUCT_OPTIM, DissimMethod.PHENE_DESCRIPTORS, DissimMethod.PHENE_DENSITY_FREQ], 50 50 'fit': ['niching', 'novelty', 'nsga2', 'nslc', 'raw'], 51 51 'genformat': ['1'],
Note: See TracChangeset
for help on using the changeset viewer.