Skip to content

Commit 0fa051d

Browse files
ricardoV94twiecki
authored andcommitted
Remove unused test util
1 parent eb88380 commit 0fa051d

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

tests/logprob/utils.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -47,47 +47,6 @@
4747
from pymc.logprob.utils import ignore_logprob
4848

4949

50-
def simulate_poiszero_hmm(
51-
N, mu=10.0, pi_0_a=np.r_[1, 1], p_0_a=np.r_[5, 1], p_1_a=np.r_[1, 1], seed=None
52-
):
53-
rng = np.random.default_rng(seed)
54-
55-
p_0 = rng.dirichlet(p_0_a)
56-
p_1 = rng.dirichlet(p_1_a)
57-
58-
Gammas = np.stack([p_0, p_1])
59-
Gammas = np.broadcast_to(Gammas, (N,) + Gammas.shape)
60-
61-
pi_0 = rng.dirichlet(pi_0_a)
62-
s_0 = rng.choice(pi_0.shape[0], p=pi_0)
63-
s_tm1 = s_0
64-
65-
y_samples = np.empty((N,), dtype=np.int64)
66-
s_samples = np.empty((N,), dtype=np.int64)
67-
68-
for i in range(N):
69-
s_t = rng.choice(Gammas.shape[-1], p=Gammas[i, s_tm1])
70-
s_samples[i] = s_t
71-
s_tm1 = s_t
72-
73-
if s_t == 1:
74-
y_samples[i] = rng.poisson(mu)
75-
else:
76-
y_samples[i] = 0
77-
78-
sample_point = {
79-
"Y_t": y_samples,
80-
"p_0": p_0,
81-
"p_1": p_1,
82-
"S_t": s_samples,
83-
"P_tt": Gammas,
84-
"S_0": s_0,
85-
"pi_0": pi_0,
86-
}
87-
88-
return sample_point
89-
90-
9150
def scipy_logprob(obs, p):
9251
if p.ndim > 1:
9352
if p.ndim > obs.ndim:

0 commit comments

Comments
 (0)