
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
bindata
Advanced tools

A python replication of the homonymous R library
bindata,
based on the paper
"Generation of correlated artificial binary data.",
by Friedrich Leisch, Andreas Weingessel, and Kurt Hornik.
The library fully replicates the existing R-package with the following functions:
bincorr2commonprobcheck_commonprob (check.commonprob in R)commonprob2sigmacondprobra2barmvbinsimul_commonprob (simul.commonprob in R)Precomputed (via Monte Carlo simulations) SimulVals are also available.
bindata can be installed with pip as:
pip install bindata
import bindata as bnd
margprob = [0.3, 0.9]
X = bnd.rmvbin(N=100_000, margprob=margprob)
Now let's verify the sample marginals and correlations:
import numpy as np
print(X.mean(0))
print(np.corrcoef(X, rowvar=False))
[0.30102 0.9009 ]
[[ 1. -0.00101357]
[-0.00101357 1. ]]
corr = np.array([[1., -0.25, -0.0625],
[-0.25, 1., 0.25],
[-0.0625, 0.25, 1.]])
commonprob = bnd.bincorr2commonprob(margprob=[0.2, 0.5, 0.8],
bincorr=corr)
X = bnd.rmvbin(margprob=np.diag(commonprob),
commonprob=commonprob, N=100_000)
print(X.mean(0))
print(np.corrcoef(X, rowvar=False))
[0.1996 0.50148 0.80076]
[[ 1. -0.25552 -0.05713501]
[-0.25552 1. 0.24412401]
[-0.05713501 0.24412401 1. ]]
commonprob = [[1/2, 1/5, 1/6],
[1/5, 1/2, 1/6],
[1/6, 1/6, 1/2]]
X = bnd.rmvbin(N=100_000, commonprob=commonprob)
print(X.mean(0))
print(np.corrcoef(X, rowvar=False))
[0.50076 0.50289 0.49718]
[[ 1. -0.20195239 -0.33343712]
[-0.20195239 1. -0.34203855]
[-0.33343712 -0.34203855 1. ]]
For a more comprehensive documentation please consult the documentation.
"Generation of correlated artificial binary data.", by Friedrich Leisch, Andreas Weingessel, and Kurt Hornik.
Luca Mingarelli, 2022
FAQs
A library for sampling correlated binary variates.
We found that bindata demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.