FlexRL 1.0.1 (release candidate)
- Bugs fixed.
- Performance: the Gibbs machinery is ~100x faster end-to-end on the benchmark problem (
review/bench-stem.R, nA=10000, nB=15000, n_links=7500, 22 sweeps: 238.7 s -> 2.29 s); on a 100k/150k-record problem (75k links, 22 sweeps) a serial run takes 88 s andthreads = 8brings it to ~51 s. The candidate-pair log-likelihood is now a plain per-pair vector (the nA x nB sparse matrix and data-frame row subsetting are gone), candidate pairs are built by a single C++ call (buildCandidatePairs()), the per-sweep likelihood pieces are computed by one fused C++ pass (pairLogLik()),sampleLsamples the joint (H^A, H^B) through an exact O(nval) factorization, and all kernels draw from pre-drawn uniform blocks. -
Breaking (internal kernels): code calling the samplers directly must be adjusted:
-
sampleD()signature is now(S, LLA, LLB, LLL, gamma, nlinkrec, links, threads).gammais a single scalar; the linkage state is passed aslinks, a 0-based k x 2 matrix of (A, B) record pairs (0x2 when nothing is linked), replacing thesumRowD/sumColDarguments — the flags are derived fromlinksand still returned. The return list gainslinks(the updated 0-based pairs) next tolinksQ(1-based rows ofS);loglikwas dropped from the inputs (the value cancels in every acceptance ratio and is reconstructed internally). -
simulateD()likewise takes the currentlinksRand nosumRowD/sumColD; it gainsthreadsandmodel_dynamics. - The global C++ link map — and with it
initDeltaMap()andDeltafind()— is gone: a sweep carries no state between calls, everything it needs lives in its arguments. -
sampleNL()takes aunifargument;sampleL()takes(survivalpSameH, nval, phikA, phikB, eta, unif)and returns the joint (H^A, H^B) matrix. - Kernels draw their Uniform(0,1) deviates from pre-drawn blocks consumed by pair position rather than calling the RNG per draw: for a given
set.seed()the realised draws differ from <= 1.0.0 (distributions do not).
-
- OpenMP: the per-pair likelihood loops in the Gibbs kernels are parallelised; new
threadsargument onStEM()(default 4; on a build without OpenMP the code runs sequentially regardless). Results are bitwise identical for any thread count. The package still builds — and runs sequentially — on platforms without OpenMP. - The built-in survival models (exponential, Weibull, Gompertz, piecewise) evaluate through a fused, parallel C++ kernel (
survivalS_cpp) instead of R-level matrix algebra; custom survival functions are unaffected and keep working exactly as before. Values agree with the previous R implementation to ~1e-16 (BLAS rounding);survival_model()objects gain acutsfield. - Parity verified against the pre-optimisation implementation and pinned by permanent regression tests:
tests/testthat/test-golden-parity.Rcompares the current kernels to golden fixtures generated from the pre-optimisation build (review/generate-goldens.R, baselineglm-notes@ 4b09088) — likelihoods and candidate-pair sets exactly, StEM seed clouds and the tiny problem’s stationary frequencies at Monte-Carlo level. Seereview/PARITY-REPORT.md.
FlexRL 1.0.0 (release candidate)
CRAN release: 2026-10-07
- Functions and arguments renamed, data configuration functions added.
- New
survival_model(): the change over time of a structured PIV can be modelled with an exponential (default), Weibull, Gompertz, piecewise-constant or user-defined survival function, passed toStEM()through thesurvival_modelargument.alphachains are named after the model parameters.SurvivalUnstable()andloglikSurvival()are obsolete.cond_hazard_paramsare now given on the parameter scale of the model (log-hazards for the exponential model). - New
RL_diagnostics(): provides record linkage diagnostics over linkage decision rules (thresholds from 0.50 to 0.99); internally computes FDP_measures and discrepancy_measures useful for downstream inference;print(x, threshold = )andplot(x, type = )display the diagnostics, - New
link_with_<pkg>()record linkage wrappers created for several packages: multilink, fastLink, BRL, reclin2, diyar, fedmatch, FlexRL. They return a named list (idxA,idxB,LinkScore) that can be passed directly toRL_diagnostics(). - Useless dependencies dropped; R >= 4.1.0.
- Bugs corrected, warnings added.
