Data Structureο
Experiments are saved as JSON files. This page documents the schema of those files so you can post-process results or feed them to other tools.
Top-Level Schemaο
data_frame = {dict: N}
βββ 'problem' = {list: N} β benchmark function names (str)
βββ 'dimensions' = {list: N} β problem dimensionalities (int)
βββ 'results' = {list: N} β one results dict per problem
where N is the number of problemβdimension pairs in the experiment.
Results Entryο
Each element inside 'results' has the following structure:
results[i] = {dict: 6}
βββ 'iteration' = {list: M} β HH iteration indices (int)
βββ 'time' = {list: M} β wall-clock time per iteration (float, seconds)
βββ 'performance' = {list: M} β best fitness found at each step (float)
βββ 'encoded_solution' = {list: M} β encoded operator indices (int)
βββ 'solution' = {list: M} β decoded operator sequences
β βββ [i] = {list: C} β one metaheuristic (C operators)
β βββ [j] = {list: 3} β a search-operator tuple
β βββ operator_name (str)
β βββ control_parameters (dict: P)
β βββ selector (str)
βββ 'details' = {list: M} β per-replica execution details
βββ [i] = {dict: 4}
βββ 'fitness' = {list: R} β final fitness per replica (float)
βββ 'positions' = {list: R} β final best positions (list: D, float)
βββ 'historical' = {list: R} β per-replica history
β βββ [j] = {dict: 5}
β βββ 'fitness' = {list: I} (float)
β βββ 'positions' = {list: I} (list: D, float)
β βββ 'centroid' = {list: I} (list: D, float)
β βββ 'radius' = {list: I} (float)
β βββ 'stagnation' = {list: I} (int)
βββ 'statistics' = {dict: 10}
βββ 'nob' β number of observations (int)
βββ 'Min' β minimum fitness (float)
βββ 'Max' β maximum fitness (float)
βββ 'Avg' β mean fitness (float)
βββ 'Std' β standard deviation (float)
βββ 'Skw' β skewness (float)
βββ 'Kur' β kurtosis (float)
βββ 'IQR' β interquartile range (float)
βββ 'Med' β median (float)
βββ 'MAD' β median absolute deviation (float)
Symbol Legendο
Symbol |
Meaning |
|---|---|
N |
Number of problemβdimension pairs |
M |
Number of hyper-heuristic iterations (candidate metaheuristics evaluated) |
C |
Cardinality β number of search operators per metaheuristic |
P |
Number of control parameters for each search operator |
R |
Number of replicas per candidate metaheuristic |
D |
Dimensionality of the problem |
I |
Number of iterations the metaheuristic performs |
Example: Loading Resultsο
from customhys import tools as tl
data = tl.read_json("data_files/raw/my_experiment.json")
# Iterate over problems
for i, problem_name in enumerate(data["problem"]):
dims = data["dimensions"][i]
best_perf = data["results"][i]["performance"][-1]
print(f"{problem_name} (D={dims}): best fitness = {best_perf:.6e}")