Encoding validation metrics API
Bayesian Generalization Index (BGI)
CePNEMAnalysis.get_CePNEM_fit_score — Functionget_CePNEM_fit_score(
model_params::Vector{Float64}, neuron_trace::Vector{Float64},
v::Vector{Float64}, θh::Vector{Float64}, P::Vector{Float64}
)Compute the CePNEM fit score, which is a measurement of how well the model fit the data. Sets the initial condition parameter y0 to the first timepoint, which enables comparisons of models across time better.
Arguments:
model_params::Vector{Float64}: The model parameters to use.neuron_trace::Vector{Float64}: The neuron trace to fit.v::Vector{Float64}: The worm's velocity.θh::Vector{Float64}: The worm's head curvature.P::Vector{Float64}: The worm's pumping rate.
CePNEMAnalysis.get_CePNEM_full_posterior_score — Functionget_CePNEM_full_posterior_score(full_posterior, neuron_trace, v, θh, P)Sample a random set of parameters from the CePNEM fitted posterior and compute the model score on the observed data.
Arguments:
full_posterior::Vector{Vector{Float64}}: The full posterior distribution of the model parameters.neuron_trace::Vector{Float64}: The neuron trace to fit.v::Vector{Float64}: The worm's velocity.θh::Vector{Float64}: The worm's head curvature.P::Vector{Float64}: The worm's pumping rate.
CePNEMAnalysis.compute_BGI — Functioncompute_BGI(test_score, prior_score)Compute the Bayesian Generalization Index (BGI) of the model, using fractional overperformance relative to the prior as the metric.
Arguments:
test_score::Vector{Float64}: The model scores on the test data.prior_score::Vector{Float64}: The model scores on the prior data.
CePNEMAnalysis.get_CePNEM_prior_score — Functionget_CePNEM_prior_score(neuron_trace::Vector{Float64}, v::Vector{Float64}, θh::Vector{Float64}, P::Vector{Float64})Sample a random set of parameters from the CePNEM prior and compute the model score on the observed data. Sets the initial condition parameter y0 to the first timepoint, which enables comparisons of models across time better.
Arguments:
neuron_trace::Vector{Float64}: The neuron trace to fit.v::Vector{Float64}: The worm's velocity.θh::Vector{Float64}: The worm's head curvature.P::Vector{Float64}: The worm's pumping rate.