| BondLattice | R Documentation |
This class extends ConceptLattice to represent the lattice of bonds between
two formal contexts K_1 and K_2.
It inherits all lattice operations (finding irreducible elements, subconcepts, etc.)
and provides specific methods to extract bonds as matrices and FormalContexts.
fcaR::ConceptSet -> fcaR::ConceptLattice -> BondLattice
elapsed(numeric) Time elapsed during bond computation (C++ level)
fcaR::ConceptSet$[()fcaR::ConceptSet$extents()fcaR::ConceptSet$intents()fcaR::ConceptSet$is_empty()fcaR::ConceptSet$size()fcaR::ConceptSet$sub()fcaR::ConceptSet$support()fcaR::ConceptSet$to_latex()fcaR::ConceptSet$to_list()fcaR::ConceptLattice$bottom()fcaR::ConceptLattice$decompose()fcaR::ConceptLattice$density()fcaR::ConceptLattice$dimension()fcaR::ConceptLattice$infimum()fcaR::ConceptLattice$is_atomic()fcaR::ConceptLattice$is_distributive()fcaR::ConceptLattice$is_modular()fcaR::ConceptLattice$is_semimodular()fcaR::ConceptLattice$join_irreducibles()fcaR::ConceptLattice$lower_neighbours()fcaR::ConceptLattice$meet_irreducibles()fcaR::ConceptLattice$plot()fcaR::ConceptLattice$separation()fcaR::ConceptLattice$set_state()fcaR::ConceptLattice$stability()fcaR::ConceptLattice$subconcepts()fcaR::ConceptLattice$sublattice()fcaR::ConceptLattice$sublattice_from()fcaR::ConceptLattice$superconcepts()fcaR::ConceptLattice$supremum()fcaR::ConceptLattice$to_json()fcaR::ConceptLattice$top()fcaR::ConceptLattice$upper_neighbours()fcaR::ConceptLattice$width()new()Initialize a BondLattice object.
BondLattice$new(extents, intents, objects, attributes, I, fc1, fc2)
extents(dgCMatrix) The extents of all concepts
intents(dgCMatrix) The intents of all concepts
objects(character) Names of the objects (not required for bonds, can be generic)
attributes(character) Names of the attributes (flattened $G_1 \times M_2$)
I(matrix) Built incidence matrix
fc1(FormalContext) The first formal context
fc2(FormalContext) The second formal context
A new BondLattice object.
get_bonds()Extract the bonds represented by the intents of the lattice.
BondLattice$get_bonds(indices = NULL)
indices(numeric or logical vector) The indices of the bonds (concepts) to extract. If NULL (default), extracts all.
A list of FormalContext objects, each representing one bond.
similarity()Compute similarity, affinity, or complexity metrics between the two contexts.
BondLattice$similarity(
type = c("log-bond", "top-density", "complexity", "core-agreement", "entropy",
"stability", "width", "dimension", "width-index", "dimension-index")
)type(character) The type of metric to compute:
"log-bond": (Default) Normalized log-ratio of bonds. High value means high logical affinity.
"top-density": Density of the largest possible bond (the top of the lattice).
"complexity": Ratio of irreducible bonds to total bonds. Low value implies high structural emergence.
"core-agreement": Ratio of filled cells in the Core bond versus the Top bond. Measures fundamental consensus.
"entropy": Interaction entropy based on the log-size of the lattices.
"stability": Average stability of the bonds in the lattice.
A numeric value representing the metric.
get_core()Get the 'Core' bond (the smallest possible bond).
BondLattice$get_core()
A FormalContext representing the minimal bond.
print()Print the BondLattice object.
BondLattice$print()
Nothing, just prints the object summary.
is_bond()Verify if a relation is a bond between the internal contexts.
BondLattice$is_bond(relation)
relation(matrix or FormalContext) The relation to verify.
TRUE if it's a bond, FALSE otherwise.
clone()The objects of this class are cloneable with this method.
BondLattice$clone(deep = FALSE)
deepWhether to make a deep clone.
set.seed(42)
mat1 <- matrix(sample(0:1, 15, replace = TRUE), nrow = 5, ncol = 3)
rownames(mat1) <- paste0("O", 1:5)
colnames(mat1) <- paste0("A", 1:3)
fc1 <- FormalContext$new(mat1)
mat2 <- matrix(sample(0:1, 12, replace = TRUE), nrow = 4, ncol = 3)
rownames(mat2) <- paste0("P", 1:4)
colnames(mat2) <- paste0("B", 1:3)
fc2 <- FormalContext$new(mat2)
bl <- bonds(fc1, fc2)
# Extract all bonds as FormalContext objects
my_bonds <- bl$get_bonds()
print(my_bonds[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.