Skip to content

Bayesian-inspired Impact Forecast Algorithm (IFA) for quantifying material impact risk

License

Notifications You must be signed in to change notification settings

codethor0/impact-forecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Impact Forecast Algorithm (IFA)

CI Python 3.8+ License: MIT Version

Bayesian-inspired risk quantification for operational security teams. Part of the Impact-First Security Model (IFSM).

Author: Thor Thor (@codethor0)
Article: One Algorithm to Kill Security Theater: The Impact-First Model for 2026

Quick Start

from ifa import Evidence, impact_forecast

evidence = {
    "kev_exposed": Evidence(lr=1.8, note="Known exploited vulns on edge devices"),
    "phishing_resistant_mfa": Evidence(lr=0.65, note="FIDO2/WebAuthn for admins"),
}

results = impact_forecast(prior_p=0.25, evidence=evidence)
print(results["risk_level"])
print(f"{results['posterior_probability']:.1%}")

Installation

git clone https://github.com/codethor0/impact-forecast.git
cd impact-forecast
pip install -e .

For development with tests:

pip install -e ".[dev]"
pytest

Run examples (after install):

python examples/ifa_example_basic.py
python examples/ifa_example_2026_profile.py

CLI

ifa --prior 0.25 --factor "kev_exposed:1.8:Known exploited vulns on edge devices" --factor "phishing_resistant_mfa:0.65:FIDO2/WebAuthn for admins"

Algorithm (IFA) Summary

Given a prior probability p and likelihood ratios LR_i:

  • odds = p / (1 - p)
  • updated_odds = odds * (product of all LR_i)
  • posterior = updated_odds / (1 + updated_odds)

Risk levels:

  • LOW: p < 0.10
  • MODERATE: 0.10 <= p < 0.20
  • ELEVATED: 0.20 <= p < 0.35
  • HIGH: p >= 0.35

Documentation

Examples

Visualization

from ifa import Evidence, impact_forecast, visualize_forecast

results = impact_forecast(prior_p=0.25, evidence=evidence)
visualize_forecast(results, save_path="ifa_forecast.png")

License

MIT License. See LICENSE.

About

Bayesian-inspired Impact Forecast Algorithm (IFA) for quantifying material impact risk

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages