@robsmith11
i deeply care about improving performance as much as possible, so i experimented a bit with your problem
function sim((u1, p1), params; n=10^6, raw=false)
u2 = (1.0 - u1*p1)/(1.0 - p1)
x = randexp(n) .* ifelse.(rand(n) .< p1, u1, u2)
raw && return x
[std(x), median(x)]
end
function dist(s, s0)
sqrt(sum(((s .- s0)./s).^2))
end
plan=ABCplan(Factored(Uniform(0,1), Uniform(0.5,1)), sim, [2.2, 0.4], dist)
res,del,conv=ABCDE(plan, 0.01, nparticles=100,generations=30,parallel=true)
using Statistics
function getCI(x::Vector{<:Number})
quantile(x,[0.25,0.5,0.75])
end
function getCI(x::Vector{<:Tuple})
[getCI(getindex.(x,i)) for i in 1:length(x[1])]
end
results
via getCI(res)
240 generations:
[0.48958933397111065, 0.4924062224370781, 0.49559446402487584]
[0.879783065265908, 0.8816472031816496, 0.8835803050367947]
120 generations:
[0.4893221894893949, 0.49278449533673585, 0.494863093578758]
[0.8795982153875357, 0.8816146345915951, 0.8829915018185673]
60 generations:
[0.4887524655164148, 0.49234470862896673, 0.49502567359353133]
[0.8796953221457162, 0.8814094610516047, 0.8833899764047788]
30 generations:
[0.48893164848681747, 0.49163740259340305, 0.4944261757524125]
[0.8795333045815598, 0.8809134893725196, 0.8829819098348083]
early stop:
[0.49006664933267297, 0.49313860531909304, 0.49497013116625105]
[0.8804136291097875, 0.8819843728641816, 0.8834306754737902]
i see very good convergence on this problem, even 30 generations lead reasonable CIās, so on ABCDE
i do not see a clear cut performance regression, surely without enforced early stopping there is a bit of tuning involved, what i did see instead is that KABCDE
is not performing very well on this problem, i will think of something to improve itās performance.
is there anything iāve missed?