fcapy.lattice.formal_concept
This module provides a class FormalConcept which represents the Formal Concept object from FCA theory
Classes
|
|
|
A class used to represent Formal Concept object from FCA theory |
Exceptions
- class fcapy.lattice.formal_concept.AbstractConcept(extent_i: Tuple[int, ...], extent: Tuple[str, ...], intent_i: Tuple[int, ...], intent: Tuple[str, ...], measures: Dict[str, float] = frozendict.frozendict({}), context_hash: int = None, is_monotone: bool = False)
- classmethod read_json(path: Optional[str] = None, json_data: Optional[str] = None) AbstractConcept
Load FormalConcept from .json file or from .json encoded string
json_data
- write_json(objs_order: List[str], attrs_order: List[str], path: Optional[str] = None)
Save FormalConcept to .json file of return the .json encoded data if
pathis None
- class fcapy.lattice.formal_concept.FormalConcept(extent_i: Tuple[int, ...], extent: Tuple[str, ...], intent_i: Tuple[int, ...], intent: Tuple[str, ...], measures: Dict[str, float] = frozendict.frozendict({}), context_hash: int = None, is_monotone: bool = False)
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
- classmethod from_dict(data)
Construct a FormalConcept from a dictionary
data
- classmethod read_json(path: Optional[str] = None, json_data: Optional[str] = None) AbstractConcept
Load FormalConcept from .json file or from .json encoded string
json_data
- to_dict(objs_order: List[str], attrs_order: List[str]) Dict[str, Any]
Convert FormalConcept into a dictionary
- write_json(objs_order: List[str], attrs_order: List[str], path: Optional[str] = None)
Save FormalConcept to .json file of return the .json encoded data if
pathis None