Metadata-Version: 2.4
Name: mdl-fca
Version: 0.0.1
Summary: Learning concept DAGs from binary data by MDL — a probabilistic reworking of Formal Concept Analysis
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/petfold/mdl-fca
Project-URL: Repository, https://github.com/petfold/mdl-fca
Project-URL: Issues, https://github.com/petfold/mdl-fca/issues
Keywords: fca,formal-concept-analysis,formal concept analysis,minimum-description-length,mdl,concept-lattice,unsupervised,unsupervised-learning,unsupervised learning,graph,graph-learning,graph learning,dag,dag-learning,dag learning,lattice-learning,lattice learning,information-theory,knowledge-graph
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.26
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: demos
Requires-Dist: matplotlib>=3.8; extra == "demos"
Provides-Extra: dev
Requires-Dist: mdl-fca[test]; extra == "dev"
Dynamic: license-file

# mdl-fca

[![tests](https://github.com/petfold/mdl-fca/actions/workflows/tests.yml/badge.svg)](https://github.com/petfold/mdl-fca/actions/workflows/tests.yml)
[![license](https://img.shields.io/badge/license-BSD--3--Clause-blue)](LICENSE)
[![status](https://img.shields.io/badge/status-prototype-orange)](docs/)

Learning "good" concept DAGs from binary data by minimum description length —
a probabilistic/information-theoretic reworking of Formal Concept Analysis.

Plain FCA maps a binary object×attribute context to a concept lattice, but it
is not a probabilistic model: it creates a concept for every random coincidence,
so the lattice explodes. This project builds instead the small DAG of concepts
that best **compresses** the data: a concept exists only if it pays for its own
description. Concepts can have multiple parents (unlike hierarchical
clustering's trees) and are organized hierarchically (unlike flat topic models).

Status: design phase complete, prototype under construction.

- Read `CLAUDE.md` for orientation and design commitments.
- Read `docs/` in numeric order for the full design:
  1. background and goal
  2. model and codelength (the core)
  3. algorithm (greedy pair-merge constructor + search framework)
  4. batch vs online
  5. prototype spec (current build target)
  6. roadmap

## Quick start (once the prototype exists)

```bash
pip install -e ".[test]"
pytest                       # 15 tests
python examples/run_planted.py
```
