Skip to main content

    Bayesian Optimization inputs and parameters

    Data format, model types, priors, and sampler settings for Bayesian statistical and PK/PD modeling.

    bayesianinputs

    You provide a data file (CSV or Parquet) plus the model type and the outcome/predictor columns to fit. Your model-type choice most shapes what you get back: a plain regression returns parameter posteriors, while pkpd returns compartmental PK parameters (clearance, volume of distribution) instead.

    Required inputs

    ParameterTypeDescription
    data_urlstringURL to a CSV or Parquet file.
    model_typestringregression, hierarchical, time_series, mixture, pkpd, dose_response, or custom.
    outcome_columnstringColumn name for the outcome/dependent variable.
    predictor_columnsarray of stringColumn names for predictor variables (at least one).

    Model-specific columns

    ParameterUsed byDescription
    group_columnhierarchicalColumn defining the grouping/level.
    time_columntime_series, pkpdColumn for the time variable.
    pk_modelpkpdone_compartment, two_compartment, or three_compartment.
    administrationpkpdiv_bolus, iv_infusion, or oral.
    concentration_columnpkpdColumn for measured drug concentration.
    dose_columnpkpdColumn for administered dose.
    subject_columnpkpdColumn for subject ID, for population (mixed-effects) PK.
    population_modelpkpdBoolean; fit a population model with per-subject random effects. Default false.
    random_effectspkpdParameters with random effects in a population model. Default ["CL", "V"].
    model_codecustomYour own PyMC model code, when model_type is custom.
    ParameterOptionsDefault
    likelihoodnormal, student_t, poisson, binomial, betanormal
    link_functionidentity, log, logitidentity

    Priors

    Optional. Supply as {param_name: {distribution: "Normal", params: {mu: 0, sigma: 1}}} to override the model's default priors for one or more parameters.

    Sampler settings

    ParameterRangeDefaultDescription
    inference_methodmcmc, variational, pathfindermcmcPosterior inference method.
    num_chains1–84Number of MCMC chains.
    num_samples500–10,0002,000Posterior samples drawn.
    num_tune200–5,0001,000Tuning/warmup samples before drawing.
    target_accept0.5–0.990.9Target acceptance rate (raise it if you see divergences).

    Output options

    ParameterDefaultDescription
    compute_lootrueCompute leave-one-out cross-validation for model comparison.
    compute_waictrueCompute WAIC for model comparison.
    generate_plotstrueGenerate trace, posterior, and posterior-predictive-check plots.

    Data requirements

    • The outcome and predictor columns must be present and numeric (categorical predictors need to be encoded upstream).
    • For pkpd, provide time_column, concentration_column, and dose_column; add subject_column for population PK.
    • For hierarchical, provide group_column so the model can pool information across groups.

    Was this page helpful?

    On this page

    On this page

    Loading...