def d2logpdf_dlink2(self, link_f, y, Y_metadata=None):
<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>a = (<NUM_LIT:1> - stats.norm.cdf(val_scaled))<EOL>uncensored = (<NUM_LIT:1>-c) *(-<NUM_LIT:1>)/self.variance<EOL>censored = c*(-np.exp(-val**<NUM_LIT:2>/self.variance) / ( <NUM_LIT:2>*np.pi*self.variance*(a**<NUM_LIT:2>) ) +<EOL>val*np.exp(-(val**<NUM_LIT:2>)/(<NUM_LIT:2>*self.variance))/( np.sqrt(<NUM_LIT:2>*np.pi)*self.variance**(<NUM_LIT:3>/<NUM_LIT>)*a) )<EOL>hessian = censored + uncensored<EOL>return hessian<EOL>
Hessian at y, given link(f), w.r.t link(f)
i.e. second derivative logpdf at y given link(f_i) and link(f_j)  w.r.t link(f_i) and link(f_j)
The hessian will be 0 unless i == j

.. 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: Diagonal of hessian matrix (second derivative of likelihood evaluated at points f)
:rtype: Nx1 array

.. Note::
    Will return diagonal of hessian, since every where else it is 0, as the likelihood factorizes over cases
    (the distribution for y_i depends only on link(f_i) not on link(f_(j!=i))