Reproducible synthetic behavioral sequences for research and engineering.
BehaviorSim is an open-source Python engine and cloud API designed to model complex human and system trajectories. Generate deterministic or stochastic traces governed by Markov dynamics, Dirichlet priors, and state-conditioned feature emissions.
Conceptual Simulation Pipeline
BehaviorSim structures behavioral generation into a clean, decoupled generative pipeline. Every observed event is conditioned on underlying transition dynamics.
s_0 \sim \pi_0Initial State
Agents sample an initial state from a baseline prior distribution or profile vector.
P(s_{t+1} \mid s_t, \theta)Transition Dynamics
Stochastic transition matrix evaluates temporal inertia, absorption, and Markov steps.
s_t \in \mathcal{S}Latent State
Discrete behavioral status (e.g. browsing, trading, researching, churned).
x_t \sim \mathcal{F}(s_t)Observable Features
Continuous and discrete emissions sampled conditionally on the current active state.
y_t = g(s_t, x_t)Labels & Outcomes
Deterministic or stochastic threshold checks flag alerts, anomalies, or conversions.
\mathcal{D} = \{(x_t, y_t)_{t=1}^T\}Synthetic Dataset
Structured pandas DataFrame exported with full lineage, timestamps, and sequence IDs.
Immediate Productivity with Python
Generate rich tabular datasets in three lines of code using domain-specific presets or custom stochastic state definitions.
123456789101112131415# 1. Initialize simulator from a registered domain preset from behaviorsim import Simulator # Presets: 'finance', 'healthcare', 'education', 'mobile_app' sim = Simulator.from_preset("finance") # 2. Generate reproducible multi-agent sequential behavioral traces df = sim.generate( num_interactions=100, num_sequences=10, seed=42 ) # 3. Inspect generated dataset (profiles, latent states, observable metrics) print(df[["sequence_id", "interaction_id", "state", "portfolio_value", "risk_alert"]].head())
Domain presets configure realistic states, transition probability matrices, and continuous feature distributions calibrated for specific behavioral domains.
| seq_id | step | state | metric_val | alert |
|---|---|---|---|---|
| 1 | 0 | evaluating | 104.28 | 0 |
| 1 | 1 | transacting | 108.91 | 0 |
| 1 | 2 | hedging | 92.45 | 1 |
| 2 | 0 | evaluating | 101.12 | 0 |
Pass a fixed integer seed to guarantee identical sequence generation across operating systems and hardware configurations.
Engine Architecture & Capabilities
Constructed for high-fidelity experimentation where standard uniform or Gaussian random generators fail to capture sequential dependencies.
Markov State Transitions
First-order and higher-order discrete state graphs with customizable transition probabilities, inertia weights, and absorbing states.
Parametric Feature Emissions
Emit continuous or categorical features sampled from state-conditioned Normal, Beta, Poisson, or custom parametric distributions.
Calibrated Domain Presets
Built-in domain factories for finance, healthcare, educational engagement, and mobile application retention modeling.
Cloud Simulation API
High-throughput REST API with quota tracking, session management, and parameter evaluation hosted at api.behavioursim.vedaangsharma.in.
Open Source & Peer-Review Ready
BehaviorSim is licensed under the permissive MIT License. Full test suites, transition matrix verification, and simulation recipes are open for community inspection.