Skip to content

Latest commit

 

History

History
91 lines (72 loc) · 2.43 KB

Protoconcepts.org

File metadata and controls

91 lines (72 loc) · 2.43 KB

Protoconcepts in conexp-clj

Protoconcepts are defined as $(A, B)$, $A \subseteq G$ and $B \subseteq M$ with $A’ = B”$ or $B’ = A”$.

Computing Protoconcepts

The protoconcepts of a given context can be computed. First, the respective namespace needs to be loaded.

(use 'conexp.fca.protoconcepts)

Let the context be

(def ctx 
  (make-context-from-matrix [1 2 3 4]
                            ['A 'B 'C]
                            [1 1 0
                             1 0 0
                             0 1 0
                             0 1 0]))
  |A B C 
--+------
1 |x x . 
2 |x . . 
3 |. x .
4 |. x .

The protoconcepts can be computed with the protoconcepts function.

(protoconcepts ctx)
#{[#{4 2} #{}] [#{1 3 2} #{}] [#{1 2} #{A}] [#{1} #{A B}]
  [#{} #{B C}] [#{} #{C}] [#{1 4 2} #{}] [#{4} #{B}] [#{1 4 3 2} #{}]
  [#{4 3 2} #{}] [#{1 3} #{B}] [#{3 2} #{}] [#{1 4 3} #{B}]
  [#{3} #{B}] [#{4 3} #{B}] [#{2} #{A}] [#{1 4} #{B}] [#{} #{A C}]
  [#{} #{A B C}]}

To compute the protoconcepts as an ordered set, the protoconcepts-order function can be used.

(protoconcepts-order ctx)
Protoconcepts on 19 elements.

Draw Protoconcepts

Drawing must be enabled via

(use 'conexp.gui.draw)

To draw the ordered protoconcepts of a context, the draw-protoconcepts function can be used.

(draw-protoconcepts (protoconcepts-order ctx))

The protoconcepts graph is shown in an additional window.

./images/protoconcept-lattice.png

Like for [lattices](./Concept-Lattices.org), the layout function can be specified for protoconcepts.

(draw-protoconcepts (protoconcepts-order ctx) 
                    :layout-fn conexp.layouts.dim-draw/dim-draw-layout)

./images/protoconcept-lattice-dimdraw.png

Notice that the protoconcept orders do not necessarily are a lattice. As many of the value functions only work on lattices, they cannot be applied to protoconcepts.