diff --git a/BayesianKDEy/_bayeisan_kdey.py b/BayesianKDEy/_bayeisan_kdey.py index 3a202d7..8fb7d64 100644 --- a/BayesianKDEy/_bayeisan_kdey.py +++ b/BayesianKDEy/_bayeisan_kdey.py @@ -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)) diff --git a/BayesianKDEy/single_experiment_debug.py b/BayesianKDEy/single_experiment_debug.py index e9b71b5..ca929eb 100644 --- a/BayesianKDEy/single_experiment_debug.py +++ b/BayesianKDEy/single_experiment_debug.py @@ -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),