Inference from binary data & proper way to use GaussianRandomWalk

I’m a bit confused about what you are trying to achieve with the GaussianRandomWalk here. Maybe you mean something like this?

with pm.Model() as model:
    intercept = pm.Normal('intercept', mu=0, sd=5)
    amplitude = pm.HalfStudentT('amplitude', sd=2.5, nu=3)
    phase = pm.Uniform('phase', lower=0, upper=2*np.pi)
    period = pm.HalfNormal('period', sd=10)
    
    pred = (intercept
            + amplitude * pm.math.sin(period * i + phase))
    pm.Bernoulli('y', p=tt.logit(pred), observed=data)