Skip to content

Unexpected behavior getting ϕ final mean distribution  #435

@Julians42

Description

@Julians42

ArgumentError when return_array = true set for any of the functions similar to EKP.get_ϕ. For this argument configuration, the goal is to get a dictionary with the parameter names and their corresponding parameter entries (which may be an array). This is more useful when parameters have multiple entries per named entry.

One possible solution (for one of the functions) is as follows:

function EKP.get_ϕ_mean_final(prior, eki, return_array = false)
    final_means = EKP.get_ϕ_mean_final(prior, eki_final) # returns a vector of final iteration parameter means
    batch_idx = EKP.batch(prior) # groups the parameters by name (useful for priors whith multiple parameters per named entry)
    param_names = prior.name # get names
    # create new dictionary
    Dict(zip(param_names, [final_means[idx] for idx in batch_idx]))
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions