fcapy.lattice.formal_concept

This module provides a class FormalConcept which represents the Formal Concept object from FCA theory

Classes

FormalConcept(extent_i, extent, intent_i, intent)

A class used to represent Formal Concept object from FCA theory

class fcapy.lattice.formal_concept.FormalConcept(extent_i, extent, intent_i, intent, measures=None, context_hash=None)

A class used to represent Formal Concept object from FCA theory

Notes

A Formal Concept (A,B) denotes the pair of subset of objects A and subset of attributes B, s.t. objects A are all the objects described by attributes B

and attributes B are all the attributes which describe objects A.

The set A is called extent, the set B is called intent

property context_hash

Hash value of a FormalContext the FormalConcept is based on.

Only the concepts from the same FormalContext can be compared

property extent

The set of names of objects described by intent of the FormalConcept

property extent_i

The set of indexes of objects described by intent of the FormalConcept

classmethod from_dict(data)

Construct a FormalConcept from a dictionary data

property intent

The set of names of attributes which describe the extent of the FormalConcept

property intent_i

The set of indexes of attributes which describe the extent of the FormalConcept

classmethod read_json(path=None, json_data=None)

Load FormalConcept from .json file or from .json encoded string json_data

property support

The number of objects described by the intent of the FormalConcept

to_dict()

Convert FormalConcept into a dictionary

write_json(path=None)

Save FormalConcept to .json file of return the .json encoded data if path is None