CliMA / CliMA/EnsembleKalmanProcesses.jl
Unexpected behavior getting ϕ final mean distribution
- Dominant language
- Julia
- Stars
- 125
- Forks
- 24
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
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:
```julia
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
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.