Skip to main content

pyfca - python formal concept analysis

Project description

https://github.com/pyfca/pyfca

Python Formal Concept Analysis (FCA).

The purpose is to collect algoritms for FCA.

Algorithms

So far:

lattice construction:

  • AddIntent

implications basis:

  • Koenig

lattice drawing:

  • create lattice diagram and output in

    • svg

    • tkinter

Plan

  • Create a basic lattice data structure:

  • Merge existing sources available online.

    Lattice construction:

    • FCbO

    • InClose2

    Implications basis:

    • Closure

    • LinClosure

    • Wild’s Closure

Usage

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)
diagram.svg().saveas('tmp.svg')
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:

Galicia

Implications

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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pyfca-0.3.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pyfca-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyfca-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 824d07e1f51e7e475ab8e35cd5dfc546e10a8f75fcc5f80b65e21c5e4f8bb421
MD5 179f8ce70f5b9b928e2a571cc882cacd
BLAKE2b-256 7921e3deae327122db12aeb01fe9a2052e3637031c334ccfa42757aa98cff5c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page