survdnn_losses | R Documentation |
These functions define various loss functions used internally by 'survdnn()' for training deep neural networks on right-censored survival data.
cox_loss(pred, true)
cox_l2_loss(pred, true, lambda = 1e-04)
aft_loss(pred, true)
coxtime_loss(pred, true)
pred |
A tensor of predicted values (typically linear predictors or log-times). |
true |
A tensor with two columns: observed time and status (1 = event, 0 = censored). |
lambda |
Regularization parameter for 'cox_l2_loss' (default: '1e-4'). |
A scalar 'torch_tensor' representing the loss value.
- **Cox partial likelihood loss** ('cox_loss'): Negative partial log-likelihood used in proportional hazards modeling. - **L2-penalized Cox loss** ('cox_l2_loss'): Adds L2 regularization to the Cox loss. - **Accelerated Failure Time (AFT) loss** ('aft_loss'): Mean squared error between predicted and log-transformed event times, applied to uncensored observations only. - **CoxTime loss** ('coxtime_loss'): Implements the partial likelihood loss from Kvamme & Borgan (2019), used in Cox-Time models.
# Used internally by survdnn()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.