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.
Super classes
fcaR::ConceptSet -> fcaR::ConceptLattice -> BondLattice
Methods
Inherited methods
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$superconcepts()fcaR::ConceptLattice$supremum()fcaR::ConceptLattice$to_json()fcaR::ConceptLattice$top()fcaR::ConceptLattice$upper_neighbours()fcaR::ConceptLattice$width()
Method new()
Initialize a BondLattice object.
Usage
BondLattice$new(extents, intents, objects, attributes, I, fc1, fc2)Arguments
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
Method get_bonds()
Extract the bonds represented by the intents of the lattice.
Method similarity()
Compute similarity, affinity, or complexity metrics between the two contexts.
Usage
BondLattice$similarity(
type = c("log-bond", "top-density", "complexity", "core-agreement", "entropy",
"stability", "width", "dimension", "width-index", "dimension-index")
)Arguments
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.
Method print()
Print the BondLattice object.
Method is_bond()
Verify if a relation is a bond between the internal contexts.
Examples
# \donttest{
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]])
#> FormalContext with 5 objects and 3 attributes.
#> B1 B2 B3
#> O1
#> O2
#> O3
#> O4
#> O5
# }