# survdnn 1.0.0 (CRAN)

Deep Neural Networks for Survival Analysis with R 'torch'

[Record of 1.0.0](/cran/survdnn/v/1.0.0.md) | Compare: [With 0.7.6](/cran/survdnn/compare/0.7.6...1.0.0.md), [With another package](/compare/survdnn.md#add), [Downloads](/downloads/compare/survdnn.md#add) | [Licences](/cran/survdnn/licences.md) | [SBOM](/cran/survdnn/sbom.md)

Install from CRAN: `install.packages("survdnn")`

Also from:

- r2u (Ubuntu binaries): `sudo apt install r-cran-survdnn` _Listed from recorded download activity on this channel, not from a live index, so read it as last known. Bioconductor packages are named r-bioc-<name> there._
- autoCRAN (openSUSE): `sudo zypper install R-survdnn` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._

- CRAN checks: All OK (13 platforms)
- CRAN 30-day downloads: 285 (down 17.9% on the 30 days before, the worse direction)
- Dependent packages: 1 (none suggest it)
- Test coverage: 2% (of lines run by tests)
- Advisories: None known

## About

[Method](/about/licenses.md)

Provides deep learning models for right-censored survival data using the 'torch' backend. Supports multiple loss functions, including Cox partial likelihood, L2-penalized Cox, time-dependent Cox, and accelerated failure time (AFT) loss.

**Full description**

Provides deep learning models for right-censored survival data using the 'torch' backend. Supports multiple loss functions, including Cox partial likelihood, L2-penalized Cox, time-dependent Cox, and accelerated failure time (AFT) loss. Offers a formula-based interface, built-in support for cross-validation, hyperparameter tuning, survival curve plotting, and evaluation metrics such as the C-index, Brier score, and integrated Brier score. For methodological details, see Kvamme et al. (2019) <https://www.jmlr.org/papers/v20/18-424.html>. The package is described in El Badisy (2026) <doi:10.32614/RJ-2026-008>.

- Maintainer: Imad El Badisy
- Licence: [MIT + file LICENSE](/licences/MIT.md)
- Latest release: 22 Aug 2026
- First release: 22 Jul 2025

- [CRAN page](https://cran.r-project.org/package=survdnn)
- [Source repository](https://github.com/ielbadisy/survdnn)
- [Issues](https://github.com/ielbadisy/survdnn/issues)
- [Source of every release](https://github.com/cran/survdnn)

[Compare with another package](/compare/survdnn.md#add)

**More details**

- Releases: 6
- Needs compilation: No
- Needs R: >= 4.1.0
- Config/testthat/edition: 3
- RoxygenNote: 7.3.3

**Subjects (1) [Method](/about/subjects.md#found)**

- [Neural network models](/topics/subjects/neural-network-models.md)

**Cite**

#### Package

Run in R for the authors' entry:

`citation("survdnn")`

The package provides a citation file, so `citation()` returns the authors' own entry.

It points to 10.32614/rj-2026-008.

#### R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA: Balamuta, J. J. (2026). R Observatory: Metrics for survdnn version 1.0.0 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040

BibTeX:

```
@misc{robservatorysurvdnn,
  author    = {Balamuta, James Joseph},
  title     = {{R} {Observatory}: Metrics for {survdnn} version 1.0.0},
  year      = {2026},
  publisher = {HJJB, LLC},
  doi       = {10.5281/zenodo.21843040},
  url       = {https://r-observatory.thecoatlessprofessor.com/packages/survdnn},
  note      = {Data set. Data release v2026-10-28}
}
```

From data release v2026-10-28, which the citation names so these numbers can be found later.

## Health

[Method](/about/checks-health.md)

All 13 check platforms pass.

13 CRAN platforms: 13 OK.

Platforms now:

- r-devel-linux-x86_64-debian-clang: OK
- r-devel-linux-x86_64-debian-gcc: OK
- r-devel-linux-x86_64-fedora-clang: OK
- r-devel-linux-x86_64-fedora-gcc: OK
- r-devel-windows-x86_64: OK
- r-oldrel-macos-arm64: OK
- r-oldrel-macos-x86_64: OK
- r-oldrel-windows-x86_64: OK
- r-patched-linux-x86_64: OK
- r-release-linux-x86_64: OK
- r-release-macos-arm64: OK
- r-release-macos-x86_64: OK
- r-release-windows-x86_64: OK

#### Over time

No change since 4 Aug 2026

**As a list (5)**

| Changed | Worst status | OK | Notes | Warnings | Errors |
| --- | --- | ---: | ---: | ---: | ---: |
| 4 Aug 2026 | OK | 13 | 0 | 0 | 0 |
| 1 Aug 2026 | Note | 12 | 1 | 0 | 0 |
| 9 Jun 2026 | OK | 13 | 0 | 0 | 0 |
| 8 Jun 2026 | Error | 12 | 0 | 0 | 1 |
| 10 Mar 2026 | OK | 14 | 0 | 0 | 0 |

Since March 2026

[Check results on CRAN](https://cran.r-project.org/web/checks/check_results_survdnn.html)

## Downloads

[Method](/about/downloads.md)

- Downloads in the last 30 days: 291 (down 23% on the 30 days before, the worse direction. It is the sum of 3 channels: CRAN, r2u and autoCRAN.)

CRAN alone: rank among CRAN packages, last 30 days: 14,829 of 26,530.

| Channel | Downloads in the last 30 days | In the total | Rank in that channel | Change |
| --- | ---: | --- | --- | --- |
| CRAN | 285 | yes | 14,829 of 26,530 | down 17.9% on the 30 days before, the worse direction |
| r2u | 4 | yes | 10,337 of 30,526 | down 79% on the 30 days before, the worse direction |
| autoCRAN | 2 | yes | 22,452 of 29,212 | down 83.3% on the 30 days before, the worse direction |

Other windows: [Last 90 days](/cran/survdnn.md?win=90d#downloads), [Last 365 days](/cran/survdnn.md?win=365d#downloads), [All time](/cran/survdnn.md?win=all#downloads).

To leave channels out of the total, name them in the address, joined by dots: `?off=r2u.autocran`.

#### Over time

Downloads over time, the last 12 whole months:

| Month | CRAN | r2u | autoCRAN | Sum |
| --- | ---: | ---: | ---: | ---: |
| Oct 2025 | 236 | 2 | no figure | 238 |
| Nov 2025 | 180 | 10 | no figure | 190 |
| Dec 2025 | 221 | 12 | no figure | 233 |
| Jan 2026 | 341 | 12 | no figure | 353 |
| Feb 2026 | 376 | 8 | no figure | 384 |
| Mar 2026 | 326 | no figure | no figure | 326 |
| Apr 2026 | 342 | 21 | no figure | 363 |
| May 2026 | 527 | 13 | no figure | 540 |
| Jun 2026 | 474 | no figure | no figure | 474 |
| Jul 2026 | 288 | 8 | 20 | 316 |
| Aug 2026 | 328 | 21 | 27 | 376 |
| Sep 2026 | 336 | 4 | 7 | 347 |

First day on record: CRAN 22 Jul 2025, r2u 23 Jul 2025, autoCRAN 29 Jun 2026.

Every channel here counts downloads, so the channels can be stacked and summed for one period. Each channel counts in its own way and covers a different span of years, so read a sum as a rough total, and read a rise where a channel begins as that channel starting, not as growth.

Weeks start on Monday. A first or last week or month that the channel does not cover in full is left out, so every point is a whole period.

Days with no record add nothing to their week or month. For a little-used package that is usually a day with no downloads, but it can also be a gap in collection.

[Compare downloads](/downloads/compare/survdnn.md#add)

## Dependencies

[Method](/about/reverse-dependencies.md)

- Needs: 13
- Dependent packages: 1
- Suggested by: 0

**Needs (13)**

- [cli](/cran/cli.md)
- [dplyr](/cran/dplyr.md)
- [ggplot2](/cran/ggplot2.md)
- [glue](/cran/glue.md)
- methods
- [purrr](/cran/purrr.md)
- [rsample](/cran/rsample.md)
- stats
- [survival](/cran/survival.md)
- [tibble](/cran/tibble.md)
- [tidyr](/cran/tidyr.md)
- [torch](/cran/torch.md)
- utils

- Installing it adds: 50 packages, 37.7 MB of source
- Of those, need compilation: 26

**Optional extras (3)**

- [knitr](/cran/knitr.md)
- [rmarkdown](/cran/rmarkdown.md)
- [testthat](/cran/testthat.md)

**Dependent packages (1)**

| Package | Title | Downloads in 30 days |
| --- | --- | ---: |
| [survalis](/cran/survalis.md) | Interpretable Survival Machine Learning Framework | 227 |

## Code

[Method](/about/code-metrics.md)

Selected function: `survdnn`

- Kind: Public R function
- File: R/survdnn.R, line 124
- Lines: 268
- Complexity: 48
- Covered by tests: 0%

Called by 3: [`cv_survdnn`](/cran/survdnn.md?fn=cv_survdnn&view=focus#code) (0% of lines run by tests), [`tune_survdnn`](/cran/survdnn.md?fn=tune_survdnn&view=focus#code) (0% of lines run by tests), [`gridsearch_survdnn`](/cran/survdnn.md?fn=gridsearch_survdnn&view=focus#code) (0% of lines run by tests)

Calls 8: [`cox_loss`](/cran/survdnn.md?fn=cox_loss&view=focus#code) (0% of lines run by tests), [`survdnn_set_seed`](/cran/survdnn.md?fn=survdnn_set_seed&view=focus#code) (0% of lines run by tests), [`cox_l2_loss`](/cran/survdnn.md?fn=cox_l2_loss&view=focus#code) (0% of lines run by tests), [`survdnn__aft_lognormal_nll_factory`](/cran/survdnn.md?fn=survdnn__aft_lognormal_nll_factory&view=focus#code) (0% of lines run by tests), [`build_dnn`](/cran/survdnn.md?fn=build_dnn&view=focus#code) (0% of lines run by tests), [`survdnn__coxtime_loss_factory`](/cran/survdnn.md?fn=survdnn__coxtime_loss_factory&view=focus#code) (0% of lines run by tests), [`survdnn_get_device`](/cran/survdnn.md?fn=survdnn_get_device&view=focus#code) (0% of lines run by tests), [`survdnn_set_threads`](/cran/survdnn.md?fn=survdnn_set_threads&view=focus#code) (0% of lines run by tests)

Paths: 2 steps each way.

Called by 3:

- [`cv_survdnn`](/cran/survdnn.md?fn=cv_survdnn&view=focus#code), called by 1
  - [`tune_survdnn`](/cran/survdnn.md?fn=tune_survdnn&view=focus#code)
- [`tune_survdnn`](/cran/survdnn.md?fn=tune_survdnn&view=focus#code)
- [`gridsearch_survdnn`](/cran/survdnn.md?fn=gridsearch_survdnn&view=focus#code)

Calls 8:

- [`cox_loss`](/cran/survdnn.md?fn=cox_loss&view=focus#code), calls 2
  - [`survdnn__count_true`](/cran/survdnn.md?fn=survdnn__count_true&view=focus#code)
  - [`survdnn__zeros_like_scalar`](/cran/survdnn.md?fn=survdnn__zeros_like_scalar&view=focus#code)
- [`survdnn_set_seed`](/cran/survdnn.md?fn=survdnn_set_seed&view=focus#code)
- [`cox_l2_loss`](/cran/survdnn.md?fn=cox_l2_loss&view=focus#code), calls 1
  - [`cox_loss`](/cran/survdnn.md?fn=cox_loss&view=focus#code), calls 2
- [`survdnn__aft_lognormal_nll_factory`](/cran/survdnn.md?fn=survdnn__aft_lognormal_nll_factory&view=focus#code), calls 1
  - [`survdnn__log_surv_std_normal`](/cran/survdnn.md?fn=survdnn__log_surv_std_normal&view=focus#code)
- [`build_dnn`](/cran/survdnn.md?fn=build_dnn&view=focus#code)
- [`survdnn__coxtime_loss_factory`](/cran/survdnn.md?fn=survdnn__coxtime_loss_factory&view=focus#code)
- [`survdnn_get_device`](/cran/survdnn.md?fn=survdnn_get_device&view=focus#code)
- [`survdnn_set_threads`](/cran/survdnn.md?fn=survdnn_set_threads&view=focus#code)

The open file in the files map is `R/survdnn.R`.

- Functions: 2
- Lines: 310
- Calls that stay inside it: 1
- Calls to other files: 7, to 2
- Calls from other files: 3, from 3

It calls: `R/losses.R` (4 calls), `R/zzz.R` (3 calls)

Called from: `R/evaluation.R` (1 call), `R/gridsearch_survdnn.R` (1 call), `R/tune_survdnn.R` (1 call)

| Function in survdnn.R | Calls in other files |
| --- | --- |
| [`survdnn`](/cran/survdnn.md?fn=survdnn&view=focus#code) selected | [`cox_l2_loss`](/cran/survdnn.md?fn=cox_l2_loss&view=focus#code), [`cox_loss`](/cran/survdnn.md?fn=cox_loss&view=focus#code), [`survdnn__aft_lognormal_nll_factory`](/cran/survdnn.md?fn=survdnn__aft_lognormal_nll_factory&view=focus#code), [`survdnn__coxtime_loss_factory`](/cran/survdnn.md?fn=survdnn__coxtime_loss_factory&view=focus#code) and 3 more |
| [`build_dnn`](/cran/survdnn.md?fn=build_dnn&view=focus#code) | nothing outside this file |


6 files with no calls to or from another: `R/callbacks.R`, `R/plot.survdnn.R`, `R/plot_loss.R`, `R/predict.survdnn.R`, `R/print.survdnn.R`, `R/summary.survdnn.R`.

The whole package has 31 function names in 13 files and 27 calls between them. Most calls between files: `R/losses.R` and `R/survdnn.R` (4 calls), `R/evaluation.R` and `R/metrics.R` (3 calls), `R/survdnn.R` and `R/zzz.R` (3 calls), `R/evaluation.R` and `R/survdnn.R` (1 call), `R/evaluation.R` and `R/zzz.R` (1 call).

Graph: the whole call graph has 21 function names that take part in a call and 27 calls between them, set out in 6 layers with callers before what they call. 10 function names have no calls and are left out. Called by the most functions: `survdnn_set_seed` (4), `survdnn` (3), `survdnn__log_surv_std_normal` (2), `cox_loss` (2), `evaluate_survdnn` (2). Calling the most functions: `survdnn` (8), `tune_survdnn` (4), `evaluate_survdnn` (3), `cv_survdnn` (3), `gridsearch_survdnn` (3).

Most connected functions: [`survdnn`](/cran/survdnn.md?fn=survdnn&view=focus#code) 11, [`evaluate_survdnn`](/cran/survdnn.md?fn=evaluate_survdnn&view=focus#code) 5, [`cox_loss`](/cran/survdnn.md?fn=cox_loss&view=focus#code) 4, [`cv_survdnn`](/cran/survdnn.md?fn=cv_survdnn&view=focus#code) 4, [`survdnn_set_seed`](/cran/survdnn.md?fn=survdnn_set_seed&view=focus#code) 4, [`tune_survdnn`](/cran/survdnn.md?fn=tune_survdnn&view=focus#code) 4

To select another function, add ?fn=NAME to this address.

The call graph also has an address of its own: /cran/survdnn/graph.md?fn=survdnn&view=focus

- Functions: 31
- Public exports: 17
- Lines of R code: 2,252
- Median complexity: 4

**Functions (31)**

| Function (sorted, low to high) | Kind | File | Lines | Complexity | Covered |
| --- | --- | --- | ---: | ---: | ---: |
| [`aft_loss`](/cran/survdnn.md?fn=aft_loss#code) | Public | R/losses.R | 41 | 1 | 0% |
| [`brier`](/cran/survdnn.md?fn=brier#code) | Public | R/metrics.R | 37 | 7 | 0% |
| [`build_dnn`](/cran/survdnn.md?fn=build_dnn#code) | Public | R/survdnn.R | 42 | 5 | 0% |
| [`callback_early_stopping`](/cran/survdnn.md?fn=callback_early_stopping#code) | Public | R/callbacks.R | 45 | 11 | 75% |
| [`cindex_survmat`](/cran/survdnn.md?fn=cindex_survmat#code) | Public | R/metrics.R | 54 | 21 | 0% |
| [`cox_l2_loss`](/cran/survdnn.md?fn=cox_l2_loss#code) | Public | R/losses.R | 6 | 1 | 0% |
| [`cox_loss`](/cran/survdnn.md?fn=cox_loss#code) | Public | R/losses.R | 17 | 2 | 0% |
| [`coxtime_loss`](/cran/survdnn.md?fn=coxtime_loss#code) | Public | R/losses.R | 8 | 1 | 0% |
| [`cv_survdnn`](/cran/survdnn.md?fn=cv_survdnn#code) | Public | R/evaluation.R | 91 | 11 | 0% |
| [`evaluate_survdnn`](/cran/survdnn.md?fn=evaluate_survdnn#code) | Public | R/evaluation.R | 60 | 11 | 0% |
| [`gridsearch_survdnn`](/cran/survdnn.md?fn=gridsearch_survdnn#code) | Public | R/gridsearch_survdnn.R | 57 | 3 | 0% |
| [`ibs_survmat`](/cran/survdnn.md?fn=ibs_survmat#code) | Public | R/metrics.R | 19 | 4 | 0% |

This page lists 1 to 12 of 31 functions. [Next](/cran/survdnn.md?sort=name&order=asc&fpage=2#functions)

**Size and composition**

#### Lines by kind (4,182)

| Kind | Lines | Share |
| --- | ---: | ---: |
| R code | 2,252 | 54% |
| Tests | 1,074 | 26% |
| Documentation | 856 | 20% |

#### Lines by language

| Language | Lines | Share |
| --- | ---: | ---: |
| R | 3,326 | 80% |
| Rd | 856 | 21% |

Languages are counted from file extensions.

- Files: 55
- R functions: 31
- Object systems: S3: 4 methods

**Complexity**

- Median: 4
- Mean: 8
- Highest: 48
- Median lines per function: 37

_About complexity: Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only._

**Call graph figures**

- R functions: 31
- Calls: 27
- Unconnected: 10
- Groups: 1

**Growth (6 releases)**

Total lines by release: from 2,430 (on 22 Jul 2025) to 4,182 (on 22 Aug 2026). The lowest is 2,430 and the highest is 4,182.

**Release changes**

[Both releases side by side](/cran/survdnn/compare/0.7.6...1.0.0.md)

**0.7.6 to 1.0.0**, 29 Apr 2026 to 22 Aug 2026

- Files changed: 5
- Lines added: 101
- Lines deleted: 49
- Exports: No change

**Most changed files (5 of 5)**

| File | Lines added | Lines deleted |
| --- | ---: | ---: |
| `README.md` | 56 | 34 |
| `DESCRIPTION` | 18 | 12 |
| `inst/CITATION` | 12 | 0 |
| `NEWS.md` | 11 | 0 |
| `MD5` | 4 | 3 |

## Tests

[Method](/about/coverage.md)

The tests ran and coverage was measured.

- Lines run by tests: 2.5%
- Expressions run by tests: 2.9%
- Test cases: 44
- Exports named in tests: 82.4%

**Coverage by file (13)**

13 files measured, least covered first.

| File | Lines | Run by tests | Not run | Coverage |
|---|---:|---:|---:|---:|
| `R/survdnn.R`, 2 functions | 205 | 0 | 205 | 0% |
| `R/predict.survdnn.R`, 1 function | 177 | 0 | 177 | 0% |
| `R/evaluation.R`, 3 functions | 120 | 0 | 120 | 0% |
| `R/losses.R`, 9 functions | 117 | 0 | 117 | 0% |
| `R/tune_survdnn.R`, 2 functions | 117 | 0 | 117 | 0% |
| `R/summary.survdnn.R`, 1 function | 92 | 0 | 92 | 0% |
| `R/metrics.R`, 3 functions | 70 | 0 | 70 | 0% |
| `R/gridsearch_survdnn.R`, 1 function | 37 | 0 | 37 | 0% |
| `R/plot.survdnn.R`, 1 function | 37 | 0 | 37 | 0% |
| `R/plot_loss.R`, 1 function | 21 | 0 | 21 | 0% |
| `R/print.survdnn.R`, 1 function | 13 | 0 | 13 | 0% |
| `R/zzz.R`, 5 functions | 52 | 3 | 49 | 6% |
| `R/callbacks.R`, 1 function | 32 | 24 | 8 | 75% |

**Coverage run**

- Lines counted: 1,090
- Lines the tests ran: 27
- Tests passed: Yes
- Measured with: covr 3.6.5 on R 4.6.1

**Test suite**

- Has tests: Yes
- Test frameworks: testthat
- Test cases: 44
- Lines of tests: 1,074
- Test lines per line of code: 0.48

## Documentation

[Method](/about/code-metrics.md)

- Exports documented: 100%
- Arguments documented: 100%
- Return value documented: 100%
- Help pages with examples: 55.6%
- Examples run in checks: 0%

**Other documentation**

- README: Yes, 886 words
- Release notes file: Yes
- Help pages: 18
- Lines of documentation: 856

## People

[Method](/about/author-identity.md)

- [Imad El Badisy](/people/Imad+El+Badisy.md): Maintainer since 0.6.0 (2025), author
- [Daniel Falbel](/people/Daniel+Falbel.md): Contributor

## Repository

[Method](/about/repo-signals.md#figures)

[ielbadisy](/repos/ielbadisy.md) / [survdnn](https://github.com/ielbadisy/survdnn) on github.com

- Stars: 6 (no change on 30 days ago)
- Forks: 1
- Open issues: 2
- Last commit: 19 Sep 2026

**Activity**

- Commits: 251
- Open pull requests: 0
- Tagged releases: 3
- Latest tagged release: v0.7.6, 17 Apr 2026
- In development: Default branch at 1.0.2, ahead of CRAN 1.0.0 (checked 2026-10-25)
- Issues closed in: 80 days (median)
- Pull requests closed in: 0 days (median)
- Pull requests merged: 100%
- Created: 9 Jul 2025
- Licence file reads as: –

**Development practices (5)**

| Kind | Found |
| --- | --- |
| Continuous integration | GitHub Actions, R CMD check workflow The `R CMD check` workflow runs on Linux, macOS and Windows, and on R-devel |
| Docs source | README.Rmd |
| CRAN release process | cran-comments.md |
| Lint, format, editor | RStudio project |

[Across ielbadisy](/repos/ielbadisy.md#practices)

## History

[Method](/about/archive.md)

The line runs from the first release of survdnn on 22 Jul 2025 to 28 Oct 2026 and marks all 6 of its releases.

| Version | Released | R |
| --- | --- | ---: |
| [1.0.0](/cran/survdnn/v/1.0.0.md) current | 22 Aug 2026 | 4.6.1 |
| [0.7.6](/cran/survdnn/v/0.7.6.md) | 29 Apr 2026 | 4.6.0 |
| [0.7.5](/cran/survdnn/v/0.7.5.md) | 8 Jan 2026 | 4.5.2 |
| [0.7.0](/cran/survdnn/v/0.7.0.md) | 23 Dec 2025 | 4.5.2 |
| [0.6.3](/cran/survdnn/v/0.6.3.md) | 30 Oct 2025 | 4.5.1 |
| [0.6.0](/cran/survdnn/v/0.6.0.md) | 22 Jul 2025 | 4.5.1 |

**Release notes (1.0.0)**

**CRAN resubmission update**

- Milestone release: the package's methods paper is now published in The R Journal (El Badisy 2026, <doi:10.32614/RJ-2026-008>), cited in `DESCRIPTION`'s `Description` field and a matching `inst/CITATION` file.
- Standardized the maintainer's family-name casing to "El Badisy" (title case) in `Authors@R`, matching the rest of the package suite. Daniel Falbel remains listed as a contributor (`ctb`).

---

R Observatory is independent of the R Project, CRAN and Bioconductor. The same page for people is at /cran/survdnn, and every address is listed at /llms.txt.
