JarrettYe commited on
Commit
4878178
1 Parent(s): 6f5abb0

set lower limit for s

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def simulate(w, request_retention=0.9, deck_size=10000, learn_span=100, max_cost
25
  if response == 1:
26
  return s * (1 + np.exp(w[8]) * (11 - d) * np.power(s, -w[9]) * (np.exp((1 - r) * w[10]) - 1))
27
  else:
28
- return np.minimum(w[11] * np.power(d, -w[12]) * (np.power(s + 1, w[13]) - 1) * np.exp((1 - r) * w[14]), s)
29
 
30
  for today in tqdm(range(learn_span)):
31
  has_learned = card_table[col["stability"]] > 1e-10
 
25
  if response == 1:
26
  return s * (1 + np.exp(w[8]) * (11 - d) * np.power(s, -w[9]) * (np.exp((1 - r) * w[10]) - 1))
27
  else:
28
+ return np.maximum(0.1, np.minimum(w[11] * np.power(d, -w[12]) * (np.power(s + 1, w[13]) - 1) * np.exp((1 - r) * w[14]), s))
29
 
30
  for today in tqdm(range(learn_span)):
31
  has_learned = card_table[col["stability"]] > 1e-10