Open
Description
Currently we return the samples as Vector{Vector}
. This makes it not very nice to work with the samples and most user would probably run
stack(result.samples)
to get a matrix n_parameter x n_samples
matrix back. Should we return the result directly in this format?
Other ideas:
- DimensionalData.jl looks but may be an overkill great:
https://rafaqz.github.io/DimensionalData.jl/stable/basics
using DimensionalData
A = DimArray(stack(res_1.population),
(para = ["p_$i" for i in 1:2], sample = ["s_$i" for i in 1:5000]),
name = "population sample")
A[1:2, 4:6]
A[para=2, sample=:]
Array(A)
- AxisKeys.jl seems lighter
https://github.com/mcabbott/AxisKeys.jl
using AxisKeys
B = KeyedArray(stack(res_1.population),;
para = [Symbol("p_$i") for i in 1:2],
iter = 1:5000)
B[1, 3:10]
B[iter = 2:40]
B(:p_1)
B(:p_1, :)
B(:p_1, 10:20)
Metadata
Metadata
Assignees
Labels
No labels
Activity