arviz-devs / ArviZ.jl
1
@forwardfun bfmi
2
@forwardfun ess
3
@forwardfun geweke
4
@forwardfun mcse
5
@forwardfun rhat
6

7
function convert_arguments(::typeof(bfmi), data, args...; kwargs...)
8 20
    dataset = convert_to_dataset(data; group=:sample_stats)
9 20
    return tuple(dataset, args...), kwargs
10
end
11
function convert_arguments(::typeof(bfmi), data::AbstractArray, args...; kwargs...)
12 20
    return tuple(data, args...), kwargs
13
end
14

15
for f in (:ess, :mcse, :rhat)
16
    @eval begin
17
        function convert_arguments(::typeof($(f)), data, args...; kwargs...)
18 20
            dataset = convert_to_dataset(data; group=:posterior)
19 20
            return tuple(dataset, args...), kwargs
20
        end
21
        function convert_arguments(::typeof($(f)), data::AbstractArray, args...; kwargs...)
22 20
            return tuple(data, args...), kwargs
23
        end
24
    end
25
end

Read our documentation on viewing source code .

Loading