

import matplotlib.pyplot as plt
import numpy as np
import math

lamb_ts = np.linspace(0.,50.,num=20)
L = 20

funs = []
for lamb_t in lamb_ts:
    curr_fun = 0.
    for l in range(L):
        curr_fun += lamb_t**l/math.factorial(l)
    curr_fun /= np.exp(lamb_t)
    curr_fun = 1 - curr_fun
    funs.append(curr_fun)

a, b = .4, L
logits = 1./(1+np.exp(-a*(lamb_ts-b)))

plt.plot(lamb_ts, funs, 'b')
plt.plot(lamb_ts, logits, 'r')
plt.show()
f0270e6cb9d30f4b6e369024766220b1f84a3c29
<mask token>

<mask token>
for lamb_t in lamb_ts:
    curr_fun = 0.0
    for l in range(L):
        curr_fun += lamb_t ** l / math.factorial(l)
    curr_fun /= np.exp(lamb_t)
    curr_fun = 1 - curr_fun
    funs.append(curr_fun)
<mask token>
plt.plot(lamb_ts, funs, 'b')
plt.plot(lamb_ts, logits, 'r')
plt.show()

<mask token>
lamb_ts = np.linspace(0.0, 50.0, num=20)
L = 20
funs = []
for lamb_t in lamb_ts:
    curr_fun = 0.0
    for l in range(L):
        curr_fun += lamb_t ** l / math.factorial(l)
    curr_fun /= np.exp(lamb_t)
    curr_fun = 1 - curr_fun
    funs.append(curr_fun)
a, b = 0.4, L
logits = 1.0 / (1 + np.exp(-a * (lamb_ts - b)))
plt.plot(lamb_ts, funs, 'b')
plt.plot(lamb_ts, logits, 'r')
plt.show()

import matplotlib.pyplot as plt
import numpy as np
import math
lamb_ts = np.linspace(0.0, 50.0, num=20)
L = 20
funs = []
for lamb_t in lamb_ts:
    curr_fun = 0.0
    for l in range(L):
        curr_fun += lamb_t ** l / math.factorial(l)
    curr_fun /= np.exp(lamb_t)
    curr_fun = 1 - curr_fun
    funs.append(curr_fun)
a, b = 0.4, L
logits = 1.0 / (1 + np.exp(-a * (lamb_ts - b)))
plt.plot(lamb_ts, funs, 'b')
plt.plot(lamb_ts, logits, 'r')
plt.show()



import matplotlib.pyplot as plt
import numpy as np
import math

lamb_ts = np.linspace(0.,50.,num=20)
L = 20

funs = []
for lamb_t in lamb_ts:
    curr_fun = 0.
    for l in range(L):
        curr_fun += lamb_t**l/math.factorial(l)
    curr_fun /= np.exp(lamb_t)
    curr_fun = 1 - curr_fun
    funs.append(curr_fun)

a, b = .4, L
logits = 1./(1+np.exp(-a*(lamb_ts-b)))

plt.plot(lamb_ts, funs, 'b')
plt.plot(lamb_ts, logits, 'r')
plt.show()