smmargins.Transform¶
- class smmargins.Transform(value: Callable[[ndarray], ndarray], grad: Callable[[ndarray], ndarray], hess: Callable[[ndarray], ndarray] | None = None, name: str = 'custom')¶
Analytic transformation of the linear predictor.
- Parameters:
value (callable) –
value(eta)returns the transformed scale, element-wise.grad (callable) –
grad(eta)returns the first derivativeλ'(eta), element-wise.hess (callable, optional) –
hess(eta)returns the second derivativeλ''(eta), element-wise. Required fordydxcalls; optional forpredictcalls.name (str, optional) – Human-readable name, used in result labels.
Notes
Custom transforms used in
Margins.dydxmust supply an analytichess. Autodiff is deliberately not supported — users who want it can wrap their ownTransformwithjax.gradetc.- __init__(value: Callable[[ndarray], ndarray], grad: Callable[[ndarray], ndarray], hess: Callable[[ndarray], ndarray] | None = None, name: str = 'custom')¶
Methods
__init__(value, grad[, hess, name])