Skip to main content

Reusable decision-science utilities for security: Monte Carlo, Bayes, Survival, VoI, causal helpers, and viz.

Project description

Decision-security

Reusable decision-science utilities for security — Monte Carlo risk bands, Bayesian updates & calibration, survival helpers, Value of Information, light causal helpers, and visualization.

pip install decision-security  # (will install once you publish)

Quickstart

import numpy as np
from decision_security.montecarlo import risk_bands, var_es, make_lognormal_severity, simulate_aggregate_losses

sev = make_lognormal_severity(meanlog=8.0, sdlog=1.2)
losses = simulate_aggregate_losses(n_periods=10000, lam=0.6, severity_sampler=sev)
print(risk_bands(losses))      # {'p50': ..., 'p90': ..., 'p95': ...}
print(var_es(losses))          # (VaR95, ES95)

Modules

•	synth: synthetic data (heavy-tail losses, counts, mixtures, survival with censoring, categorical/Dirichlet).
•	montecarlo: Poisson frequency + severity, risk bands, VaR/ES.
•	bayes: Beta-Binomial & Normal(known σ) updates, calibration helpers.
•	survival: simple Kaplan–Meier & Nelson–Aalen estimates.
•	voi: Expected Value of Perfect Information (EVPI) and simple ROI selection.
•	causal: tiny DAG utilities (parents, descendants, naive backdoor set).
•	viz: small matplotlib helpers (loss distribution, risk bands, KM curves).

Status: 0.x (APIs may change). MIT License.

See docs & examples: Security Decision Science Book and the Security Decision Labs playground.

LICENSE (MIT)

MIT License

Copyright (c) 2025 Your Name

Permission is hereby granted, free of charge, to any person obtaining a copy
...
(standard MIT text unchanged)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decision_security-0.1.0a1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decision_security-0.1.0a1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file decision_security-0.1.0a1.tar.gz.

File metadata

  • Download URL: decision_security-0.1.0a1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for decision_security-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 76495daddaba1e1cb0d8b0facaa953d58c2b3cda5d89643a10e5d044eeffd5d3
MD5 fa2457b6c3b492b3f2fc99875ef3b7e5
BLAKE2b-256 fac95c0053fdc49d91be110ad72bbcc1d6997e4ccd6ad071f0fc873f972a8c18

See more details on using hashes here.

File details

Details for the file decision_security-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for decision_security-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0ee57fac4de6293841857c9875dd183c923da2354aa6e67c78f1bf4c189b0d1
MD5 ef6c733d8e403115f7ba09d0b247977a
BLAKE2b-256 102a586f4c81f79bb621839d899f05a1a49f0aa0c8290ab38c0f0859ab1152c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page