Repository navigation
0.6.0
ConceptFlow 0.6.0 adds tools for comparing views of a data set and for judging how well a lattice is drawn. Existing code keeps working unchanged.
New
Scale-measures
conceptflow.core now builds and checks scale-measures (Hanika & Hirth, 2022): coarser views of a formal context on the same objects.
scale_measure(context, attributes)builds one from original attributes and their conjunctions (("a", "b")becomes"a ∧ b"), in a fixed, reproducible column order.is_scale_measureandscale_measure_problemscheck any view, attribute by attribute.refines(coarse, fine)tells whether every concept of one view is a concept of the other (a refinement pair).
Order indices
conceptflow.metrics adds lattice_width (largest antichain), lattice_height (longest chain), incomparable_pairs and concept_levels. They work on iceberg lattices too.
Drawing quality metrics
14 scores in [0, 1] for line diagrams, in four families: crossings, layering, slopes and clearance. drawing_quality_scores computes all of them at once, with optional worst cases. They take a laid-out GraphData or a networkx.DiGraph. Layouts such as DimFlux's are scored upright, as they are drawn.
Contributed by marcelnoehre (#2). On all 635 drawings of a study of eight layout algorithms, they reproduce the original implementation's scores to within 1e-9.
Layout positions
conceptflow.visualization.layout_positions(graph_data) returns where each concept is drawn, keyed by its extent. Drawings of two related lattices can then be compared concept by concept.
Documentation
Two new guide pages: Scale-measures and order indices and Drawing quality.
Reliability
- Built packages tested in CI: the wheel and the source archive are each installed into a clean environment and smoke-tested outside the repository.
- More CI coverage: CI also runs on Python 3.13. On the oldest supported scikit-learn, everything except the estimator checks now runs.
- New tests:
- independent reference implementations for the new functions;
- workflow tests that run whole chains on contexts too large for exhaustive checks.
- README: the first example now runs after a plain
pip install, without LaTeX.
Install
pip install --upgrade conceptflow
Full list of changes: changelog · compare with v0.5.0