Skip to content
Snippets Groups Projects
Commit 4063a2d7 authored by vjp17's avatar vjp17
Browse files

Changed >= from > to be consistent with the paper

parent eafcddb1
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ from utility import *
def qpac_learn(epsilon, delta, oracle, tnn, simulator, cut=100, step = 1):
if step < 1:
raise ValueError("step must be greater or equal to 1")
n = oracle.dim
N = 2*(np.ceil(1/(np.pi*delta**2))//2)+2
......@@ -32,7 +32,7 @@ def qpac_learn(epsilon, delta, oracle, tnn, simulator, cut=100, step = 1):
n_update = 0
m = 0
while m < m_max or s >= N/2:
while m < m_max or s > N/2:
i += 1
m = schedule[i]
s = 0
......@@ -74,7 +74,7 @@ def qpac_learn(epsilon, delta, oracle, tnn, simulator, cut=100, step = 1):
s += counts[sample]
errors.append(sample[3:][::-1])
if s >= N/2:
if s > N/2:
to_update = get_updates(errors)
tnn.update_tnn(to_update)
n_update += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment