bayesian-event-detector - Event detection with a memory: Bayesian, history
by•
Lambda³ is a history-aware Bayesian event detector for time series. Dual EYE Mode finds both global regime shifts and local anomalies at once. Fully interpretable—explains not just when, but why events happen, with credible intervals. MIT-licensed,open source.


Replies
Hi Product Hunt! 👋
New Release!What’s New?
1. Causality Chain Detection
Now automatically analyzes the causal probability that a positive jump (ΔΛC+) is followed by a negative jump (ΔΛC−).
Also supports time-lagged causality analysis, visualizing how causal links evolve over different time windows.
2. Event Forecasting Functionality
Added predict_next_event():
The model can now forecast whether the next structural transition will be a positive jump, negative jump, or stable (no significant change).
Forecast logic is based on the recent sequence of ΔΛC events, with easy hooks for further extension.
3. Interactive Visualization
Bar plots now show time-dependent causality (lag vs. probability).
Jump events and predictions are clearly displayed for easier interpretation.
4. Modular, Extensible Design
Event memory and prediction logic are structured for rapid customization—ready for ML, Markov, or Bayesian upgrades.
Performance
Colab A100 (CPU backend): 300 time steps × 4 params, 6000 samples, ~14 seconds
No divergences, rapid convergence
Supports large time-series (T > 1000) with additional tuning
Want blazing speed? Use NumPyro backend on GPU
Note: The demo runs great on both laptops and cloud GPUs. Colab A100 will give you extra headroom for bigger or more complex models.
Dual Bayesian Regression
Mutual cross-series interaction:
Now you can simultaneously fit two time-series with full bidirectional (A↔B) Bayesian regression. Each series can be predicted while incorporating the influence of jumps in the other (via interaction terms).
• Full model posterior (with HDI) for both A & B
→ Visualize effect sizes, uncertainties, and cross-causal coefficients.
🆕 Event Synchronization Analysis
Event-level synchronization rate (σₛ):
Automatically compute synchronization profiles across all lags for binary jump events between series.
Dynamic sync detection:
See how synchronization emerges and fades over time in a sliding window.
Sync network & clustering:
Instantly build a directed network of N-series based on synchronization, and cluster series with similar event patterns.
🆕 Causality Profile Visualization
###Unified visualization:
Plot both single-series (A or B) and cross-causality (A→B, B→A) lag profiles in one graph for intuitive comparison.
Try it Yourself! (Go wild and experiment!)
• Change the random seed and tweak the jump patterns/positions as much as you want—just update L3Config or the data generation arguments.
• For example: set seed_offset=1234 or use pattern_a = "periodic_plus_jump", etc.
• Even though the demo is “Dual” (2-series), you can add as many time series as you like by extending event_series_dict and the series_names=['A','B','C',...] lists.
• Sync networks and clustering are already compatible with any number of series!
“Just add more series to the code and everything (sync, causality, clustering) will scale—no limit!
The system is fully vectorized for multi-series analysis.”
⸻
🧑🔬 How to Explore
• Use the same random seed for different patterns to isolate pure structural synchrony,
• Or use different seeds for each series to explore independence and noise effects.
• Try consecutive jumps, periodic, chaotic, or mixed patterns—Bayesian modeling, synchrony, and causality will all work out of the box.
⸻
Let your curiosity guide you—break things, add new series, and see what patterns emerge!
⸻