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 groups 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

package core

core

Nit common library of core classes and methods
package json

json

read and write JSON formatted text
package meta

meta

Simple user-defined meta-level to manipulate types of instances as object.
package parser_base

parser_base

Simple base for hand-made parsers of all kinds
package serialization

serialization

Abstract serialization services

Parents

package poset

poset

Pre order sets and partial order set (ie hierarchies)