eunoia.EulerFit¶
- class eunoia.EulerFit(shapes: tuple[~eunoia._models.S, ...], original_values: dict[str, float], fitted_values: dict[str, float], residuals: dict[str, float], region_error: dict[str, float], diag_error: float, stress: float, loss: float, plot_data: dict[str, ~typing.Any] = <factory>)[source]¶
Result of fitting an area-proportional Euler diagram.
- Variables:
shapes (tuple[eunoia._models.S, ...]) – Tuple of fitted shapes (one per input set), in the order the sets were first encountered in the input.
original_values (dict[str, float]) – The values originally passed in. Keys are canonical (sorted) form.
fitted_values (dict[str, float]) – The fitted areas, expressed in the same scale as
original_values(exclusive or inclusive, depending oninput).residuals (dict[str, float]) –
original_values - fitted_valuesper region.region_error (dict[str, float]) – Per-region error (eunoia core’s region_error metric, always in per-region exclusive form).
diag_error (float) – Maximum region error (eulerAPE-style worst-case metric).
stress (float) – venneuler-style stress metric.
loss (float) – Final value of the objective the optimizer minimized.
- __init__(shapes: tuple[~eunoia._models.S, ...], original_values: dict[str, float], fitted_values: dict[str, float], residuals: dict[str, float], region_error: dict[str, float], diag_error: float, stress: float, loss: float, plot_data: dict[str, ~typing.Any] = <factory>) None[source]¶
Methods
__init__(shapes, ...], original_values, ...)plot(*[, ax, colors, fills, edges, labels, ...])Render the fitted diagram with matplotlib.
Attributes
shapesoriginal_valuesfitted_valuesresidualsregion_errordiag_errorstresslossplot_data