def dlogpdf_dlink(self, inv_link_f, y, Y_metadata=None):
<EOL>ff = np.clip(inv_link_f, <NUM_LIT>, <NUM_LIT:1>-<NUM_LIT>)<EOL>denom = np.where(y==<NUM_LIT:1>, ff, -(<NUM_LIT:1>-ff))<EOL>return <NUM_LIT:1.>/denom<EOL>
Gradient of the pdf at y, given inverse link of f w.r.t inverse link of f.

.. math::
    \\frac{d\\ln p(y_{i}|\\lambda(f_{i}))}{d\\lambda(f)} = \\frac{y_{i}}{\\lambda(f_{i})} - \\frac{(1 - y_{i})}{(1 - \\lambda(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 not used in bernoulli
:returns: gradient of log likelihood evaluated at points inverse link of f.
:rtype: Nx1 array