tags:
- algorithm
- transport
- parameterization
Sigmoid clustering
Simple idea:
function SigmoidCluster1d(samples::Vector, k_max::Int)
sort!(samples)
ret = Vector{Vector{Float64}}(undef, k_max)
for k in 1:k_max
quant_idxs = get_k_quantile_idxs(samples, k)
# Group the samples by index
groups = [samples[idx_range] for idx_range in quant_idxs]
# Get centers
ret[k] = [mean(group) for group in groups]
end
return ret
end