abcpmc icon indicating copy to clipboard operation
abcpmc copied to clipboard

Update distance function

Open NiallMac opened this issue 8 years ago • 1 comments

Is it possible to update the distance metric between iterations? My motivation for this is the case where one has multiple summary statistics entering the distance metric, but it is not obvious how to weight them. A reasonable choice would involve the covariance matrix of the summary statistics, but this is not known in advance. I'd like to use e.g. the sample covariance of the summary statistics in the previous iteration to weight them in the distance metric.

NiallMac avatar Sep 22 '17 16:09 NiallMac

I never thought about this but in principle I think this should be possible. Once an interation is computed:

for pool in abcpmc_sampler.sample(prior, eps):

you could set you new distance function:

sampler.dist = new_dist_with_covariance_matrix

jakeret avatar Sep 26 '17 11:09 jakeret