.cumsum(1)
.cpu()
.numpy())
return 1 - cdf.transpose()
def make_loss_deephit(alpha, sigma):
Loss for deephit (single risk) model.
After Change
num_workers=0):
Might need to set to_cpu to true if too large dataset.
pmf = self.predict_pmf(input, batch_size, eval_, to_cpu, num_workers, False)
surv = 1 - pmf.cumsum(0)
if tuplefy(input).type() is np.ndarray:
surv = surv.cpu().numpy()
return surv