CEC v0.12.1
Minor improvements and fixes
- Fixed a crash in
cec(..., split = TRUE)whenever every attempt at the initial (pre-split) clustering failed to produce a valid result (e.g. too few observations for the enforcedcard.minfloor, most commonly a subset of 3 or fewer points). The internal split-mode code path dereferenced that failed result unconditionally instead of treating it as another unsuccessful start, segfaulting the R process. It now surfaces as the same catchable"all starts failed"error already raised by the non-split path in this situation. - Added missing standard library includes that newer C++ standard libraries (flagged as “clang23” on CRAN) no longer provide indirectly:
<cmath>in thesrc/models/*.hheaders,<functional>invariable_starter.h,<iterator>invec.h,<limits>ininit.cpp, and<utility>inr_ext_ptr.handcommon.h.
CEC v0.12.0
CRAN release: 2026-08-31
New features
-
cec()now accepts an optionalweightsargument: a numeric vector of non-negative values, one per observation. Cluster means, covariances, and the returned$probabilityfield are all weight-aware. Whenweights = NULL(default), behaviour is identical to previous versions.
Breaking changes
- When
weightsis non-uniform,$probabilitynow reports the weighted mixing proportionW_k / W_totalrather than the observation-count fractionn_k / m. - When
weightsis non-uniform,card.minis now interpreted as a minimum weight sum rather than a minimum observation count.
Minor improvements and fixes
- Fixed a crash with non-uniform
weights: a cluster with fewer observations than dimensions could pass the weight-sum-basedcard.mincheck and produce a singular covariance. Cluster removal now also enforces a minimum observation count. - Fixed a crash in
cec(..., keep.removed = TRUE)whenever a cluster was actually removed during clustering (Error in matrix(NA, 1, ncol(center)) : non-numeric matrix extent). -
plot.cec()now warns and skips a single cluster’s covariance ellipse if it cannot be drawn (e.g. a degenerate covariance), instead of failing the whole plot. Previously the surroundingtryCatchhad noerrorhandler and so provided no protection. - Error messages for internal clustering failures now include the underlying cause instead of a generic message.
- Fixed a C++20 compiler warning (ambiguous reversed comparison operators) flagged by CRAN’s macOS checks.
CEC v0.9.3
CRAN release: 2015-02-03