Changelog
Source:NEWS.md
kofn 0.4.0
Breaking changes
The kofn() constructor now takes a component argument (a dfr_dist prototype from flexhaz) instead of a stringy family argument:
# Before (0.3.x):
kofn(k = 2, m = 3, family = "exponential")
kofn(k = 2, m = 3, family = "weibull")
# After (0.4.0):
kofn(k = 2, m = 3, component = dfr_exponential())
kofn(k = 2, m = 3, component = dfr_weibull())Rationale: object-based component specification composes with the rest of the ecosystem (flexhaz, serieshaz, maskedhaz) and makes the supported-family table a property of class dispatch rather than a parallel lookup in match.arg. Adding future supported component families is now a one-line change.
The same rename applies to compare_fisher_info():
# Before:
compare_fisher_info(rates = c(1, 2), family = "exponential", ...)
# After:
compare_fisher_info(rates = c(1, 2), component = dfr_exponential(), ...)Internal helpers parse_params(), kofn_dgp(), and kofn_components() take component rather than family. These were @keywords internal and not part of the public API, but downstream code that touched them via ::: will need the same rename.
kofn 0.3.1
Documentation
- Vignettes restructured around the post-refactor package scope. Deleted outdated vignettes (
censoring-framework,kofn-systems,general-kofn,symmetry-breaking) that documented removed topology / general-system APIs; added:-
getting-started: quick tour of the kofn model, fit, and observation schemes. -
dist-structure-integration: how kofn delegates DGP and topology to dist.structure, convention conversion, migration notes for v0.2.0 users.
-
- Added
_pkgdown.ymlconfiguring navbar, article menus, and a reference index grouped by theme. - Retained and verified:
exponential-parallel,observation-schemes,weibull-em,periodic-inspection,ecosystem.
kofn 0.3.0
Major refactor: dist.structure adoption
kofn now delegates the data-generating process (DGP), topology, and system-level distribution generics to dist.structure. The package focuses exclusively on inference for k-out-of-n systems: log-likelihood, score, Hessian, fit, observation schemes (right/left/interval/periodic), masked cause-of-failure, periodic-inspection (Scheme 1), and Fisher information comparison.
Removed
-
coherent_system(),parallel_system(),series_system(),kofn_system(),bridge_system(),consecutive_k_system(): use the corresponding constructors indist.structure(coherent_dist,parallel_dist,series_dist,kofn_dist,bridge_dist,consecutive_k_dist). -
system_signature(),system_lifetime(),system_censoring(),critical_states(),min_paths(),min_cuts(),phi(),min_cuts_from_paths(),minimize_sets(): usedist.structureequivalents (registered on everydist_structuresubclass). -
loglik_system(),fit_system(),rdata_system(): replaced by theloglik/fit/rdataS3 methods onkofnmodel objects (for k-of-n) plus the dist generics ondist.structure::exp_kofn,wei_kofn,coherent_dist(for general topologies). -
f_sys_general(),S_sys_general(): usealgebraic.dist::density()andsurv()on adist.structureobject. -
make_dists(),exp_dist(),weibull_dist()(the lightweight$pdf/$cdf/$survlist interface): replaced byalgebraic.dist::exponential()andweibull_dist()plus the algebraic.dist generics.
Changed
-
kofn()constructor no longer accepts asystem = ...argument. kofn is now exclusively for k-of-n estimation. Users with non-k-of-n topologies should usedist.structure::coherent_dist()directly. -
loglik.exp_kofnandloglik.wei_kofngeneral-k path now delegates per-observation contributions todist.structure::exp_kofn(k_dist, par)andwei_kofn(k_dist, shapes, scales)via the algebraic.distdensity,surv, andcdfgenerics. Parallel-fast-path (k=m) IE expansion is preserved as the closed-form path. -
loglik_scheme1system density now usesdensity(dist.structure::exp_kofn(...))/wei_kofn(...)instead of the localf_sys_generalengine. -
rdata.exp_kofn,rdata.wei_kofn,rdata_masked,rdata_scheme1use a kofn-internal specializedkofn_censoring(k, times)helper (the k-th order statistic) instead of the generalsystem_censoringalgorithm. -
assumptions.exp_kofnandassumptions.wei_kofnno longer mention “general coherent system” since kofn is k-of-n only.
Internal
- New file
R/internal_topology.Rwith private helperskofn_censoring(),kofn_dgp(),kofn_components(). Uses the k_dist = m - k_kofn + 1 conversion between kofn’s :F convention (k_kofn = number of failures triggering system failure) and dist.structure’s :G convention (k_dist = number of functioning components required). - Deleted
R/coherent_system.R(599 lines),R/system_density.R(336 lines), andR/dist.R(118 lines). - Package shrank from 4312 lines to roughly 2750 lines (~36% reduction) in the R/ directory.
kofn 0.2.0
Generalized masking:
loglik_masked()andrdata_masked()extend masked cause-of-failure from series (k=1) to arbitrary k-out-of-m systems.Periodic inspection (Scheme 1):
loglik_scheme1()andfit_scheme1()support general k via the critical-state density engine.Performance: eagerly precomputed critical/functioning states in
coherent_system()and vectorizedf_sys_general()give ~70x speedup for Scheme 1 likelihood evaluation.Migrated optimization to the
compositional.mlepackage. The internal helpermultistart_mle()was removed and replaced by a privatesolve_mle()wrapper aroundcompositional.mle::lbfgsb()with a Nelder-Mead fallback in log-parameterization.New vignettes: symmetry-breaking comparison, periodic inspection, observation schemes, general k-out-of-m.