Package: scorematchingad 0.1.1

Kassel Liam Hingee

scorematchingad: Score Matching Estimation by Automatic Differentiation

Hyvärinen's score matching (Hyvärinen, 2005) <https://jmlr.org/papers/v6/hyvarinen05a.html> is a useful estimation technique when the normalising constant for a probability distribution is difficult to compute. This package implements score matching estimators using automatic differentiation in the 'CppAD' library <https://github.com/coin-or/CppAD> and is designed for quickly implementing score matching estimators for new models. Also available is general robustification (Windham, 1995) <https://www.jstor.org/stable/2346159>. Already in the package are estimators for directional distributions (Mardia, Kent and Laha, 2016) <doi:10.48550/arXiv.1604.08470> and the flexible Polynomially-Tilted Pairwise Interaction model for compositional data. The latter estimators perform well when there are zeros in the compositions (Scealy and Wood, 2023) <doi:10.1080/01621459.2021.2016422>, even many zeros (Scealy, Hingee, Kent, and Wood, 2024) <doi:10.1007/s11222-024-10412-w>. A partial interface to CppAD's ADFun objects is also available.

Authors:Kassel Liam Hingee [aut, cre], Janice Scealy [aut], Bradley M. Bell [cph]

scorematchingad_0.1.1.tar.gz
scorematchingad_0.1.1.zip(r-4.5)scorematchingad_0.1.1.zip(r-4.4)scorematchingad_0.1.1.zip(r-4.3)
scorematchingad_0.1.1.tgz(r-4.4-x86_64)scorematchingad_0.1.1.tgz(r-4.4-arm64)scorematchingad_0.1.1.tgz(r-4.3-x86_64)scorematchingad_0.1.1.tgz(r-4.3-arm64)
scorematchingad_0.1.1.tar.gz(r-4.5-noble)scorematchingad_0.1.1.tar.gz(r-4.4-noble)
scorematchingad.pdf |scorematchingad.html
scorematchingad/json (API)
NEWS

# Install 'scorematchingad' in R:
install.packages('scorematchingad', repos = c('https://kasselhingee.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/kasselhingee/scorematchingad/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • microbiome - 16s Microbiome Data for Soil-Transmitted Helminths

On CRAN:

automatic-differentiationscore-matchingstatistical-inferencecpp

4.04 score 1 scripts 158 downloads 39 exports 20 dependencies

Last updated 11 days agofrom:36b031a24c. Checks:9 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKJan 08 2025
R-4.5-win-x86_64OKJan 08 2025
R-4.5-linux-x86_64OKJan 08 2025
R-4.4-win-x86_64OKJan 08 2025
R-4.4-mac-x86_64OKJan 08 2025
R-4.4-mac-aarch64OKJan 08 2025
R-4.3-win-x86_64OKJan 08 2025
R-4.3-mac-x86_64OKJan 08 2025
R-4.3-mac-aarch64OKJan 08 2025

Exports:Binghamcppad_closedcppad_searchdppievaltapeFBppippi_cWppi_cW_autoppi_fromAstarppi_mmmmppi_parammatsppi_paramvecppi_robustppi_robust_alrgengammappi_smvaluesppi_toAstarprintquadratictape_partsrppirppi_egmodelrsymmetricmatrixshowsmvaluessmvalues_wsumtape_gradoffsettape_Hessiantape_Jacobiantape_logJacdettape_smdtape_swaptape_uldtape_uld_inbuilttestquadraticvMFvMF_robustWindhamWindham_populationinverseWindham_populationinverse_alternative

Dependencies:codaFixedPointlatticeMASSMatrixMatrixModelsmcmcMCMCpacknloptrnumDerivoptimxpracmaquantregrbibutilsRcppRcppEigenRdpackrlangSparseMsurvival

Readme and manuals

Help Manual

Help pageTopics
scorematchingad: Score Matching Estimation by Automatic Differentiationscorematchingad-package scorematchingad
Score Matching Estimators for the Bingham DistributionBingham
Score Matching Estimator for Quadratic-Form Score Matching Discrepanciescppad_closed
Iterative Score Matching Estimator Using Conjugate-Gradient Descentcppad_search
Improper Log-Density of the PPI Modeldppi
Evaluate a CppAD Tape Many Timesevaltape evaltape_wsum
Estimate the Fisher-Bingham DistributionFB
16s Microbiome Data for Soil-Transmitted Helminthsmicrobiome
Estimation of Polynomially-Tilted Pairwise Interaction (PPI) Modelppi ppi_smvalues
Quickly Generate a Vector of Windham Exponents for the PPI Modelppi_cW ppi_cW_auto
A PPI Score-Matching Marginal Moment Matching Estimator (dimension=3 only)ppi_mmmm
PPI Parameter Toolsppi_fromAstar ppi_parammats ppi_paramvec ppi_param_tools ppi_toAstar
Robustly Estimate Parameters of the PPI Distributionppi_robust ppi_robust_alrgengamma
Print or show a summary of an Rcpp_ADFunprint,Rcpp_ADFun print,Rcpp_ADFun-method show,Rcpp_ADFun-method
Evaluate the Hessian and Gradient Offset of a Taped Quadratic Functionquadratictape_parts
A Class for CppAD TapesADFun Rcpp_ADFun Rcpp_ADFun-class
Simulate from a PPI Modelrppi rppi_egmodel
Quickly Generate a Symmetric Matrix for Testing and Examplesrsymmetricmatrix
Introduction to Score Matchingscorematchingtheory
Compute Score Matching Discrepancy Value, Gradient, and Hessiansmvalues smvalues_wsum
Tape the Gradient Offset of a Quadratic CppAD Tapetape_gradoffset
Tape the Hessian of a CppAD Tapetape_Hessian
Tape the Jacobian of CppAD Tapetape_Jacobian
Tape the log of Jacobian determinant of a CppAD Tapetape_logJacdet
Build CppAD Tapes for Score Matchingtape_smd
Switch Dynamic and Independent Values of a Tapetape_swap
Generate a tape of a custom unnormalised log-densitytape_uld tape_uld_inbuilt
Test Whether a CppAD Tape is a Quadratic Functiontestquadratic
Score Matching Estimator for the von-Mises Fisher DistributionvMF
Robust Fitting of von Mises FishervMF_robust
Windham Robustification of Point Estimators for Exponential Family DistributionsWindham
Inverse Transform for the Population Parameters Under Windham WeightsWindham_populationinverse Windham_populationinverse_alternative