Skip to content

Latest commit

 

History

History
3468 lines (2317 loc) · 109 KB

API.md

File metadata and controls

3468 lines (2317 loc) · 109 KB

API Documentation

Basic definitions for conexp-clj.

Available Functions

Function Documentation

Argument List: ([‍a b])

Documentation:

Implements equivalence.

Argument List: ([‍a b])

Documentation:

Implements implication.

Argument List: ([‍n])

Documentation:

(abs n) is the absolute value of n

Argument List: ([‍base clop] [‍base clop initial])

Documentation:

Computes all closed sets of a given closure operator on a given set. Uses initial as first closed set if supplied.

Argument List: ([‍predicate base clop] [‍predicate base clop initial])

Documentation:

Computes all closed sets of a given closure operator on a given set base contained in the family described by predicate. See documentation of next-closed-set-in-family for more details. Uses initial as first closed set if supplied.

Argument List: ([‍prompt read & preds-and-fail-messages])

Documentation:

Performs simple quering. prompt is printed first and then the user is asked for an answer (via read). The other arguments are predicates with corresponding error messages. If a given answer does not satisfy some predicate pred, it's associated error message is printed (if it is a string) or it is assumed to be a function of one argument, whereupon it is called with the invalid answer and the result is printed. In any case, the user is asked again, until the given answer fulfills all given predicates.

Argument List: ([‍n])

Documentation:

(ceil n) returns the least integer greater than or equal to n. If n is an exact number, ceil returns an integer, otherwise a double.

Argument List: ([‍thing])

Documentation:

Dispatch function for multimethods.

Argument List: ([‍x y])

Documentation:

Orders things for proper output of formal contexts.

Argument List: ([‍])

Documentation:

Returns the version of conexp as a string.

Argument List: ([‍sets base-set])

Documentation:

Technical Helper. Tests wheterh all elements in base-set are contained at least one set in sets.

Argument List: ([‍& sets])

Documentation:

Returns cross product of set-1 and set-2.

Argument List: ([‍name & decls])

Documentation:

Same as def, but yields a private definition

Argument List: ([‍name orig] [‍name orig doc])

Documentation:

Defines an alias for a var: a new var with the same root binding (if any) and similar metadata. The metadata of the alias is its initial metadata (as provided by def) merged into the metadata of the original.

Argument List: ([‍name & decls])

Documentation:

Same as defmacro but yields a private definition

Argument List: ([‍error strings])

Documentation:

Stops program by raising the given error with strings as message.

Argument List: ([‍s1] [‍s1 s2] [‍s1 s2 & sets])

Documentation:

Return a set that is the first set without elements of the remaining sets

Argument List: ([‍& sets])

Documentation:

Computes the disjoint union of sets by joining the cross-products of the sets with natural numbers.

Argument List: ([‍sequence key])

Documentation:

Returns a sequence of all elements of the given sequence with distinct key values, where key is a function from the elements of the given sequence. If two elements correspond to the same key, the one is chosen which appeared earlier in the sequence.

This function is copied from clojure.core/distinct and adapted for using a key function.

Argument List: ([‍[‍k v] & body])

Documentation:

Executes body binding k to each value in v. Execution is done in parallel. Code adapted from http://www.acooke.org/cute/Clojuremac0.html

Argument List: ([‍string length] [‍string length padding])

Documentation:

Fills given string with padding to have at least the given length.

Argument List: ([‍x])

Documentation:

Given anything that can be made a sequence from, returns that sequence. If given a number x, returns (range x).

Argument List: ([‍n])

Documentation:

(exact-integer-sqrt n) expects a non-negative integer n, and returns [s r] where n = s^2+r and n < (s+1)^2. In other words, it returns the floor of the square root and the 'remainder'. For example, (exact-integer-sqrt 15) is [3 6] because 15 = 3^2+6.

Argument List: ([‍bindings condition])

Documentation:

Implements logical exists quantor. Bindings is of the form [var-1 seq-1 var-2 seq-2 ...]. Returns boolean value.

Argument List: ([‍bindings body])

Documentation:

Expands bindings used by forall and exists.

Argument List: ([‍a b])

Documentation:

Exponentiation of arguments. Is exact if given arguments are exact and returns double otherwise.

Argument List: ([‍seq])

Documentation:

Returns first non-nil element in seq, or nil if there is none.

Argument List: ([‍predicate sequence])

Documentation:

Return the index of the first element in sequence for which predicate returns true.

Argument List: ([‍n])

Documentation:

(floor n) returns the greatest integer less than or equal to n. If n is an exact number, floor returns an integer, otherwise a double.

Argument List: ([‍bindings condition])

Documentation:

Implements logical forall quantor. Bindings is of the form [var-1 seq-1 var-2 seq-2 ...]. Returns boolean value.

Argument List: ([‍a b])

Documentation:

(gcd a b) returns the greatest common divisor of a and b

Argument List: ([‍[‍this other] class fields])

Documentation:

Implements a generic equals for class on fields.

Argument List: ([‍relation source target])

Documentation:

Returns true iff relation is the graph of a function from source to target.

Argument List: ([‍{my-major :major, my-minor :minor, my-patch :patch}])

Documentation:

Compares given version of conexp and returns true if and only if the current version of conexp is higher or equal than the given one

Argument List: ([‍& args])

Documentation:

Combines the hashes of all things given.

Argument List: ([‍& strings])

Documentation:

Throws IllegalArgumentException with given strings as message.

Argument List: ([‍& strings])

Documentation:

Throws IllegalStateException with given strings as message.

Argument List: ([‍& ns-names])

Documentation:

Create a public var in this namespace for each public var in the namespaces named by ns-names. The created vars have the same name, root binding, and metadata as the original except that their :ns metadata value is this namespace.

This function is literally copied from the clojure.contrib.ns-utils library.

Argument List: ([‍base clop])

Documentation:

Improves basic order on the sequence base, where the closure operator clop operates on.

Argument List: ([‍xrel ks])

Documentation:

Returns a map of the distinct values of ks in the xrel mapped to a set of the maps in xrel with the corresponding values of ks.

Argument List: ([‍sqn])

Documentation:

Returns a lazy sequence of the beginnings of sqn.

Argument List: ([‍n])

Documentation:

Length of integer in binary

Argument List: ([‍s1] [‍s1 s2] [‍s1 s2 & sets])

Documentation:

Return a set that is the intersection of the input sets

Argument List: ([‍set sets])

Documentation:

Tests whether set has non-empty intersection with every set in sets.

Argument List: ([‍xrel yrel] [‍xrel yrel km])

Documentation:

When passed 2 rels, returns the rel corresponding to the natural join. When passed an additional keymap, joins on the corresponding keys.

Argument List: ([‍a b])

Documentation:

(lcm a b) returns the least common multiple of a and b

Argument List: ([‍base A B])

Documentation:

Implements lectic ordering. The basic order is given by the ordering of base which is interpreted as increasing order.

Argument List: ([‍base i A B])

Documentation:

Implements lectic < at position i. The basic order is given by the ordering of base which is interpreted as increasing order.

A and B have to be sets.

Argument List: ([‍function keys])

Documentation:

Returns a hash map with the values of keys as keys and their values under function as values.

Argument List: ([‍m])

Documentation:

Returns the map with the vals mapped to the keys.

Argument List: ([‍name args & body])

Documentation:

Defines memoized, anonymous function.

Argument List: ([‍clop A])

Documentation:

Given a set A and a closure operator clop returns all subsets B of A such that (= (clop A) (clop B)).

Argument List: ([‍vertices edges])

Documentation:

Returns all minimal hypergraph transversals of the hypergraph defined by «edges» on the vertex sets «vertices».

Argument List: ([‍base-set sets])

Documentation:

For a given set base-set and a collection of sets returns all subcollections of sets such that the union of the contained sets cover base-set and that are minimal with that property.

Argument List: ([‍base clop A])

Documentation:

Computes next closed set of the closure operator clop after A with the Next Closure algorithm. The order of elements in base, interpreted as increasing, is taken to be the basic order of the elements.

Argument List: ([‍predicate base clop A])

Documentation:

Computes next closed set as with next-closed-set, which is in the family F of all closed sets satisfing predicate. predicate has to satisfy the condition

A in F and i in base ==> clop(A union {1, ..., i-1}) in F.

Argument List: ([‍])

Documentation:

Throws UnsupportedOperationException with "Not yet implemented" message.

Argument List: ([‍])

Documentation:

Returns the current time in a human readable format.

Argument List: ([‍sequence])

Documentation:

Returns a function on two arguments a and b that returns true if and only if b occurs not after a in the given sequence (ascending order.)

Argument List: ([‍base clop])

Documentation:

Returns the set of all closures of the closure operator on the given base set. Computes the closures in parallel, to the extent possible.

Argument List: ([‍<= xs])

Documentation:

For a given partial order <= and given elements returns the maximal among them.

Argument List: ([‍<= xs])

Documentation:

For a given partial order <= and given elements returns the minimal among them.

Argument List: ([‍index start end & expr])

Documentation:

Computes the product of expr for indices from start to end, named as index.

Argument List: ([‍xrel ks])

Documentation:

Returns a rel of the elements of xrel with only the keys in ks

Argument List: ([‍set-1 set-2])

Documentation:

Returns true iff set-1 is a proper subset of set-2.

Argument List: ([‍set-1 set-2])

Documentation:

Returns true iff set-1 is a proper superset of set-2.

Argument List: ([‍])

Documentation:

Quits conexp-clj.

Argument List: ([‍fn initial-value coll])

Documentation:

Does the same as reduce, but calls transient on the initial value and persistent! on the result.

Argument List: ([‍base-set cover count])

Documentation:

Technical Helper. For a given set base-set, a collection cover of sets and a map mapping elements from base-set to the number of times they occur in sets in cover, tests whether the cover is redundant or not, i.e. if a proper subcollection of cover is already a cover or not.

Argument List: ([‍base-set pairs])

Documentation:

Computes the reflexive, transitive closure of a given set of pairs on base-set.

Argument List: ([‍xrel kmap])

Documentation:

Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap

Argument List: ([‍map kmap])

Documentation:

Returns the map with the keys in kmap renamed to the vals in kmap

Argument List: ([‍n])

Documentation:

(round n) rounds to the nearest integer. round always returns an integer. Rounds up for values exactly in between two integers.

Argument List: ([‍pred xset])

Documentation:

Returns a set of the elements for which pred is true

Argument List: ([‍thing & condition])

Documentation:

Macro for writing sets as mathematicians do (at least similar to it.) The following syntax constructions are supported:

(set-of x [x [1 2 3]])
  for the set of all x with x in [1 2 3]

(set-of x | x [1 2 3])
  for the same set

(set-of [x y] [x [1 2 3], y [4 5 6] :when (= 1 (gcd x y))])
  for the set of all pairs [x y] with x in [1 2 3], y in [4 5 6]
  and x and y are coprime.

In general, the condition vector (or the sequence after |) must be suitable for doseq.

Argument List: ([‍end] [‍start end] [‍start end step])

Documentation:

Returns a set of all numbers from start upto (but not including) end, by step if provided.

Argument List: ([‍x])

Documentation:

Returns true iff given thing is a singleton sequence or set.

Argument List: ([‍x y])

Documentation:

Ensures that pairs are ordered by first entry first.

Argument List: ([‍x y])

Documentation:

Ensures that pairs are ordered by second entry first. This gives better output for context sums, products, ...

Argument List: ([‍predicate sequence])

Documentation:

Splits given sequence at first element satisfing predicate. The first element satisfing predicate will be in the second sequence.

Argument List: ([‍predicate sequence])

Documentation:

Splits given sequence at last element satisfing predicate. The last element satisfing predicate will be in the first sequence.

Argument List: ([‍n])

Documentation:

Square root, but returns exact number if possible.

Argument List: ([‍set1 set2])

Documentation:

Is set1 a subset of set2?

Argument List: ([‍base-set])

Documentation:

Returns all subsets of the given base-set.

Argument List: ([‍index start end & expr])

Documentation:

Computes the sum of expr for indices from start to end, named as index.

Argument List: ([‍set1 set2])

Documentation:

Is set1 a superset of set2?

Argument List: ([‍sqn])

Documentation:

Returns a lazy sequence of the tails of sqn.

Argument List: ([‍thing])

Documentation:

Converts given argument «thing» to a set. If it is a number, returns the set {0, ..., thing-1}. If it is a collection, returns (set thing). Otherwise raises an error.

Argument List: ([‍comp coll])

Documentation:

Returns a linear extension of the given collection coll and the supplied comparator comp.

Argument List: ([‍pairs])

Documentation:

Computes transitive closure of a given set of pairs.

Argument List: ([‍pairs] [‍base pred])

Documentation:

Returns for a set of pairs its transitive reduction. Alternatively, the relation can be given as a base set and a predicate p which returns true in (p x y) iff [x y] is in the relation in question.

Note that if the relation given is not acyclic, the transitive closure of the reduction may not yield the transitive closure of the original relation anymore, since the reduction itself can be empty.

Argument List: ([‍] [‍s1] [‍s1 s2] [‍s1 s2 & sets])

Documentation:

Return a set that is the union of the input sets

Argument List: ([‍& strings])

Documentation:

Throws UnsupportedOperationException with given strings as message.

Argument List: ([‍message])

Documentation:

Emits a warning message on out.

Argument List: ([‍bindings & body])

Documentation:

Executes the code given in a dynamic environment where the var roots of the given names are altered according to the given bindings. The bindings have the form [name_1 f_1 name_2 f_2 ...] where f_i is applied to the original value of the var associated with name_i to give the new value which will be in place during execution of body. The old value will be restored after execution has been finished.

Argument List: ([‍functions & body])

Documentation:

Runs code in body with all given functions memoized.

Argument List: ([‍string & body])

Documentation:

Prints string followed by result, returning it.

Argument List: ([‍& body])

Documentation:

Returns string of all output being made in (flatten body).

Argument List: ([‍bindings & body])

Documentation:

Expects for all bindings the body to be evaluated to true. bindings must be those of doseq.

Argument List: ([‍bindings & body])

Documentation:

Executes body with the vars in bindings set to the corresponding values.

Argument List: ([‍question])

Documentation:

Asks string, expecting 'yes' or 'no'. Returns true when answered 'yes' and false otherwise.

Argument List: ([‍seq-1 seq-2])

Documentation:

Returns sequence of pairs [x,y] where x runs through seq-1 and y runs through seq-2 simultaneously. This is the same as (map #(vector %1 %2) seq-1 seq-2).

Provides the implementation of formal contexts and functions on them.

Available Functions

Function Documentation

Argument List: ([‍objects attributes incidence])

Documentation:

Positional factory function for class conexp.fca.contexts.Formal-Context.

Argument List: ([‍base-set])

Documentation:

Returns not= on base-set as context.

Argument List: ([‍ctx set-of-attributes])

Documentation:

Computes double prime in context ctx for the given set-of-attributes.

Argument List: ([‍ctx attributes])

Documentation:

Computes set of objects common to all attributes in context.

Argument List: ([‍ctx])

Documentation:

Tests whether given context ctx is attribute clarified.

Argument List: ([‍ctx m])

Documentation:

Returns the attribute concept of the given attribute m in context ctx.

Argument List: ([‍ctx attributes])

Documentation:

Computes set of objects common to all attributes in context.

Argument List: ([‍ctx])

Documentation:

Tests whether given context ctx is attribute-reduced or not.

Argument List: ([‍ctx])

Documentation:

Returns the attributes of a context.

Argument List: ([‍attribute j B D])

Documentation:

Simple implementation of the test used by the «Close by One» algorithm.

Argument List: ([‍ctx])

Documentation:

Clarifies attributes in context ctx.

Argument List: ([‍ctx])

Documentation:

Clarifies context ctx.

Argument List: ([‍ctx])

Documentation:

Clarifies objects in context ctx.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Tests whether ctx-1 is a compatible subcontext of ctx-2.

Argument List: ([‍ctx])

Documentation:

Returns all compatible subcontexts of ctx. ctx has to be reduced.

Argument List: ([‍ctx [‍set-of-obj set-of-att]])

Documentation:

Tests whether given pair is a concept in context ctx.

Argument List: ([‍ctx])

Documentation:

Returns a sequence of all concepts of ctx.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Returns context apposition of ctx-1 and ctx-2, that is

(G_1,M_1,I_1) | (G_1,M_2,I_2) := (G_1,M_1 dunion M_2,I_1 dunion I_2).

Argument List: ([‍ctx set-of-attributes])

Documentation:

Computes double prime in context ctx for the given set-of-attributes.

Argument List: ([‍ctx])

Documentation:

Tests whether given context ctx is clarified.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Returns context composition of ctx-1 and ctx-2, that is

(G_1,M_1,I_1) o (G_2,M_2,I_2) := (G_1,M_2,I_1 o I_2).

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Returns the disjoint union of ctx-1 and ctx-2.

Argument List: ([‍ctx1 ctx2])

Documentation:

Returns context intersection of ctx1 and ctx2.

Argument List: ([‍ctx set-of-objects])

Documentation:

Computes double prime in context ctx for the given set-of-objects.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Computes the context product of ctx-1 and ctx-2, that is

(G_1,M_1,I_1) x (G_2,M_2,I_2) :=
  (G_1 x G_2, M_1 x M_2, nabla)

where

(g_1,g_2) nabla (m_1,m_2) <=> g_1I_1m_1 or g_2I_2m_2.

Argument List: ([‍ctx])

Documentation:

Tests whether given context ctx is reduced or not.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Computes the context semiproduct of ctx-1 and ctx-2, where for contexts (G_1,M_1,I_1) and (G_2,M_2,I_2) their semidirect product is defined as

(G_1 x G_2, M_1 dunion M_2, nabla)

where

(g_1,g_2) nabla (j,m) <=> g_jI_jm for j in {1,2}.

Argument List: ([‍ctx])

Documentation:

Returns tuple of number of objects, number of attributes, and fill rate.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Returns context subposition of ctx-1 and ctx-2, that is

 (G_1,M_1,I_1)
--------------- := (G_1 dunion G_2, M_1, I_1 union I_2).
 (G_2,M_1,I_2)

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Computes the context sum of ctx-1 and ctx-2, that is

(G_1,M_1,I_1) + (G_2,M_2,I_2) :=
  (G_1 dunion G_2, M_1 dunion M_2, I_1 dunion I_2
   dunion (G_1 x M_2) dunion (G_2 x M_1))

where all set unions are disjoint set unions.

Argument List: ([‍ctx] [‍ctx order-on-objects order-on-attributes])

Documentation:

Prints contexts in a human readable form. Orderings can be given as sequences or as functions. If given as sequence, the corresponding elements will be ordered that way, with all remaining elements at the end. If given as function, sort the corresponding elements with that function. If no ordering is given for objects and attributes, sort-by-second is used.

Argument List: ([‍ctx])

Documentation:

Transitively closes incidence relation of ctx and returns corresponding context.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Returns the union of ctx-1 and ctx-2. Note that this union is inclusive; use context-disjoint-union if this is not what you want.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Computes Xia's product of ctx-1 and ctx-2, where for two contexts (G_1,M_1,I_1) and (G_2,M_2,I_2) their Xia product is defined as

(G_1 x G_2, M_1 x M_2, ~)

where

(g_1,g_2) ~ (m_1,m_2) <=> (g_1I_1m_1 <=> g_2I_2m_2).

Argument List: ([‍thing])

Documentation:

Returns true iff thing is a formal context.

Argument List: ([‍base-set])

Documentation:

Returns = on base-set as context.

Argument List: ([‍ctx [‍A B]])

Documentation:

Computes the set of direct upper neighbours of the concept [A B] in the concept lattice of ctx. Uses Lindig's Algorithm for that.

Argument List: ([‍ctx [‍A B]])

Documentation:

Computes the set of direct upper neighbours of the concept [A B] in the concept lattice of ctx. Uses Lindig's Algorithm for that.

Argument List: ([‍ctx])

Documentation:

Computes the down arrow relation of ctx.

Argument List: ([‍ctx])

Documentation:

Dualizes context ctx, that is (G,M,I) gets (M,G,I^{-1}).

Argument List: ([‍ctx thing])

Documentation:

Test whether thing' is an extent of the formal context ctx.'

Argument List: ([‍ctx] [‍ctx pred])

Documentation:

Computes a sequence of all extents of «ctx», in a lectic order. Optionally, one can specify a predicate function «pred» that acts as a filter on all extents of «ctx». «pred» should specify the same conditions as the predicate function to «next-closed-set-in-family».

Argument List: ([‍ctx])

Documentation:

Returns a function that, given a pair [a b], returns true if and only if a and b are incident in the context ctx.

Argument List: ([‍ctx])

Documentation:

Returns the incidence-relation of the given context, as a set of pairs of objects and attributes.

Argument List: ([‍ctx g m])

Documentation:

Returns true if and only if in context ctx, the object g is incident with the attribute m.

Argument List: ([‍ctx thing])

Documentation:

Test whether thing' is an intent of the formal context ctx.'

Argument List: ([‍ctx] [‍ctx pred])

Documentation:

Computes a sequence of all intents of «ctx», in a lectic order. Optionally, one can specify a predicate function «pred» that acts as a filter on all intents of «ctx». «pred» should specify the same conditions as the predicate function to «next-closed-set-in-family».

Argument List: ([‍ctx])

Documentation:

Inverts context ctx, that is (G,M,I) gets (G,M,(G x M) \ I).

Argument List: ([‍objects attributes incidence])

Documentation:

Standard constructor for contexts. Takes a sequence of objects, a sequence of attributes and either a set of pairs or function of two arguments being true iff its arguments are incident. Note that the object and attribute sequences are converted to sets and therefore have to not contain any duplicate elements. If the incidence relation is given as a sequence, it is automatically restricted to the cartesian product of the object an the attribute set.

Argument List: ([‍G M bits])

Documentation:

Given objects G and attribute M and an incidence matrix constructs the corresponding context. G and M may also be numbers where they represent (range G) and (range M) respectively.

Argument List: ([‍objects attributes incidence])

Documentation:

Context constructor similar to make-context, but does not do any safety checking and is therefore faster. Use with care.

This function is useful if you want to construct new contexts from old ones. In particular, if you want to use the incidence relation if a given context as the incidence relation for a new one, you can just pass it to this function without any modifications.

Argument List: ([‍base-set])

Documentation:

Returns context with no crosses.

Argument List: ([‍ctx])

Documentation:

Tests whether given context ctx is object clarified.

Argument List: ([‍ctx g])

Documentation:

Returns the object concept of the given object g in context ctx.

Argument List: ([‍ctx objects])

Documentation:

Computes set of attributes common to all objects in context.

Argument List: ([‍ctx])

Documentation:

Tests whether given context ctx is object-reduced or not.

Argument List: ([‍ctx])

Documentation:

Returns the objects of a context.

Argument List: ([‍ctx set-of-objects])

Documentation:

Computes double prime in context ctx for the given set-of-objects.

Argument List: ([‍base-set])

Documentation:

Returns context full of crosses.

Argument List: ([‍ctx objects])

Documentation:

Computes set of attributes common to all objects in context.

Argument List: ([‍ctx & args])

Documentation:

Prints the result of applying context-to-string to the given arguments.

Argument List: ([‍base-set fill-rate] [‍objects attributes fill-rate])

Documentation:

Randomly fills context on base-set (or on objects and attributes) with crosses and propability fill-rate. If given numbers instead of collections uses (range base-set) (and likewise for objects and attributes) instead.

Argument List: ([‍base-set fill-rate] [‍objects attributes fill-rate])

Documentation:

Randomly fills context on base-set (or on objects and attributes) with crosses and propability fill-rate. If given numbers instead of collections uses (range base-set) (and likewise for objects and attributes) instead.

Argument List: ([‍number upper-limit])

Documentation:

Returns a sequence of number contexts, with random fill rate and random size between 0 and upper-limit.

Argument List: ([‍ctx])

Documentation:

Attribute reduction for ctx.

Argument List: ([‍ctx])

Documentation:

Reduces context ctx.

Argument List: ([‍ctx])

Documentation:

Object reduction for ctx.

Argument List: ([‍ctx old-to-new])

Documentation:

Rename attributes in ctx by given function old-to-new.

Argument List: ([‍ctx old-to-new])

Documentation:

Rename objects in ctx by given function old-to-new.

Argument List: ([‍concept subcontext])

Documentation:

Restricts the given concept to the given subcontext.

Argument List: ([‍a b])

Documentation:

Tests if 'a is a subset of 'b, but not equal.

Argument List: ([‍a b])

Documentation:

Tests if 'a is a subset of 'b, but not equal.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Tests whether ctx-1 is a subcontext ctx-2 or not.

Argument List: ([‍ctx])

Documentation:

Computes the up arrow relation of ctx.

Argument List: ([‍ctx])

Documentation:

Returns up-down-arrow relation of ctx.

Many-Valued-Contexts and some functions for scaling.

Available Functions

Function Documentation

Argument List: ([‍objects attributes incidence])

Documentation:

Positional factory function for class conexp.fca.many_valued_contexts.Many-Valued-Context.

Argument List: ([‍values n] [‍values others n <= >=])

Documentation:

Returns the biordinal scale on the sequence values, optionally given two order relations <= and >=. Note that values (and others) must be ordered (e.g. vector or list), because otherwise the result will be arbitrary.

Argument List: ([‍values])

Documentation:

Returns the dichotimic scale on the set values. Note that base must have exactly two arguments.

Argument List: ([‍mv-ctx g])

Documentation:

For a given many-valued context mv-ctx and a given object g, returns the set of all values of g in mv-ctx.

Argument List: ([‍values] [‍values <= >=] [‍values others <= >=])

Documentation:

Returns the interordinal scale on the set base, optionally given two order relations <= and >=.

Argument List: ([‍values] [‍values others] [‍values others < >=])

Documentation:

Returns the interval scale on the set values. Note that values must be ordered (e.g. vector or list), because otherwise the result will be arbitrary. Also note that the intervales will be left-open.

Argument List: ([‍objects attributes incidence])

Documentation:

Constructs a many-valued context from a set of objects, a set of attributes and an incidence relation, given as set of triples [g m w] or as a function from two arguments g and m to values w.

Argument List: ([‍objects attributes values])

Documentation:

Creates a many-valued context from a given matrix of values. objects and attributes may either be given as numbers representing the corresponding number of objects and attributes respectively, or as collections. The number of entries in values must match the number of objects times the number of attributes.

Argument List: ([‍objects attributes incidence])

Documentation:

Just creates a many-valued context from a set of objects, a set of attributes and a hashmap from pairs of objects and attributes to values. Does no checking, use with care.

Argument List: ([‍mv-ctx objs attrs])

Documentation:

For a given many-valued context, returns the induced subcontext given by the object and attribute set.

Argument List: ([‍mv-ctx] [‍mv-ctx order-on-objects order-on-attributes])

Documentation:

Returns a string representing the given many-valued context mv-ctx as a value-table.

Argument List: ([‍values] [‍values others])

Documentation:

Returns the nominal scale on the set base.

Argument List: ([‍mv-ctx values])

Documentation:

For a given many-valued context mv-ctx and an attribute-value map, returns all objects having these values.

Argument List: ([‍values] [‍values <=] [‍values others <=])

Documentation:

Returns the ordinal scale on the set values, optionally given an order relation <=.

Argument List: ([‍mv-ctx scales] [‍mv-ctx scales default])

Documentation:

Scales given many-valued context mv-ctx with given scales. scales must be a map from attributes m to contexts K, where all possible values of m in mv-ctx are among the objects in K. If a scale for an attribute is given, the default scale is used, where default should be a function returning a scale for the supplied attribute. If no default scale is given, an error is thrown if an attribute is missing.

Argument List: ([‍ctx & scales])

Documentation:

Scales the given many-valued context ctx with the given scales. These are of the form

[att_1 att_2 ...] scale,

where att_i is an attribute of the given context and scale determines a call to a known scale. The variable «values» will be bound to the corresponding values of each attribute and may be used when constructing the scale. For example, you may use this macro with

(scale-mv-context-with ctx
  [a b c]  (nominal-scale values)
  [d]      (ordinal-scale values <=)
  (nominal-scale values))

where the last entry (without any associated attribute) is the default scale. Note that attributes of ctx always have to be given in a sequence, even if there is only one.

Argument List: ([‍mv-ctx m])

Documentation:

For a given many-valued context mv-ctx and a given attribute m, returns the set of all values of m in mv-ctx.

Argument List: ([‍mv-ctx g])

Documentation:

For a given many-valued context mv-ctx and a given object g, returns the set of all values of g in mv-ctx.

Implications for Formal Concept Analysis.

Available Functions

Function Documentation

Argument List: ([‍premise conclusion])

Documentation:

Positional factory function for class conexp.fca.implications.Implication.

Argument List: ([‍implications initial-set subset-test])

Documentation:

Iterating through the sequence of implications, tries to apply as many implications as possible. Uses subset-test to determine whether a given implication can be used to extend a given set, i.e. an implication impl can be used to extend a set s if and only if

(subset-test (premise impl) s)

is true. Note that if (conclusion impl) is already a subset of s, then s is effectively not extended.

Argument List: ([‍ctx ε δ])

Documentation:

Compute a set L of implications that is an approximation to the canonical base of the formal context `ctx'. More precisely, if H is the canonical base of ctx, then

|Mod(L) Δ Mod(H)|/2^{|M|} ≤ ε

with probability at least 1-δ. The computation is done in polynomial time with respect to |M|, |L|, 1/ε, and 1/δ.

Argument List: ([‍context minsupp minconf])

Documentation:

Returns all association rules of context with the parameters minsupp as minimal support and minconf as minimal confidence. The result returned is a lazy sequence.

Argument List: ([‍ctx] [‍ctx background-knowledge] [‍ctx background-knowledge predicate])

Documentation:

Returns the canonical base of given context, as a lazy sequence. Uses «background-knowledge» as starting set of implications, which will not appear in the result. If «predicate» is given (a function), computes only those implications from the canonical base whose premise satisfy this predicate, i.e. «predicate» returns true on these premises. Note that «predicate» has to satisfy the same conditions as the predicate to «next-closed-set-in-family».

Argument List: ([‍implications])

Documentation:

For a given set of implications returns its stem-base.

Argument List: ([‍clop base] [‍clop base background-knowledge] [‍clop base background-knowledge predicate])

Documentation:

Given a closure operator «clop» on the set «base», computes its canonical base, optionally using the set «background-knowledge» of implications on «base-set» as background knowledge. The result will be a lazy sequence. If «predicate» is given as third argument, computes only those implications whose premise satisfy this predicate. Note that «predicate» has to satisfy the same conditions as the one of «next-closed-set-in-family».

Argument List: ([‍implications])

Documentation:

Returns closure operator given by implications.

Argument List: ([‍implications input-set])

Documentation:

Computes smallest superset of set being closed under given implications.

Argument List: ([‍[‍implications in-premise numargs] input-set])

Documentation:

Downing-Gallier

Argument List: ([‍ctx impl-set])

Documentation:

Checks wheter given set of implications is complete in context ctx. This is a very costly computation.

Argument List: ([‍thing])

Documentation:

Returns conclusion of given object.

Argument List: ([‍implication context])

Documentation:

Computes the confidence of the given implication in the given context.

Argument List: ([‍background-implications])

Documentation:

Return a function that can serve as an equivalence oracle for query learning.

The returned oracle will return true if a given set S of implications is equivalent to background-implications. Otherwise, it will return a counterexample, i.e., model of S that is not a model ov background-implications or vice versa.

Argument List: ([‍impls-1 impls-2])

Documentation:

Returns true iff the two seqs of implications are equivalent.

Argument List: ([‍implication implications])

Documentation:

Returns true iff implication follows semantically from given implications.

Argument List: ([‍implication implications])

Documentation:

Returns true iff implication follows semantically from given implications.

Argument List: ([‍context minsupp])

Documentation:

Computes for context a lazy sequence of all frequent and closed itemsets, given minsupp as minimal support.

Argument List: ([‍context minsupp])

Documentation:

Returns all frequent itemsets of context, given minsupp as minimal support.

Argument List: ([‍impl ctx])

Documentation:

Returns true iff impl holds in given context ctx.

Argument List: ([‍& elements])

Documentation:

Convenience interface for creating implications. Write implications just as

user=> (impl 1 2 3 ==> 4 5 6)
(#{1 2 3} ==> #{4 5 6}) 

Argument List: ([‍implications])

Documentation:

Compute setup for Downing-Gallier

Argument List: ([‍thing])

Documentation:

Returns true iff thing is an implication.

Argument List: ([‍base-set & implication-sets])

Documentation:

Given a set «base-set» and collections «implication-sets» of implications, returns the canonical base of the intersection of the corresponding closure theories.

Argument List: ([‍impls])

Documentation:

Given a set impls of implications, returns an irredundant subset of impls. Note that this set does not need to be of minimal cardinality.

Argument List: ([‍base-set member? equivalent?])

Documentation:

Learn an implicational theory on base-set with access to membership oracle member?' and equivalence oracle equivalent?'.

The membership oracle has to decide for a given set S whether S is a model of the background theory to be learned. The equivalence oracle has to decide whether a given set of implications is equivalent to the background theory. For this it needs to return true if the theories are equivalent, and a counterexample otherwise, i.e., a subset of base-set that is a model of the current hypothesis and not a model of the background theory, or vice versa.

This function implements the HORN1 algorithm of Angluin, Frazier, and Pitt: “Learning Conjunctions of Horn Clauses”, 1992.

Argument List: ([‍context minsupp-or-predicate minconf])

Documentation:

Computes the luxenburger-base of a given context «context», returning the result as a lazy sequence. Uses «minconf» as minimal confidence. If «minsupp-or-predicate» is a number, uses that as a minimal support threshold. In this case, «minsupp» ∈ [0,1] must hold. If «minsupp-or-predicate» is a function, uses this as a predicate to filter all candidate itemsets. In this case, the predicate should be valid predicate value for «intents».

Argument List: ([‍context minsupp-or-predicate minconf])

Documentation:

Computes the luxenburger-base of a given context «context», returning the result as a lazy sequence. Uses «minconf» as minimal confidence. If «minsupp-or-predicate» is a number, uses that as a minimal support threshold. In this case, «minsupp» ∈ [0,1] must hold. If «minsupp-or-predicate» is a function, uses this as a predicate to filter all candidate itemsets. In this case, the predicate should be valid predicate value for «intents».

Argument List: ([‍premise conclusion])

Documentation:

Creates an implication (premise => conclusion \ premise).

Argument List: ([‍implications])

Documentation:

Return a function that can serve as a membership oracle for query learning.

The returned oracle will return true if a given set S of elements is a model of implications, and false otherwise.

Argument List: ([‍impl-set])

Documentation:

Checks whether given set of implications is minimal, i.e. no implication in this set follows from the others.

Argument List: ([‍ctx] [‍ctx background-knowledge])

Documentation:

Computes the canonical base of the given formal context. Background knowledge can be provided as a set of implications on the attribute set of the given context. Computation is eager and is done in parallel.

Argument List: ([‍clop base] [‍clop base background-knowledge])

Documentation:

Computes the canonical base of the given closure operator in parallel. Accepts the same parameters as «canonical-base-from-clop», except for the predicate.

Argument List: ([‍thing])

Documentation:

Returns premise of given object.

Argument List: ([‍ctx A])

Documentation:

Returns all elements which are implied in context ctx by A but are neither contained in A or follow from a strict subsets of A.

Argument List: ([‍ctx])

Documentation:

Returns all implications based on the proper premises of the context ctx.

Argument List: ([‍ctx A])

Documentation:

Returns true iff set A is a subset of the attributes of context ctx and is a proper premise in ctx.

Argument List: ([‍ctx])

Documentation:

Returns the proper premises of the given context ctx as a lazy sequence.

Argument List: ([‍ctx m objs])

Documentation:

Returns all proper premises for the attribute «m» in the formal context «ctx». The set «objs» should contain all objects from ctx which are in down-arrow relation to m.

Argument List: ([‍ctx m])

Documentation:

Returns all proper premises for the attribute «m» in the formal context «ctx».

Argument List: ([‍implications])

Documentation:

Returns for a given set of implications the corresponding closure operator whose closures are all closed and pseudo-closed sets.

Argument List: ([‍implications set])

Documentation:

Computes smallest superset of set being pseudo-closed under given implications.

Argument List: ([‍ctx])

Documentation:

Returns the pseudo intents of the given context ctx.

Argument List: ([‍set impl])

Documentation:

Returns true iff set respects given implication impl.

Argument List: ([‍ctx])

Documentation:

Returns the implications computed by Ryssels Algorithm, as a lazy sequence.

Argument List: ([‍ctx impl-set])

Documentation:

Checks whether given set of implications is sound, i.e. every implication holds in the given context.

Argument List: ([‍ctx] [‍ctx background-knowledge] [‍ctx background-knowledge predicate])

Documentation:

Returns the canonical base of given context, as a lazy sequence. Uses «background-knowledge» as starting set of implications, which will not appear in the result. If «predicate» is given (a function), computes only those implications from the canonical base whose premise satisfy this predicate, i.e. «predicate» returns true on these premises. Note that «predicate» has to satisfy the same conditions as the predicate to «next-closed-set-in-family».

Argument List: ([‍implications])

Documentation:

For a given set of implications returns its stem-base.

Argument List: ([‍thing ctx])

Documentation:

Computes the support of the set of attributes B in context ctx. If an implications is given, returns the support of this implication in the given context.

Argument List: ([‍impl])

Documentation:

Returns true iff impl has empty conclusion.

Provides function for exploration and computing proper premises.

Available Functions

Function Documentation

Argument List: ([‍ctx knowledge impl])

Documentation:

Starts a repl for counterexamples, which must be specified completely.

Argument List: ([‍ctx known impl])

Documentation:

Default handler for attribute exploration. Does it's interaction on the console.

Argument List: ([‍possible-ctx certain-ctx known impl])

Documentation:

Default handler for attribute exploration with incomplete counterexamples. Does it's interaction on the console.

Argument List: ([‍query state])

Documentation:

Runs the given REPL command query with state, in the case the query uniquely determines a command. If not, an error message is printed and state is returned.

Argument List: ([‍ctx [‍g atts] auts])

Documentation:

Generates for the given context ctx and a given example row [g atts] a sequence of new examples (as rows of the same form) by applying the context automorphism in auts. The context automorphisms are applied to the attributes in atts only, the corresponding object will be a newly generated.

Argument List: ([‍& {:keys [‍possible-context certain-context context background-knowledge handler incomplete-counterexamples]}])

Documentation:

Performs attribute exploration on the given context(s). Returns a hashmap of implications computed and the final context, stored with keys :implications and :context (in the case of complete counterexamples) or :possible-context/:certain-context (in the case of incomplete counterexamples), respectively.

Arguments are passed as keyword arguments like so

(explore-attributes
  :context ctx-1
  :handler my-handler)

(explore-attributes
  :incomplete-counterexamples true
  :possible-context ctx-1
  :certain-context  ctx-2
  :handler          my-other-handler
  :background-knowledge #{})

Either a value for :context or values for :possible-context and :certain-context must be given, but not both. The second option is only possible if :incomplete-counterexamples is set to «true».

Optional keyword arguments are:

  • :handler «fn»

    Interaction is accomplished via the given handler fn. Depending on whether incomplete counterexamples are allowed or not, this handler is called with different arguments and is supposed to return different things:

    • if incomplete counterexamples are not allowed, «fn» is called (in this order) with the current working context, the set of known implications and the current implication to be asked to the expert. It is supposed to return either «nil» (in which case the implication is accepted), or a sequence of counterexamples which are supposed to be of the form

      [g attributes]

      where «g» is the name of a new object and «attributes» is the set of attributes the new object should possess.

    • if incomplete counterexamples are allowed, «fn» is called with the context of possible incidences, the context of certain incidence, the set of known implications and the current implication to be asked to the expert. It is supposed to return either «nil» (in which case the implication is accepted), or a sequence of counterexamples of the form

      [g positive-attributes negative-attributes],

      where «g» is a new object, «positive-attributes» is a sequence of attributes the new object has, and «negative-attributes» is a sequence of attributes the new object does not have. Note that «positive-attributes» and «negative-attributes» must be disjoint.

    Note that it is the responsibility of the handler to ensure that the counterexample is correct. If this is not the case, the exploration algorithm will just ask the same question in the next iteration again.

    It is possible to abort the exploration from within a handler. For this, the handler just has to return :abort. In this case, the current working context as well as the currently known implications are returned as if the exploration would have been finished in that iteration.

  • :background-knowledge «set of implications»

    background-knowledge denotes a set of implications used as background knowledge, which will be subtracted from the computed result.

  • :incomplete-counterexamples «true or false»

    Specifies whether incomplete counterexamples are allowed or not. Default is false. Mandatory to be set to true if context is given via :possible-context and :certain-context.

If you want to use automorphisms of the underlying context, you have to construct a special handler using the «make-handler» function. See the corresponding documentation of «make-handler».

Argument List: ([‍ctx background-knowledge handler])

Documentation:

Performs attribute exploration with complete background knowledge

Argument List: ([‍possible-ctx certain-ctx background-knowledge handler])

Documentation:

Performs attribute exploration allowing for incomplete counterexamples

Argument List: ([‍new-atts impl])

Documentation:

Returns true iff set of new attributes does not respect implication impl.

Argument List:

Documentation:

Returns the help string of the given command.

Argument List: ([‍possible-ctx certain-ctx knowledge impl])

Documentation:

Starts a repl for counterexamples, which may be incomplete.

Argument List: ([‍& {:keys [‍automorphisms incomplete-counterexamples?], :or {automorphisms #{}, incomplete-counterexamples? false}}])

Documentation:

Creates a handler for attribute exploration. Valid keys are

  • automorphisms: A sequence of automorphisms of the overall context, used to construct more examples from a given one.

    Currently, this has only an effect if the counterexamples are complete.

  • incomplete-counterexamples?: If true, allows for incomplete counterexamples. In contrast to the case of complete counterexamples, the function returned takes four arguments (instead of 3), namely the context of the possible incidence, the context of the certain incidence, the known implications as well as the current implication to be asked to the expert.

Argument List:

Documentation:

Runs a command for the counterexample REPL.

Argument List: ([‍impls positives negatives unknown])

Documentation:

Saturates the partial example given by positives, negatives and unknown. Uses the set impls of implications for saturation.

Argument List: ([‍query])

Documentation:

Returns all known repl commands for query, which can be a symbol or a string.

Argument List: ([‍state attributes impl])

Documentation:

Checks the given example for being valid.

Basis datastructure and definitions for abstract lattices.

Available Functions

Function Documentation

Argument List: ([‍base-set order-function inf sup])

Documentation:

Positional factory function for class conexp.fca.lattices.Lattice.

Argument List: ([‍lattice])

Documentation:

Returns the base set of lattice.

Argument List: ([‍ctx])

Documentation:

Returns for a given context ctx its concept lattice.

Argument List: ([‍lat x y])

Documentation:

Checks whether x is direct lower neighbour of y in lattice lat.

Argument List: ([‍lat])

Documentation:

Checks (primitively) whether given lattice lat is distributive or not.

Argument List: ([‍lat])

Documentation:

Dualizes given lattice lat.

Argument List: ([‍lat])

Documentation:

Given a lattice checks if its order is indeed a lattice order.

Argument List: ([‍lattice])

Documentation:

Returns a function computing the infimum in lattice.

Argument List: ([‍lat])

Documentation:

Returns the lattice atoms of lat.

Argument List: ([‍lat])

Documentation:

Returns the lattice coatoms of lat.

Argument List: ([‍lat])

Documentation:

Returns all (i.e. sup and inf) irreducible elements of lattice lat.

Argument List: ([‍lat])

Documentation:

Returns the inf-irreducible elements of lattice lat.

Argument List: ([‍lat y])

Documentation:

Returns all direct lower neighbours of y in lattice lat.

Argument List: ([‍lat])

Documentation:

Returns the one element of lattice lat.

Argument List: ([‍lat])

Documentation:

Returns the sup-irreducible elements of lattice lat.

Argument List: ([‍lat x])

Documentation:

Returns all direct upper neighbours of x in lattice lat.

Argument List: ([‍lat])

Documentation:

Returns the zero element of lattice lat.

Argument List: ([‍& args])

Documentation:

Standard constructor for makeing lattice. Call with two arguments [base-set order] to construct the lattice by its order relation (given as a set of pairs or as a function of two arguments). Call with three arguments [base-set inf sup] to construct the lattice by its algebraic operations.

Note: This function will test the resulting lattice for being one, which may take some time. If you don't want this, use make-lattice-nc.

Argument List: ([‍base-set order-function] [‍base-set inf sup] [‍base-set order-function inf sup])

Documentation:

Creates a new lattice from the given arguments, without any checks. Use with care.

Argument List: ([‍lat])

Documentation:

Checks (primitively) whether given lattice lat is modular or not.

Argument List: ([‍lattice])

Documentation:

Returns a function of one or two arguments representing the order relation. If called with one argument it is assumed that this argument is a pair of elements.

Argument List: ([‍lat])

Documentation:

Returns the standard context of lattice lat.

Argument List: ([‍lattice])

Documentation:

Returns a function computing the supremum in lattice.

More on FCA.

Available Functions

Function Documentation

Argument List:

Documentation:

Enable computation of concept probability with floating point arithmetic instead of rationals

Argument List: ([‍ctx-1 ctx-2])

Documentation:

Returns all bonds between ctx-1 and ctx-2.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

All bonds between ctx-1 and ctx-2, computed using shared intents.

Argument List: ([‍ctx-1 ctx-2])

Documentation:

All intents shared between contexts ctx-1 and ctx-2. ctx-1 and ctx-2 must have the same attribute set.

Argument List: ([‍concepts alpha])

Documentation:

Takes the seq concepts' consisting of all concepts of a context and computes the average concept robustness with parmater alpha'.

Argument List: ([‍ctx-1 ctx-2 ctx])

Documentation:

Checks whether context ctx is a bond between ctx-1 and ctx-2.

Argument List: ([‍context concept])

Documentation:

Compute the probability of a concept' in context' 𝕂 in the following manner. Let pₘ be the relative frequence of attribute m in context. The probability of a subset B ⊆ M in 𝕂 is the product of all pₘ for m ∈ B. Then the probability of a concept is defined by pr(A,B) := pr(B=B'') which is ∑_{k=0}^n {n choose k}·p_Bᵏ·(1-p_B)ⁿ⁻ᵏ·∏_{m ∈ M ∖ B}(1-p_mᵏ).

Argument List: ([‍concept concepts alpha sorted?] [‍concept concepts alpha])

Documentation:

Computes the robustness of a concept' in a context with parameter alpha' by using the seq concepts' consisting of all concepts of the context. The optional boolean parameter sorted?' allows to declare the seq of concepts as beeing already sorted by increasing size of the attribute set. This function uses the function concept-robustness-polynomial.

Argument List: ([‍concept cache])

Documentation:

Helper-function for `concept-robustness-polynomial'.

This function computes the value e(Y,concept'), based on the already computed values e(Z,concept'), which are given in the second parameter cache' in the form [Z, e(Z, concept')].

This function is needed in the algorithm on page 19 in "Finding Robust Itemsets under Subsampling" from Tatti, Moerchen, and Calders.

Argument List: ([‍concept concepts sorted?] [‍concept concepts])

Documentation:

Return the coefficients of the robustness polynomial of `concept'.

For the given concept' of a context, the coefficients of the polynomial p corresponding to the robustness is computed by using the seq concepts' of all concepts of the context. The optional boolean parameter `sorted?' allows to declare the seq of concepts as being already sorted by increasing attribute-set. Thus if v is the result of (robustness-polynomial concept concepts), then (eval-polynomial v (- 1 alpha)) computes the robustness with parameter alpha.

For details see "Finding Robust Itemsets under Subsampling" from Tatti, Moerchen, and Calders, pages 17–19.

Argument List: ([‍context concept])

Documentation:

Compute the concept stability of concept' in context'.

Argument List: ([‍base-set clop])

Documentation:

Returns a context whose intents are exactly the closed sets of the given closure operator on the given base-set.

Argument List: ([‍n])

Documentation:

Returns a context for a non-negative number n which has as it's extents the closure systems on the set {0 .. (n-1)} and as it's intents the corresponding implicational theory.

Argument List: ([‍x y])

Documentation:

Computes the Jaccard index of two sets. This is |x ∩ y| / |x ∪ y|. Returns 1 if both sets are empty.

Argument List: ([‍c base-set B C])

Documentation:

For a given closure operator c on a set base-set, maximizes the set C (i.e. returns a superset of C) that is not a superset of B (i.e. there exists an element m in B without C that is also not in the result.

Argument List: ([‍ctx-1 ctx-2 b])

Documentation:

The smallest shared intent of contexts ctx-1 and ctx-2 containing b.

Argument List: ([‍ctx-1 ctx-2 rel])

Documentation:

Returns the smallest bond between ctx-1 and ctx-2 that has the elements of rel as crosses.

Argument List: ([‍x y])

Documentation:

Computes the Sorensen coefficient of two sets. This is 2 * |x ∩ y| / (|x| + |y|). Returns 1 if both sets are empty.

Argument List: ([‍sim [‍c1 c2]] [‍sim [‍c1 c2] w])

Documentation:

Computes a weighted concept similarity for a given similatity measure sim', two concepts [c1' c2'] and an optional weight w' (default is 1/2).

That is the weighted average of the similarity of the extents/object sets (weight w') and the intents/attribute sets (weight 1-w').

This is from Alqadah, F. & Bhatnagar, R. (2011), 'Similarity measures in formal concept analysis.', Ann. Math. Artif. Intell. 61 (3), 249, https://doi.org/10.1007/s10472-011-9257-7

Provides functionality to represent conexp-clj datastructures as latex code.

Available Functions

Function Documentation

Argument List: ([‍this] [‍this choice])

Documentation:

Returns a string representation of this.

Argument List: ([‍string])

Documentation:

Escapes all significant characters used by LaTeX.

Available Functions

Function Documentation

Argument List: ([‍input-format [‍file] & body])

Documentation:

Defines input format for contexts.

Argument List: ([‍input-format [‍thing file] & body])

Documentation:

Defines output format for contexts.

Argument List: ([‍file__7379__auto__] [‍file__7379__auto__ format__7380__auto__])

Documentation:

Tries to determine the format used in file.

Argument List: ([‍])

Documentation:

Returns default write format for contexts.

Argument List: ([‍])

Documentation:

Returns a list of known context IO formats, i.e. formats for which reading and writing is defined.

Argument List: ([‍])

Documentation:

Returns a list of known context input formats

Argument List: ([‍])

Documentation:

Returns a list of known context input formats

Argument List: ([‍file] [‍file explicit-format])

Documentation:

Reads context from file, automatically determining the format used.

Argument List: ([‍format__7380__auto__])

Documentation:

Sets default write format for contexts to format.

Argument List: ([‍format context file] [‍context file])

Documentation:

Writes context to file using format.

Available Functions

Function Documentation

Argument List: ([‍input-format [‍file] & body])

Documentation:

Defines input format for lattices.

Argument List: ([‍input-format [‍thing file] & body])

Documentation:

Defines output format for lattices.

Argument List: ([‍file__7379__auto__] [‍file__7379__auto__ format__7380__auto__])

Documentation:

Tries to determine the format used in file.

Argument List: ([‍])

Documentation:

Returns default write format for lattices.

Argument List: ([‍])

Documentation:

Returns a list of known lattice IO formats, i.e. formats for which reading and writing is defined.

Argument List: ([‍])

Documentation:

Returns a list of known lattice input formats

Argument List: ([‍])

Documentation:

Returns a list of known lattice input formats

Argument List: ([‍file] [‍file explicit-format])

Documentation:

Reads lattice from file, automatically determining the format used.

Argument List: ([‍format__7380__auto__])

Documentation:

Sets default write format for lattices to format.

Argument List: ([‍format lattice file] [‍lattice file])

Documentation:

Writes lattice to file using format.

Implements IO for layouts.

Available Functions

Function Documentation

Argument List: ([‍input-format [‍file] & body])

Documentation:

Defines input format for layouts.

Argument List: ([‍input-format [‍thing file] & body])

Documentation:

Defines output format for layouts.

Argument List: ([‍file__7379__auto__] [‍file__7379__auto__ format__7380__auto__])

Documentation:

Tries to determine the format used in file.

Argument List: ([‍])

Documentation:

Returns default write format for layouts.

Argument List: ([‍])

Documentation:

Returns a list of known layout IO formats, i.e. formats for which reading and writing is defined.

Argument List: ([‍])

Documentation:

Returns a list of known layout input formats

Argument List: ([‍])

Documentation:

Returns a list of known layout input formats

Argument List: ([‍file] [‍file explicit-format])

Documentation:

Reads layout from file, automatically determining the format used.

Argument List: ([‍seq])

Documentation:

Returns a map from elements of seq to their positions.

Argument List: ([‍format__7380__auto__])

Documentation:

Sets default write format for layouts to format.

Argument List: ([‍format layout file] [‍layout file])

Documentation:

Writes layout to file using format.

Implements IO for Many-Valued Contexts.

Available Functions

Function Documentation

Argument List: ([‍input-format [‍file] & body])

Documentation:

Defines input format for mv-contexts.

Argument List: ([‍input-format [‍thing file] & body])

Documentation:

Defines output format for mv-contexts.

Argument List: ([‍file__7379__auto__] [‍file__7379__auto__ format__7380__auto__])

Documentation:

Tries to determine the format used in file.

Argument List: ([‍])

Documentation:

Returns default write format for mv-contexts.

Argument List: ([‍])

Documentation:

Returns a list of known mv-context IO formats, i.e. formats for which reading and writing is defined.

Argument List: ([‍])

Documentation:

Returns a list of known mv-context input formats

Argument List: ([‍])

Documentation:

Returns a list of known mv-context input formats

Argument List: ([‍file] [‍file explicit-format])

Documentation:

Reads mv-context from file, automatically determining the format used.

Argument List: ([‍file] [‍file explicit-format])

Documentation:

Reads mv-context from file, automatically determining the format used.

Argument List: ([‍format__7380__auto__])

Documentation:

Sets default write format for mv-contexts to format.

Argument List: ([‍format mv-context file] [‍mv-context file])

Documentation:

Writes mv-context to file using format.

Argument List: ([‍format mv-context file] [‍mv-context file])

Documentation:

Writes mv-context to file using format.

Available Functions

Function Documentation

Argument List: ([‍lattice])

Documentation:

Returns an infimum additive layout for lattice.

Argument List:

Documentation:

Standard layout function. Call on a lattice to get a layout.