Changelog
Source:NEWS.md
PreciseDist 0.1.0
- All public machine-facing output fields now use lowercase
snake_case. New caches use format version 4;precise_read()normalizes valid version-3 results and ledgers in memory so existing completed work remains readable. - KODAMA factory metrics now preserve the caller’s random-number state and suppress the backend’s unconditional progress output.
-
precise_transform()now supports automatic coercion in both directions withto = "distance"orto = "similarity". Converted rows retain their stable metric keys, updatetype, and record the exact formula inhistory.
Independent PreciseViz package
- CRAN vignettes are now static and package-local; cross-package and interactive guides are website-only articles. PreciseDist no longer lists PreciseViz or visualization engines used only by the website in
Suggests. - Visualization, Trelliscope browsing, and GraphML export now live in the independent
PreciseVizpackage under the same repository. PreciseViz does not import PreciseDist; the packages interoperate through the documented typed-matrix protocol. -
precise_correlations()now returns additiveparametersprovenance (method,permutations,seed, and input type). PreciseViz consumes this precomputed result through its explicitagreement=argument rather than calling back into PreciseDist. - PreciseDist no longer hard-imports
ggplot2,igraph, oruwot, and the obsolete GitHubRemotesentry for the now-CRANtrelliscopejspackage is gone.
Numerical-contract re-baseline
- Registry
input_classis now enforced for non-negative, probability, unit-interval, and binary metrics. Incompatible requests become expliciterrored/input_domainledger rows while compatible metrics continue; input data are never transformed silently. - The producer boundary now requires numeric, finite, square, symmetric matrices, and additionally requires non-negative, zero-diagonal output for
type = "distance".precise_transform()applies the same validation before an operation can mask an invalid input. - Removed asymmetric
kullback_leibler,k_divergence, andneymanrows. Their mean-symmetric forms duplicate existing Jeffreys, Jensen-Shannon, and additive symmetric chi-square measures. Removed proxy’s directionalfagerand non-finitestilesimplementations. Corrected Gower to emit distance rather than diagonal-masked similarity, and made LCSS explicitly bidirectional. - Seed validation now accepts only 0 through
.Machine$integer.max; per-task L’Ecuyer states use six domain-separated hash words instead of one 28-bit seed, removing practical stream collisions. Seeded stochastic results are intentionally re-baselined. - Version-2 caches predate the numerical contract and are rejected with an actionable recomputation error.
- Per-metric timeout cleanup is transient, preserving still-live caller limits; timeout accounting now requires the elapsed-limit condition rather than only wall-clock duration.
PreciseDist has been rebuilt around a typed four-function computational spine: precise_dist() -> precise_transform() -> precise_fusion() -> precise_graph(), each consuming the typed output of the last. PreciseViz can render the resulting typed matrices without a runtime dependency between the packages.
- Every relatedness matrix now carries an explicit type (
distanceorsimilarity); the package never infers type from values and never silently converts one to the other. - Distance family keywords now accept short aliases in both
precise_dist_list()andprecise_dist(): for example,staticis equivalent tostatic_dists. -
precise_diagnostics()adds per-matrix quantitative diagnostics for spread, degeneracy, nearest-neighbour contrast, hubness, graph fragmentation, and optional label separation. It is a companion to visualization, not a ranking or clustering wrapper. -
precise_stability()adds metric-set stability diagnostics: leave-one-metric-out and bootstrap resampling of whole typed matrix rows, returning replicate fused consensuses that compose withprecise_correlations()and typed-matrix consumers such as PreciseViz. - The clustering, supervised-analysis, and one-off visualization satellites of earlier development have been removed in favour of the lean spine.
- The retired
partitionsandtime_seriesarguments have been removed fromprecise_dist(); stability now lives downstream of matrix construction rather than inside the raw data front door. - Heavy optional backends are now gated through Suggests: SNFtool, DistatisR, analogue, KODAMA, future and doFuture are not required for the default spine.
-
precise_dist(parallel=)is now documented and validated as a TRUE/FALSE backend flag, not a core-count argument.
precise_dist() execution engine and persistence redesign
- Failure accounting: every requested metric now terminates in exactly one row of a run ledger (
completed/errored/skipped/unavailable, with reason slugs, error messages, and timings) attached as the"precise_dist_run"attribute and retrievable with the newprecise_run_report(). Failed metrics no longer vanish silently; a consolidated warning names each one. Metrics whose backend package is not installed are recorded asunavailableinstead of stopping the run (unknown metric names still error). - The engine was rewritten from two duplicated
foreachloops to one task function dispatched withfuture.apply::future_lapply()(parallel = TRUE, on the user’sfuture::plan()) or plainlapply()(default). foreach is no longer used byprecise_dist();registerDoFuture()is still needed forprecise_graph()when itsparallelflag is enabled. - New run controls:
plan_only(inspect the resolved plan and resource estimate without computing),max_memory(user-defined GB cap, checked against the estimate before dispatch; without it, runs estimated abovegetOption("PreciseDist.large_run_gb", 8)GB warn and proceed),max_time_per_metric(per-metric limit;local_timeoutis a deprecated alias),max_time_total(between-batch deadline; remainder isskipped), andbatch_size(checkpoint/deadline granularity, auto by default). - New
seedargument:seed = NULLkeeps ordinary randomness (parallel runs usefuture.seed = TRUE); an integer seed gives per-metric RNG streams keyed by metric name — identical results across sequential and parallel plans and stable under request-set edits. BREAKING (numeric): stochastic metrics (random_forest_*,rbf_*,laplace_*) draw from a different stream position than historical unseeded sequential runs, because the old engine’smicrobenchmarktiming wrappers each consumed one hidden RNG draw and are gone. Deterministic metrics are numerically unchanged. - BREAKING:
file=now writes a versioned RDS envelope instead of a bare matrix list. During a run it holdsstate = "partial"(completed native matrices plus the ledger, rewritten atomically by the master after every batch); on normal return it is rewritten once asstate = "complete", holding the exact returned object. Read it with the newprecise_read()(pre-2.0 caches are rejected with a clear message).file=now combines withparallel = TRUE; an existing path errors unlessoverwrite = TRUE. Interrupts checkpoint before re-signalling; a crashed parallel worker aborts with a"precise_dist_crash"error carrying the ledger. - BREAKING: a
dists/dist_funcsdisplay-key collision (for exampledists = "cosine"withdist_funcs = list(cosine = ...)) is now an error — keys join the ledger andprecise_read(metrics=). Duplicatedistsafter alias/family expansion collapse to one row with a message; unnameddist_funcsare keyeduser_func_<i>. -
datamay now be a dataframe/tibble with numeric columns, as documented (non-numeric columns are dropped with a message); previously every data.frame was rejected. - Progress: if progressr is installed,
precise_dist()signals one step per metric (enable withprogressr::with_progress()); verbose narration now usesmessage()and is suppressable. - The example workflow and parallel vignette document the revised contract: plan, seed, limits, checkpoint/recovery, and progress.
precise_correlations() reproducibility
-
precise_correlations()now usesfuture.applyforparallel = TRUEand addsseed = NULL | integer. Integer seeds give reproducible permutation p-values across sequential and future-backed parallel runs;seed = NULLkeeps ordinary session RNG for sequential calls and uses statistically sound Future streams for parallel calls. - Failed or undefined pairwise comparisons now return
NAstatistic/significance cells with one consolidated warning and a"correlation_failures"attribute instead of crashing or leaking raw correlation warnings during result assembly. The main return shape remainsoutput,statistic, andsignif. -
microbenchmarkis no longer imported.