Skip to content

Files

52 lines (39 loc) · 1.74 KB

Implications.org

File metadata and controls

52 lines (39 loc) · 1.74 KB

Working with Implications

Implications are a fundamental means to express dependencies between attributes within formal contexts. A set of implications can be obtained by computing a base from a context, or by saving it manually.

The canonical base of a formal context can be computed like this:

java -jar builds/uberjar/fca-clj-0.1.0-SNAPSHOT-standalone.jar -f canonical-base testing-data/bodiesofwater.ctx cbase.json

This command will save the following base:

((#{"maritime"} ⟶  #{"constant" "natural" "stagnant"})
 (#{"running"} ⟶  #{"constant"})
 (#{"running" "constant" "stagnant"} ⟶  #{"maritime" "natural"}))

The luxenburger base can be computed as well. The minimum support and minimum confidence need to additionally be specified:

java -jar builds/uberjar/fca-clj-0.1.0-SNAPSHOT-standalone.jar -f luxenburger-base testing-data/bodiesofwater.ctx lbase.json 0.2 0.8
((#{} ⟶  #{"natural"})
 (#{"stagnant"} ⟶  #{"natural"})
 (#{} ⟶  #{"constant"})
 (#{"stagnant"} ⟶  #{"constant"})
 (#{"natural"} ⟶  #{"constant"})
 (#{"constant"} ⟶  #{"natural"})
 (#{"natural" "stagnant"} ⟶  #{"constant"})
 (#{"constant" "stagnant"} ⟶  #{"natural"}))

The method close-under-implications computes the inclusion-minimal set of a given set of objects which respects all given implications.

java -jar builds/uberjar/fca-clj-0.1.0-SNAPSHOT-standalone.jar -f close-under-implications cbase.json "#{\"natural\"}"
#{constant natural}