adding experiment with ILR
This commit is contained in:
parent
e8d175106f
commit
a6974b7624
|
|
@ -166,7 +166,7 @@ class BayesianKDEy(AggregativeSoftQuantifier, KDEBase, WithConfidenceABC):
|
||||||
recent_accept_rate = np.mean(acceptance_history[-100:])
|
recent_accept_rate = np.mean(acceptance_history[-100:])
|
||||||
step_size *= np.exp(adapt_rate * (recent_accept_rate - target_acceptance))
|
step_size *= np.exp(adapt_rate * (recent_accept_rate - target_acceptance))
|
||||||
# step_size = float(np.clip(step_size, min_step, max_step))
|
# step_size = float(np.clip(step_size, min_step, max_step))
|
||||||
print(f'acceptance-rate={recent_accept_rate*100:.3f}%, step-size={step_size:.5f}')
|
# print(f'acceptance-rate={recent_accept_rate*100:.3f}%, step-size={step_size:.5f}')
|
||||||
|
|
||||||
# remove "warmup" initial iterations
|
# remove "warmup" initial iterations
|
||||||
samples = np.asarray(samples[self.num_warmup:])
|
samples = np.asarray(samples[self.num_warmup:])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue