From dc6667442650fd2b1bac9e2e9fad58c29dfb518c Mon Sep 17 00:00:00 2001 From: Jadon Clugston <34165782+jClugstor@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:19:10 -0500 Subject: [PATCH] Add clarifying comments --- src/operations.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/operations.jl b/src/operations.jl index 5a9ecc8..7e72638 100644 --- a/src/operations.jl +++ b/src/operations.jl @@ -405,6 +405,7 @@ const route2operation_type = Dict( "ensemble-calibrate" => EnsembleCalibrate ) +# modified from EasyModelAnalysis.jl function sciml_service_l2loss(pvals, (prob, pkeys, data)::Tuple{Vararg{Any, 3}}) p = Pair.(pkeys, pvals) ts = first.(last.(data)) @@ -422,9 +423,10 @@ function sciml_service_l2loss(pvals, (prob, pkeys, data)::Tuple{Vararg{Any, 3}}) end # assumes data is given in the form column_label => data, need sol_mappings to be of form column_label => observable +# modified from EasyModelAnalysis.jl function ensemble_weights(sol::SciMLBase.EnsembleSolution, data_ensem, sol_mappings_list) col = first.(data_ensem) predictions = reduce(vcat, reduce(hcat,[sol[i][Symbol(sol_mappings_list[i][s])] for i in 1:length(sol)]) for s in col) data = reduce(vcat, [data_ensem[i][2] isa Tuple ? data_ensem[i][2][2] : data_ensem[i][2] for i in 1:length(data_ensem)]) weights = predictions \ data -end \ No newline at end of file +end