Architecture

The GALACTIC framework contains several modules for Formal Concept Analysis divided into:

The GALACTIC framework is data type agnostic, i.e. it must be powered by third party plugins that deal with specific characteristics, descriptions, strategies and measures.

The framework needs two kinds of input to work with:

  • a closure operator (ConceptClosure) defined by

    • a collection of objects with their characteristics;

    • a collection of description spaces

  • a collection of strategies.

There are several formats for data files depending on the installed plugins. The explorer files containing descriptions and strategies must be in the yaml format.

Class diagrams

"AbstractBinaryRelation[Concept, Concept]" <|-- "AbstractEndoRelation[Concept]"
"AbstractEndoRelation[Concept]" <|-- "AbstractDirectedAcyclicGraph[Concept]"
"AbstractDirectedAcyclicGraph[Concept]" <|-- "AbstractPartiallyOrderedSet[Concept]"
"AbstractPartiallyOrderedSet[Concept]" <|-- "AbstractJoinSemiLattice[Concept]"
"AbstractPartiallyOrderedSet[Concept]" <|-- "AbstractMeetSemiLattice[Concept]"
"AbstractJoinSemiLattice[Concept]" <|-- "AbstractLattice[Concept]"
"AbstractMeetSemiLattice[Concept]" <|-- "AbstractLattice[Concept]"
"AbstractLattice[Concept]" <|-- "Lattice[Concept]"
"Lattice[Concept]" <|-- "MooreFamily[Concept, str]"
"MooreFamily[Concept, str]" <|-- ConceptLattice

class "Lattice[Concept]" {
    extend(iterable: Iterable[Concept])
}

abstract class "AbstractLattice[Concept]" {
    reduced_context :  AbstractBinaryRelation[Concept, Concept]
}

abstract class "AbstractJoinSemiLattice[Concept]" {
    maximum : Concept
    co_atoms : AbstractSet[Concept]
    join_irreducible : AbstractSet[Concept]
    greatest_join_irreducible(element: Concept) : AbstractSet[Concept]
}

abstract class "AbstractMeetSemiLattice[Concept]" {
    minimum : Concept
    atoms : AbstractSet[Concept]
    meet_irreducible : AbstractSet[Concept]
    smallest_meet_irreducible(element: Concept) : AbstractSet[Concept]
}

abstract class "AbstractPartiallyOrderedSet[Concept]" {
    cover : AbstractReversibleCoveringRelation[Concept]
    top : AbstractSet[Concept]
    bottom : AbstractSet[Concept]
    upper_limit(limit: Concept, strict: bool = False) : AbstractSet[Concept]
    lower_limit(limit: Concept, strict: bool = False) : AbstractSet[Concept]
    filter(element: Concept) : AbstractPartiallyOrderedSet[Concept]
    ideal(element: Concept) : AbstractPartiallyOrderedSet[Concept]
}

abstract class "AbstractBinaryRelation[Concept, Concept]" {
    domain : AbstractSet[Concept]
    co_domain : AbstractSet[Concept]
    successors(element: Concept) : AbstractSet[Concept]
    predecessors(element: Concept) : AbstractSet[Concept]
}

abstract class "AbstractEndoRelation[Concept]" {
}

abstract class "AbstractDirectedAcyclicGraph[Concept]" {
    sinks : AbstractSet[Concept]
    sources : AbstractSet[Concept]
}

class ConceptLattice {
    {static} create(population: Population, descriptions: Iterable[Description], strategies: Iterable[Strategy]
    apply(strategies: Iterable[Strategy])
    closure: ConceptClosure
    descriptions: Sequence[Description]
    population: Population
}

class "MooreFamily[Concept, str]" {
    parts() : Iterator[Tuple[Concept, int]]
    stabilities() : Iterator[Tuple[Concept, float]]
    logarithmic_stabilities() : Iterator[Tuple[Concept, float]]
    probabilities() : Iterator[Tuple[Concept, float]]
    information() : Iterator[Tuple[Concept, float]]
    global_stability : float
    global_logarithmic_stability : float
    global_entropy : float
    global_information : float
}

ConceptLattice class

"Mapping[str, object]" <|-- Concept
"Collection[str]" <|-- "Closed[Concept, str]"
"Closed[Concept, str]" <|-- Concept
Element <|-- "Closed[Concept, str]"
Meetable <|-- Element
Joinable <|-- Element
PartiallyComparable <|-- Meetable
PartiallyComparable <|-- Joinable

abstract class "Mapping[str, object]" {
}

abstract class "Collection[str]" {
}

abstract class PartiallyComparable {
    {method} <
    {method} >
    {method} <=
    {method} >=
    {method} ==
    {method} !=
}

abstract class Meetable {
    {method} & (meet operator)
}

abstract class Joinable {
    {method} | (join operator)
}

abstract class Element {
}

abstract class "Closed[Concept, str]" {
    equivalence(element: Concept) : Iterator[Concept]
    subsumption(element: Concept) : Iterator[Concept]
    supsumption(element: Concept) : Iterator[Concept]
    support : float
    closure : Closure[Concept, str]
}

class Concept {
    descriptors : Mapping[Description, AbstractSet[Predicate]]
    predicates() : Iterator[Predicate]
    restrict(predicates: Iterable[Predicate]) : Concept
    enlarge(keys: Iterable[str]) : Concept
}

Concept class

Modules

Population

The Population class is used to manage a collection of individuals with their characteristics. This is the data that the framework uses to produce the concept lattice.

It uses the id() python function to manage the uniqueness of individuals.

Individuals has characteristics, that’s why there is a module for handling characteristics of different types.

Characteristics

The galactic.characteristics module defines essential classes for representing characteristics.

A characteristic can be called on an individual. It returns a data of this individual.

Descriptions

The galactic.descriptions module defines the abstract Description class used to represent description spaces. There is a special case of characteristic called Predicate that return a boolean value.

A description produces a set of predicates describing the generalized convex hull of the individuals. These predicates are called descriptors.

Concepts

The galactic.concepts module contains several classes for exploring concept lattices using context.

It is based on a closure operator: the ConceptClosure class.

A Concept is a couple (extension, intension) where:

  • extension is the collection of individuals of the concept;

  • intension is the collection of predicates describing the generalized convex hull of the individuals.

The Concept class inherits from the Closed class.

The ConceptLattice clas inherits from the MooreFamily class.

Strategies

A strategy produces, for a collection of individuals, a collection of candidate predicates called selectors.

The galactic.strategies module defines the abstract BasicStrategy and MetaStrategy classes used to represent basic and meta strategies.

Rules

The galactic.rules module defines essential classes to generate systems of rules: