hopsy.Model.log_curvature#
- Model.log_curvature(self x)#
For some proposals, the curvature will help converging faster as long as the gradient computation is not too slow. The curvature is a square matrix which is (semi-)positive definit. For example one can use the fisher information, the hessian, linear approximations to the hessian and so on. If you can not compute a useful or fast enough curvature for your custom model, you can just return a zero matrix with the correct dimensionality (number of rows and cols each equal to number of parameters). Alternatively do not implement it and it will not be used.
:param : :type : param x: Input vector :param : :type : type x: numpy.ndarray[float64[n,1]]
- Returns:
return: The value of
model.log_curvature(x)
rtype: numpy.ndarray[float64[n,n]]