def logpdf_link(self, inv_link_f, y, Y_metadata=None):
N = Y_metadata['<STR_LIT>']<EOL>np.testing.assert_array_equal(N.shape, y.shape)<EOL>nchoosey = special.gammaln(N+<NUM_LIT:1>) - special.gammaln(y+<NUM_LIT:1>) - special.gammaln(N-y+<NUM_LIT:1>)<EOL>Ny = N-y<EOL>t1 = np.zeros(y.shape)<EOL>t2 = np.zeros(y.shape)<EOL>t1[y><NUM_LIT:0>] = y[y><NUM_LIT:0>]*np.log(inv_link_f[y><NUM_LIT:0>])<EOL>t2[Ny><NUM_LIT:0>] = Ny[Ny><NUM_LIT:0>]*np.log(<NUM_LIT:1.>-inv_link_f[Ny><NUM_LIT:0>])<EOL>return nchoosey + t1 + t2<EOL>
Log Likelihood function given inverse link of f.

.. math::
    \\ln p(y_{i}|\\lambda(f_{i})) = y_{i}\\log\\lambda(f_{i}) + (1-y_{i})\\log (1-f_{i})

:param inv_link_f: latent variables inverse link of f.
:type inv_link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: Y_metadata must contain 'trials'
:returns: log likelihood evaluated at points inverse link of f.
:rtype: float