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}")