How evaluation works
Architecture choices, scenarios, and uncertain inputs represent different things. A concept fixes a combination of choices. A scenario specifies operating conditions. A sample represents one possible set of numeric inputs within that scenario. Keeping these separate avoids mixing incompatible architectures, operating conditions, and performance outcomes in the same distribution.
Cross-reference designs
A screened concept has a short Concept.design_id, such as D-001.
The number is assigned from the full Cartesian product in sorted
decision-ID and option-ID order, before applying compatibility rules.
A rejected design still has an ID, so screened or filtered lists can
have gaps. Declaration order, compatibility rules, scenarios, seeds,
and sample counts do not affect assignment. Changing the decision or
option IDs can renumber designs. Treat the ID as local to that design
space, not a global identifier.
The canonical decision–option key (Concept.id) is unchanged. CLI JSON
includes both concept and design_id in rejections, summaries,
and evaluations; Pareto fronts expose both by_scenario (canonical
keys) and design_ids_by_scenario (short IDs).
Uncertainty and comparisons
- Use a number for a constant. Built-ins are
Uniform,Triangular,Lognormal(arithmetic mean and coefficient of variation),Discrete, scaledBeta, andBinomial. Custom distributions implementsample(rng: random.Random)and return a finite number. - Samples are reproducible for the same study, Python version, and seed, provided your functions use only their inputs and the supplied RNG. The stream for each parameter is keyed by seed, scenario ID, and sample index, so changing model order does not change a draw and concepts see paired draws for shared uncertainty. Different parameter IDs have independent streams; this is not a correlation model.
- Every evaluation retains the inputs sampled, model outputs, metric values, and limit violations. Incompatible concepts retain their rule IDs and reasons and are not sampled. A bad output, missing input, or model exception is an error with context, not a failed limit. The framework does not silently replace or discard failed samples.
- Summaries report mean and p05/p50/p95 by concept within each scenario. Feasibility rate is the fraction of samples meeting all declared limits. Each metric summary also reports a
violation_count. A sample can fail more than one limit, so adding these counts does not give the number of infeasible samples. Pareto comparison uses only marked objectives and defaults to mean metrics for concepts with 100% sampled feasibility.--statisticand--min-feasibilitychange that comparison policy. Neither finite-sample feasibility nor a summary frontier is proof of reliability or robust dominance. - CLI JSON includes rejects, summaries, Pareto IDs, and, by default, the raw samples. Use
--summary-onlyto omit raw samples from the file. The CLI andStudy.run()collect in memory; for large studies useStudy.iter_records()and batch or stream to your own store. Preserve the study code and input revisions along with the run output.
Export a run as CSV
JSON remains the default. For spreadsheets or tabular tools, write a bundle of UTF-8 CSV files to a new or empty directory. This example uses the downloadable workshop study:
python -m paretorium studies.example_backup \
--samples 100 --seed 42 --format csv --out runs/backup-csv
| File | Contents |
|---|---|
summaries.csv |
One row per design and scenario, with decision choices, joint feasibility, a Pareto membership flag, and columns such as metric.reserve_wh.p50 and metric.reserve_wh.violation_count. |
evaluations.csv |
One row per draw, with its zero-based sample index, feasibility, and parameter.*, output.*, metric.*, and violated.* columns. Omitted with --summary-only. |
rejections.csv |
One row per failed compatibility rule, with the rejected design's IDs, choices, and reason. |
run.csv |
Run provenance, seed, and Pareto settings. |
metrics.csv, parameters.csv, ports.csv, scenarios.csv |
Definitions, units, limits, and provenance. |
Booleans are true or false. Missing values, such as outputs of
inactive model alternatives, are blank, not zero. CSV text that could be
interpreted as a spreadsheet formula gains a leading apostrophe. For IDs
or numeric values that a spreadsheet might auto-convert, import the CSV
with explicit column types. The files are exports, not a way to reload
a study or resume a run.
From Python, call
export_run_csv(study, result, directory)
with an existing RunResult to export without rerunning models.
Architectural importance
Use architectural_importance() on individual evaluations, not summary
medians. Select one metric and scenario:
from paretorium import architectural_importance
importance = architectural_importance(
result.evaluations,
scenario="nominal",
metric=metrics["delivered_area"],
weighting="concept",
)
By default, each observed design has equal weight; its weight is split
equally among its draws. Use weighting="sample" for equal weight per
evaluation instead. Both include evaluations that failed metric limits.
The reference population is the designs you evaluated, not all
mathematically possible combinations.
First-order importance is the population variance of the option-conditional
means divided by total population variance. Each option reports its
weight, mean, variance, and contribution to that decision's importance.
For a pair, compute the same ratio for the joint option groups, then
subtract both first-order ratios. A negative remainder may indicate
redundant associations, for example when compatibility rules make
two decisions vary together. It is not clipped to zero. These are
descriptive measures, not causal attributions or shares that must sum to
100%. A constant outcome has undefined normalized results (None).
Pass the result to
architectural_importance_section()
to add the three tables to an HTML or PDF report. For a workbook,
install the optional excel extra (python -m pip install "paretorium[excel]")
and export the same analysis:
from pathlib import Path
from paretorium.interchange import export_importance_xlsx
export_importance_xlsx(importance, Path("runs/importance.xlsx"))
The workbook has Analysis, Decisions, Options, and Pairs sheets. It keeps the scenario, metric units, sample count, and weighting with the results. Percentages are numeric cells, signed remainders keep their sign, and undefined normalized statistics are blank.
See the parameter reference for supported distributions and the analysis reference for the comparison API.