Skip to main content

pyfca - python formal concept analysis

Project description

Python Formal Concept Analysis (FCA).

The purpose is to collect algoritms for FCA.


So far:

lattice construction:

  • AddIntent

implications basis:

  • Koenig

lattice drawing:

  • create lattice diagram and output in

    • svg
    • tkinter


  • Create a basic lattice data structure:

  • Merge existing sources available online.

    Lattice construction:

    • FCbO
    • InClose2

    Implications basis:

    • Closure
    • LinClosure
    • Wild’s Closure


It can be used to create a concept lattice and to draw it either using tkinter() or svg().

import pyfca
fca = pyfca.Lattice([{1,2},{2},{1,3}])
diagram = pyfca.LatticeDiagram(fca,4*297,4*210)
import cairosvg
cairosvg.svg2png(url="file:///<path to tmp.svg>", write_to='tmp.png')

The AddIntent algorithm is from the paper:

AddIntent: A New Incremental Algorithm for Constructing Concept Lattices

The lattice drawing algorithm is from:



This uses the python int as a bit field to store the FCA context.

See this blog for more.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyfca, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size pyfca-0.3.1-py3-none-any.whl (13.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page