API

Main entry points

VPopMIP.VirtualPopulationType
VirtualPopulation{D,SC,S}

A struct representing a Virtual Population.

Fields

  • df::D: A DataFrame containing the virtual population data.
  • endpoints::E: A collection of clinical endpoints associated with the virtual population.
  • scenarios::SC: A collection of scenarios associated with the virtual population.
  • npop::Int64: The number of individuals in the virtual population.
  • preselected::S: Pre-selected individuals in the virtual population.
  • objective_value::Union{Nothing,Float64}: The objective value of the optimization problem for the selected cohort, if available.

Use load_vpop(pop::DataFrame) to create an instance of VirtualPopulation from DataFrame.

source
VPopMIP.load_vpopFunction
load_vpop(pop::DataFrame) -> VirtualPopulation

Load Virtual Population from a DataFrame.

source
VPopMIP.select_cohortFunction
select_cohort(pop::VirtualPopulation, data::Vector{M}, vpnum::Int; kwargs...) where {M<:DigiPopData.MetricBinding}

Select a cohort of virtual patients from a VirtualPopulation that best matches the provided data. The selection is performed by solving a Mixed-Integer Programming (MIP) optimization problem.

Arguments

  • pop::VirtualPopulation: The DataFrame with plausiblel population from which to select the cohort.
  • data::Vector{M}: A vector of metric bindings that define the data to match. See DigiPopData.jl for details on how to create metric bindings.
  • vpnum::Int: The desired size of the virtual population cohort to be selected.
  • kwargs...: Additional keyword arguments for the optimization solver (e.g., optimizer choice, time limits, etc.).
source
VPopMIP.statistics_summaryFunction
statistics_summary(vpop::VirtualPopulation, data::AbstractVector)

Compute summary statistics for the virtual population based on the provided data.

source
VPopMIP.compute_statisticsFunction
compute_statistics(vpop::VirtualPopulation, data::DigiPopData.MetricBinding)

Compute statistics for a given Virtual Population based on the provided metric binding. Returns a dictionary containing the computed statistics.

source
VPopMIP.scenariosFunction
scenarios(vpop::VirtualPopulation) = vpop.scenarios

Scenarios associated with the virtual population.

source
VPopMIP.endpointsFunction
endpoints(vpop::VirtualPopulation) = vpop.endpoints

Endpoints associated with the virtual population.

source
VPopMIP.objective_valueFunction
objective_value(vpop::VirtualPopulation) = vpop.objective_value

Objective value of the optimization problem for the selected cohort, if available.

source