abcpp 
abcpp is a lightweight embeddable C++ library for Approximate Bayesian
Computation, with R and Python wrappers. The C++ library is the only algorithm
implementation; R and Python are thin frontends.
C++ Usage
abcpp can be embedded in another CMake project in the same style as small algorithm libraries such as NLopt, using FetchContent_Declare to call abcpp as the algorithm backend:
include(FetchContent)
FetchContent_Declare(
abcpp
GIT_REPOSITORY https://github.com/yuki-961004/abcpp.git
GIT_TAG main
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(abcpp)
target_link_libraries(my_target PRIVATE abcpp::abcpp)
The primary C++ API is NLopt-like:
#include <abcpp/abcpp.hpp>
abcpp::opt opt;
abcpp::result fit = opt
.set_target(target)
.set_params(params)
.set_sumstats(sumstats)
.set_method(abcpp::method::neuralnet)
.set_tol(0.01)
.set_nnet_sizenet(8)
.run();
R Usage
Install from CRAN:
install.packages("abcpp")
The R interface uses four inputs: target, params, sumstats, and
control.
library(abcpp)
result <- abcpp::abc(
target = <target_summary_vector_or_matrix>,
params = <parameter_vector_or_matrix>,
sumstats = <simulated_summary_vector_or_matrix>,
control = list(
method = "rejection",
tol = <tolerance_between_0_and_1>
)
)
summary(result)
Python Usage
Install from PyPI:
pip install abcpp
The Python interface mirrors the R interface:
import abcpp
result = abcpp.abc(
target=<target_summary_vector_or_matrix>,
params=<parameter_vector_or_matrix>,
sumstats=<simulated_summary_vector_or_matrix>,
control={
"method": "rejection",
"tol": <tolerance_between_0_and_1>,
},
)
abcpp.summary(result)
Metadata
Release files for abcpp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| abcpp-1.0.0.tar.gz | 48.6 kB | Without provenance | Details for abcpp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| abcpp-1.0.0-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details for abcpp-1.0.0-cp313-cp313-win_amd64.whl |
Total release size: 226.8 kB
Release files / abcpp-1.0.0.tar.gz
| Download URL | abcpp-1.0.0.tar.gz |
|---|---|
| Size | 48.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cac912a7aaaf5c70c24efdd5b0f160b7bc08c0283559fde5a6a679f4e10cf39
|
|
BLAKE2b-256 checksum How to use checksums |
e33a260d88b2d218fc0b02e18c02be3f455144084ef4c591367a89e11da7c8ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / abcpp-1.0.0-cp313-cp313-win_amd64.whl
| Download URL | abcpp-1.0.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 178.2 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
36fd41093fd568e26c5db606cf25e4cde92937be76809a099e4b576bef3ac98e
|
|
BLAKE2b-256 checksum How to use checksums |
58fc6a761406326cd8ca1ee35e1e0d17ee3d1188fc1460515a6766ec51ed986c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for abcpp 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.