added temperature, and coverage increases!
This commit is contained in:
parent
7c7af2cfaf
commit
84c11d956b
|
|
@ -166,7 +166,8 @@ class BayesianKDEy(AggregativeSoftQuantifier, KDEBase, WithConfidenceABC):
|
|||
samples.append(current_prev)
|
||||
acceptance_history.append(1. if accepted else 0.)
|
||||
|
||||
if i < self.num_warmup and i%10==0 and len(acceptance_history)>=100:
|
||||
# if i < self.num_warmup and i%10==0 and len(acceptance_history)>=100:
|
||||
if i % 10 == 0 and len(acceptance_history) >= 100:
|
||||
recent_accept_rate = np.mean(acceptance_history[-100:])
|
||||
step_size *= np.exp(adapt_rate * (recent_accept_rate - target_acceptance))
|
||||
# step_size = float(np.clip(step_size, min_step, max_step))
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ def methods():
|
|||
|
||||
# yield 'BootstrapKDEy', KDEyML(LR()), kdey_hyper, lambda hyper: AggregativeBootstrap(KDEyML(LR(), **hyper), n_test_samples=1000, random_state=0, verbose=True),
|
||||
# yield 'BayesianKDEy', KDEyML(LR()), kdey_hyper, lambda hyper: BayesianKDEy(mcmc_seed=0, **hyper),
|
||||
for T in [1., 10., 100., 1000.]:
|
||||
yield f'BaKDE-CLR-T{T}', KDEyCLR(LR()), kdey_hyper_clr, lambda hyper: BayesianKDEy(kernel='aitchison', mcmc_seed=0, temperature=T, step_size=.15, **hyper),
|
||||
for T in [100., 500, 1000.]:
|
||||
yield f'BaKDE-CLR-T{T}', KDEyCLR(LR()), kdey_hyper_clr, lambda hyper: BayesianKDEy(kernel='aitchison', explore='ilr', mcmc_seed=0, temperature=T, step_size=.1, **hyper),
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue