def dlogpdf_dlink(self, link_f, y, Y_metadata=None):
assert np.atleast_1d(link_f).shape == np.atleast_1d(y).shape<EOL>c = np.zeros_like(y)<EOL>if Y_metadata is not None and '<STR_LIT>' in Y_metadata.keys():<EOL><INDENT>c = Y_metadata['<STR_LIT>']<EOL><DEDENT>val = np.log(y) - link_f<EOL>val_scaled = val/np.sqrt(self.variance)<EOL>val_scaled2 = val/self.variance<EOL>uncensored = (<NUM_LIT:1>-c)*(val_scaled2)<EOL>a = (<NUM_LIT:1>- stats.norm.cdf(val_scaled))<EOL>censored = c*( <NUM_LIT:1.>/a) * (np.exp(-<NUM_LIT:1.>* val**<NUM_LIT:2> /(<NUM_LIT:2>*self.variance)) / np.sqrt(<NUM_LIT:2>*np.pi*self.variance))<EOL>gradient = uncensored + censored<EOL>return gradient<EOL>
derivative of logpdf wrt link_f param
.. math::

:param link_f: latent variables link(f)
:type link_f: Nx1 array
:param y: data
:type y: Nx1 array
:param Y_metadata: includes censoring information in dictionary key 'censored'
:returns: likelihood evaluated for this point
:rtype: float