Formal Concept Analysis

Formal concept analysis (FCA) is a principled way of deriving a concept hierarchy or formal ontology from a collection of objects and their properties. This means deriving implicit relationships between objects regarding their attributes.

Each concept in the hierarchy represents the set of objects sharing the same values for a certain set of properties; and each sub-concept in the hierarchy contains a subset of the objects in the concepts above it.

Formal concept analysis finds practical application in fields including data mining, text mining, machine learning or semantic web.

Building a FormalContext

We use the example from https://en.wikipedia.org/wiki/Formal_concept_analysis:

var fc = new FormalContext[Int, String]
fc.set_object_attributes(1, ["odd", "square"])
fc.set_object_attributes(2, ["even", "prime"])
fc.set_object_attributes(3, ["odd", "prime"])
fc.set_object_attributes(4, ["even", "composite", "square"])
fc.set_object_attributes(5, ["odd", "prime"])
fc.set_object_attributes(6, ["even", "composite"])
fc.set_object_attributes(7, ["odd", "prime"])
fc.set_object_attributes(8, ["even", "composite"])
fc.set_object_attributes(9, ["odd", "square", "composite"])
fc.set_object_attributes(10, ["even", "composite"])

Computing the set of FormalConcept

var concepts = fc.formal_concepts
for concept in concepts do
    print concept
end

Visualizing formal concept with ConceptLattice

var cl = new ConceptLattice[Int, String].from_concepts(concepts)
cl.show_dot

All subgroups and modules

module fca

fca :: fca

Formal Concept Analysis
package_diagram fca\> fca poset poset fca\>->poset serialization serialization poset->serialization ...serialization ... ...serialization->serialization

Ancestors

group codecs

core > codecs

Group module for all codec-related manipulations
group collection

core > collection

This module define several collection classes.
group core

core

Nit common library of core classes and methods
group meta

meta

Simple user-defined meta-level to manipulate types of instances as object.
group serialization

serialization

Abstract serialization services
group text

core > text

All the classes and methods related to the manipulation of text entities

Parents

group poset

poset

Pre order sets and partial order set (ie hierarchies)