Module auton_survival.models.cmhe.cmhe_torch
Classes
class DeepCMHETorch (k, g, inputdim, layers=None, gamma=100, smoothing_factor=0.0001, gate_l2_penalty=0.0001, optimizer='Adam')

PyTorch model definition of the Cox Mixture with Hereogenous Effects Model.
Cox Mixtures with Heterogenous Effects involves the assuming that the base survival rates are independent of the treatment effect. of the individual to be a mixture of K Cox Models. Conditioned on each subgroup Z=k; the PH assumptions are assumed to hold and the baseline hazard rates is determined nonparametrically using an splineinterpolated Breslow's estimator.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Class variables
var dump_patches : bool
var training : bool
Methods
def forward(self, x, a) ‑> Callable[..., Any]
class IdentifiableLinear (in_features, out_features, bias=True)

Softmax and LogSoftmax with K classes in pytorch are over specfied and lead to issues of misidentifiability. This class is a wrapper for linear layers that are correctly specified with K1 columns. The output of this layer for the Kth class is all zeros. This allows direct application of pytorch.nn.LogSoftmax and pytorch.nn.Softmax.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Class variables
var dump_patches : bool
var training : bool
Instance variables
var weight
Methods
def forward(self, x) ‑> Callable[..., Any]