dbrobust 1.1.0
New Features
- Robust Covariance & MCD Integration: Integrated
the new Fast Minimum Covariance Determinant (
mcd) estimator
as a robust alternative to Geometric Variability (gv) for
handling continuous variables within robust_distances().
This includes full stochastic control and iterational parameter tuning
(niter, nstart).
- Multi-Source Distance Combination
(
merge_distances): Implemented
merge_distances(), a generalized multi-source distance
combination function based on multidimensional Related Metric Scaling
(RelMS) methodology. It dynamically fuses multiple distance matrices
(sources) while penalizing and discarding shared redundant information
across sources.
- Cramér’s V Categorical Distance Framework: Enhanced
internal categorical distance calculations
(
dist_categorical()) with support for weighted Cramér’s V
association matrices (method = "cramer"), enabling
Mahalanobis-type distance projections that down-weight redundant
categorical attributes.
- Hybrid Rcpp Engine for RelMS: Integrated
Rcpp and RcppArmadillo into the package core
to optimize Related Metric Scaling in merge_distances().
High-overhead combinatoric cross-product loops are now offloaded to
compiled native C++ code linked against R’s BLAS and
LAPACK libraries.
- Algebraic Memory Optimization: Refactored internal
structural equations in
merge_distances() to eliminate
heavy diagonal scaling matrices (diag()), reducing spatial
complexity from \(O(n^3)\) to \(O(n^2)\) via vectorized row/column scaling.
Benchmarks show a consistent ~1.9x speedup under
high-dimensional stress scenarios (\(m =
40\) sources), cutting execution times and memory footprint in
half.
- Robust Eigenvalue Strategy in
make_euclidean(): Reimplemented
make_euclidean() using a hybrid eigenvalue computation
strategy. Integrated RSpectra::eigs_sym() to compute only
the smallest algebraic eigenvalue, backed by a robust
tryCatch fallback to base eigen() in case of
convergence failures or missing convergence warnings, ensuring 100%
stability under extreme colinearity.
- Optimized internal matrix operations in the G-Gower algorithms by
replacing standard matrix multiplications (
%*% and
t()) with highly optimized crossprod() and
tcrossprod() functions.
- Enhanced internal plotting functions to fully support robust color
mapping, allowing both standard positional color vectors and named
character vectors for ultra-safe group color alignment.
- Updated
plot_qgraph() internal logic to support
advanced customization arguments, including explicit toggle control for
group legends (show_legend) and custom edge/arc coloring
(edge_color).
Bug Fixes
- Corrected Minkowski parameter in
calculate_distances(): Standardized the Minkowski
distance exponent argument to q (instead of
p), updating internal signatures and documentation for
consistency.
- Resolved default weight assignment in
make_euclidean(): Fixed a documentation and
functional mismatch where omitting the weight argument w
was not properly documented as defaulting to uniform weights (\(w_i = 1/n\)).
- Fixed an
isSymmetric error in
make_euclidean() when processing objects of class
D2 (from dbstats) or other custom distance
classes. The function now ensures raw matrix coercion before symmetry
checks.
- Fixed a bug where
RSpectra unconverged outputs
(numeric(0)) caused an
argument has length zero error during Lingoes evaluation in
make_euclidean().
- Fixed a bug in
robust_distances() where binary and
categorical variables provided as factors in a data.frame
were incorrectly coerced, leading to inflated distance
calculations.
- Fixed an issue in the Jaccard distance calculation for asymmetric
binary variables where a union of zero (both observations lacking the
trait) caused incorrect distance assignments. It now correctly evaluates
to 0.
- Removed hidden non-ASCII characters (non-breaking spaces) from
source code files to fully comply with CRAN cross-platform portability
requirements.
Documentation & Testing
- Stochastic Reproducibility Testing: Expanded the
testthat suite to comprehensively check the new MCD and
RelMS components, enforcing strict reproducibility boundaries via
isolated seeds (set.seed).
- Fully updated Roxygen2 documentation for network plotting internals
(
plot_qgraph), providing comprehensive examples
demonstrating custom named vector coloring and layout optimization.
- Enhanced
make_euclidean documentation with detailed
explanations of performance optimizations and hybrid eigenvalue
selection logic.
- Added detailed examples and unit tests for
merge_distances() covering multi-domain datasets,
high-source stress tests (\(m = 50\)),
and exact distance matrix combinations.
dbrobust 1.0.0