API
Main entry points
VPopMIP.VirtualPopulation — Type
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.
VPopMIP.load_vpop — Function
load_vpop(pop::DataFrame) -> VirtualPopulationLoad Virtual Population from a DataFrame.
VPopMIP.select_cohort — Function
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.).
VPopMIP.statistics_summary — Function
statistics_summary(vpop::VirtualPopulation, data::AbstractVector)Compute summary statistics for the virtual population based on the provided data.
VPopMIP.compute_statistics — Function
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.
VPopMIP.scenarios — Function
scenarios(vpop::VirtualPopulation) = vpop.scenariosScenarios associated with the virtual population.
VPopMIP.endpoints — Function
endpoints(vpop::VirtualPopulation) = vpop.endpointsEndpoints associated with the virtual population.
VPopMIP.objective_value — Function
objective_value(vpop::VirtualPopulation) = vpop.objective_valueObjective value of the optimization problem for the selected cohort, if available.