Improvements:
ImplicationSet now
inherits from RuleSet, following proper object-oriented
design. Shared methods (filtering, subsetting, printing, serialization,
etc.) live in the parent RuleSet class, eliminating ~600
lines of duplicated code. ImplicationSet retains only
FCA-specific methods (closure(),
apply_rules(), to_basis(),
to_direct_optimal(), etc.).dplyr verbs
(filter(), arrange(), slice())
now work on RuleSet objects in addition to
ImplicationSet, via S3 method dispatch.to_json()
methods and corresponding *_from_json() functions for
FormalContext, ConceptLattice,
ImplicationSet, and RuleSet. This allows for
efficient serialization of all major data structures in
fcaR, including recursive export of nested objects.Major Enhancements:
dplyr verbs, allowing for a fluent, grammar-based
manipulation of FCA objects:
select()
(attributes), filter() (objects), mutate()
(feature engineering), arrange() (sorting), and
rename(). Includes support for tidyselect
helpers (e.g., starts_with()).filter()
(based on metrics or attributes), arrange() (sorting
rules), and slice() (subsetting by index).ImplicationSet filtering to query rules based
on attribute presence/absence: lhs(), rhs(),
not_lhs(), lhs_any(), etc. This allows
querying rules like
filter(rhs("Attribute_A"), support > 0.2).find_causal_rules() method in FormalContext,
enabling the discovery of causal rules by controlling for confounding
variables using the “Fair Odds Ratio” on matched pairs.Improvements:
subcontext() method in FormalContext. It now
robustly handles negative indices, logical vectors, and character
vectors, and prevents dimension collapsing issues (using
drop = FALSE) that previously caused errors with the
Matrix package.[ and
related methods of ImplicationSet. These ensure that
critical context metadata (such as the number of objects \(N\) for support calculation) is preserved
when filtering or sorting rules, fixing previous issues where metadata
was lost.dplyr attributes.Documentation:
fcaR_dplyr
vignette illustrating the new data manipulation workflow.causal vignette
explaining the new causal mining functionality and its application to
Simpson’s Paradox.Fixes:
Matrix coercion errors (dgCMatrix to
data.frame) in R 4.x when using internal incidence
matrices.fixupDN.if.valid errors from the
Matrix package when filtering operations resulted in empty
contexts (0 objects or 0 attributes).ggplot2,
ggraph, igraph, rstudioapi, and
yaml to Suggests.forcats and magrittr dependencies
by using base R equivalents and the native pipe |>.Major Enhancements:
factorize() method to FormalContext class. It
now implements two state-of-the-art algorithms:
RandomContext(): Generates synthetic contexts using
Uniform or Dirichlet distributions
(mimicking real-world data structure).randomize_context(): Randomizes existing contexts via
Edge swapping (preserves marginal sums) or
Rewiring (preserves density).RandomDistributiveContext() to generate synthetic data
guaranteed to produce distributive lattices (based on Birkhoff’s
theorem).New Functionality:
stability(), separation(), and
fuzzy_density() to ConceptLattice to compute
concept quality metrics.ConceptLattice to efficiently check algebraic properties
using sparse matrix operations: is_distributive(),
is_modular(), is_semimodular(), and
is_atomic().find_concepts(): “InClose”
(default), “FastCbO”, or “NextClosure”.to_direct_optimal() to convert implication sets
into the direct optimal basis.use_hedge() and get_hedge() to
manage hedges in fuzzy implication closures.Improvements:
hasseDiagram. Implemented a new native graphics engine for
concept lattices.advanced_lattice_metrics, creating_contexts,
fuzzy_fca, lattice_visualization,
matrix_factorization, random_contexts and
lattice_properties.Enhancements:
fc$scale() function admits a new argument
bg (default: FALSE) which, if set to TRUE, avoids computing
the background knowledge of the scales.Fixes:
Enhancements:
fc$use_logic() to select one of the
available_logics().Bugfixes:
Enhancements:
New functionality:
Bugfixes:
Enhancements:
New functionality:
%&% and %|% that
compute the intersection (logical and) and the union
(or operation) on Sets.Breaking changes:
Bugfixes:
Bugfixes:
Enhancements:
Bugfixes:
Bugfixes:
Enhancements:
Bugfixes:
Enhancements:
Made changes suggested by CRAN:
Updated vignettes
NEWS.md file to track changes to the
package.