From 21fa787129103b79c55b1ea99a69a162e6d249b1 Mon Sep 17 00:00:00 2001 From: corolth1 Date: Tue, 7 Jan 2025 12:02:23 -0500 Subject: [PATCH] documentation --- docs/notebooks/loss_time_covariates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/notebooks/loss_time_covariates.py b/docs/notebooks/loss_time_covariates.py index f575533..d346d54 100644 --- a/docs/notebooks/loss_time_covariates.py +++ b/docs/notebooks/loss_time_covariates.py @@ -40,8 +40,8 @@ def neg_partial_time_log_likelihood( tensor(37.8082, grad_fn=) >>> from torchsurv.metrics.cindex import ConcordanceIndex >>> cindex = ConcordanceIndex() - >>> cindex_t = torch.stack([cindex(log_hz_t, event, time) for log_hz_t in estimates.unbind(0)]) # Compute for each time step t - >>> cindex_t + >>> cindex_t = torch.stack([cindex(log_hz_t, event, time) for log_hz_t in estimates.unbind(0)]) + >>> cindex_t # Compute c-index for each time step t tensor([0.6061, 0.2424, 0.5758, 0.3333, 0.5152]) >>> cindex_t.mean() # Average over all time steps t tensor(0.4545)