Bayesian Safety Validation
A Python implementation of bayesian safety validation.
Usage
from bayesian_safety_validation import BayesianSafetyValidation
# Define a black box function
def black_box_func(params) -> float:
return float(
(
(params["x1"] + 2 * params["x2"] - 7) ** 2
+ (2 * params["x1"] + params["x2"] - 5) ** 2
)
<= 200
)
# Create BSV with a parameter space
bsv = BayesianSafetyValidation(param_space={"x1": (-10, 5), "x2": (-10, 5)})
# Run BSV loop.
for i in range(10):
suggestions = bsv.suggest()
evaluations = [black_box_func(suggestion) for suggestion in suggestions]
print(f"suggestions: {suggestions}, evaluations: {evaluations}")
bsv.refit(suggestions, evaluations)
# Display results
bsv.falsification()
You will get this graph after running forementioned code
Metadata
Release files for bayesian-safety-validation 0.0.1
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 | |
|---|---|---|---|---|
| bayesian_safety_validation-0.0.1.tar.gz | 10.1 kB | Without provenance | Details |
Release files / bayesian_safety_validation-0.0.1.tar.gz
| Download URL | bayesian_safety_validation-0.0.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e6abb1bcb670afbeef09b76075a4e0a9baa00f8103c3e7d5c7fb96c5c1d7786
|
|
BLAKE2b-256 checksum How to use checksums |
74b9a9e7d847a23d33fa7f5e44a459dc20f8cc08afdcc495b412fe31920420cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for bayesian-safety-validation 0.0.1
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.