Bayesian Optimization quickstart
Point at a CSV, pick regression, hierarchical, dose_response or pkpd, set the outcome and predictors, then read r_hat and divergences before the posterior.
You have a dataset and want parameter estimates with honest uncertainty rather than a single point value. This walks through fitting a model in a few steps: point at your data, pick a model type, set the columns, submit, and read the posterior.
Quick model fit with .bloom* platform
The tool fits your chosen model with PyMC, sampling the posterior by MCMC (default), variational inference, or pathfinder, and returns a parameter summary with credible intervals plus convergence diagnostics.
Step-by-step workflow
Point at your data
Provide data_url — a CSV or Parquet file reachable by the job. Include the outcome column and every predictor column you want in the model.
Choose a model type
- regression — for a standard Bayesian linear/generalized-linear fit. Pick
link_function: "log"or"logit"for a GLM. - hierarchical — add
group_columnto pool information across groups (e.g. batch, site, or animal). - dose_response — for a dose-response curve.
- pkpd — set
pk_model(one_compartment/two_compartment/three_compartment),administration(iv_bolus/iv_infusion/oral), andtime_column/concentration_column/dose_column. Addsubject_columnandpopulation_model: truefor a population (mixed-effects) PK fit. - time_series or mixture — set
time_column, or leave defaults for a mixture over the outcome. - custom — supply your own
model_code(PyMC).
Set the outcome and predictors
outcome_column: the dependent variable.predictor_columns: one or more predictor columns.- Leave
likelihoodatnormalunless your outcome is a count (poisson), binary (binomial), or a proportion (beta).
Leave the sampler at defaults, or tune it
Defaults (num_chains: 4, num_samples: 2000, num_tune: 1000, target_accept: 0.9) work for most models. Raise target_accept toward 0.99 if the diagnostics later report divergences.
Submit and wait
Jobs run without a GPU and typically complete in 2–30 minutes depending on model complexity and chain length.
Read the results
- Open
posterior_summary_csvand checkr_hatis close to 1.0 anddivergencesis 0 before trusting any parameter's mean/HDI. - For a PK/PD fit, read the compartmental parameters (e.g.
CL,V) the same way. - Use
loo/waicfromdiagnostics_jsonto compare against a second model fit on the same data, if you ran more than one.
Common scenarios
Dose-response fit
- Set
model_type: "dose_response",outcome_columnto the measured response,predictor_columnsto the dose. - Submit and read the fitted curve parameters and their credible intervals.
Population PK model
- Set
model_type: "pkpd",pk_model: "two_compartment",administration: "oral". - Set
time_column,concentration_column,dose_column, andsubject_column. - Set
population_model: trueand, if you want random effects on parameters other than clearance and volume, overriderandom_effects.
Hierarchical regression
- Set
model_type: "hierarchical",group_columnto the grouping variable. - Read the group-level and population-level parameter rows separately in the summary.
Read next
Was this page helpful?
Bayesian Optimization outputs and interpretation
Parameter posteriors, HDI intervals, diagnostics, and model comparison metrics from a Bayesian fit.
Bayesian Optimization troubleshooting
Clear divergences by raising target_accept, read an r_hat_max above 1.01 or a low ess_min, and fix a PK fit whose pk_model or administration is wrong.