Visualization

LikelihoodProfiler.get_interval function returns estimated confidence interval along with other data as LikelihoodProfiler.ParamInterval structure.

LikelihoodProfiler provides a @recipe for Plots.jl to visualize confidence interval estimation and plot parameter's profile based on LikelihoodProfiler.ParamInterval.

using LikelihoodProfiler

# Likelihood function
f(x) = 5.0 + (x[1]-3.0)^2 + (x[1]-x[2]-1.0)^2 + 0*x[3]^2

# Calculate parameters intervals for x[1], x[2], x[3]
res = [
    get_interval(
        [3., 2., 2.1],
        i,
        f,
        :CICO_ONE_PASS;
        loss_crit = 9.
    ) for i in 1:3]

# Plot parameter profile x[2]
using Plots
plotly()
plot(res[2])

To make a smooth plot one can compute more profile points with LikelihoodProfiler.update_profile_points! which internally uses PlotUtils.adapted_grid

update_profile_points!(res[2])

plot(res[2])