survivalplann
R Package for implementing partial logistic artificial neural networks (PLANN) with time-to-event
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.1%) to scientific vocabulary
Repository
R Package for implementing partial logistic artificial neural networks (PLANN) with time-to-event
Statistics
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
survivalPLANN: an R Package for Survival Neural Network
Description
The R package ‘survivalPLANN’ contains a variety of functions to predictive survival rates from neural network. It also allows us to predictive relative survivals. The Partial Logistic Artificial Neural Networks (PLANN) are implemented, proposed by Biganzoli et al. (1998). S3 methods are included to evaluate the predictive capacities, as well as predictions from new observations.
Basic usage to predict the overall survival
``` r
import libraries
library(survivalPLANN) library(relsurv)
library(survivalNET)
library(lubridate)
data management
data(dataK) # import the data base (colorectal cancers from the 'relsurv' package)
dataK$agey <- dataK$age/365.241
estimation of the hyperparameters
pro.time <- floor(max(dataK$time[dataK$event==1])/365.241) # 13 years
tune.sPLANN <- cvPLANN(Surv(time, event)~ sex + agey + stade + delay, data=dataK, cv=10, pro.time=pro.time*365.241, inter=365.241/12, size=2:5, decay=c(0.01, 0.1))
tune.sPLANN$optimal$size
[1] 2
tune.sPLANN$optimal$decay
[1] 0.01
estimation of the network according to the previous optimal parameters
splann <- sPLANN(Surv(time, event)~ sex + agey + stade + delay, data=dataK, pro.time=pro.time*365.241, inter=365.241/12, size=2, decay=0.01, maxit=1000)
predictions for a 50-years old patientwith no delay at the diagnostic
of a non-agressive cancer according to the gender
dnew <- data.frame(sex=c(1,2), agey=c(50,60), stade=c(0,0), delay=c(0,0))
datap <- predict(splann, newdata = dnew) #survival predictions for dnew
plot(c(0,datap$times/365.241), c(1,datap$predictions[1,]), ylab="Patient survival", xlab="Post-diagnosis time in years", type="l") # sex=1 (male)
lines(c(0,datap$times/365.241), c(1,datap$predictions[2,]), type="l", col=2) #sex=2 (female) ```
Individual and marginal predictions of overall and relative survival rates
``` r data("fr.ratetable") # import the table with the expected population mortality
datap <- predictRS(object=splann, data=dataK, ratetable=fr.ratetable, age="age", sex="sexchara", year="year")
the predicted overall survival curves of the first 100 patients
plot(survfit(Surv(time/365.241, event) ~ 1, data = dataK), ylab="Overall survival", xlab="Time (years)", conf.int = FALSE, lwd=2, col="red")
for (i in 1:100) { lines(x=datap$times/365.241, y=datap$ipredictions$overall_survival[i,], col="gray", type="s") }
legend("topright", c("Kaplan-Meier estimator", "Individual predictions"), col=c("red", "gray"), lty=c(1,1), lwd=c(2,1)) ```
Describing the performences of 'splann' to predict the overall survival
``` r plot(survfit(Surv(time/365.241, event) ~ 1, data = dataK), ylab="Overall survival", xlab="Time (years)", lwd=1, col="black") # the non-parametric Kaplan-Meier estimator
lines(x=datap$times/365.241, y=datap$mpredictions$overall_survival, col="red", type="s")
legend("topright", c("Kaplan-Meier estimator", "Mean of the individual predictions"), col=c("black", "red"), lty=c(1,1), lwd=c(1,1)) ```
Describing the performences of 'splann' to predict the net survival
``` r fit_net <- rs.surv(Surv(time, event) ~ 1, data=dataK, ratetable=fr.ratetable, rmap=list(age=age, sex= sex, year=year), method = "pohar-perme") # the non-parametric Pohar-Perme estimator
plot(fit_net, col=1, lwd=1, lty=1, xscale = 365.241, xlab="Time (years)", ylim=c(0,1))
lines(x=datap$times, y=datap$mpredictions$net_survival, type="s", col="red")
legend("topright", c("Pohar-Perme estimator", "Mean of the individual predictions"), col=c("black", "red"), lty=c(1,1), lwd=c(1,1)) ```
Describing the performences of 'splann' to predict the cumulative incidence function
``` r cmp_fit <- cmp.rel(Surv(time, event) ~ 1, data=dataK, ratetable=fr.ratetable, rmap=list(age=age, sex= sex, year=year)) # the non-parametric Pohar-Perme estimator
plot(cmp_fit, col=c("black", "black"), lty=c(1,2), xscale = 365.241, xlab="Time (years)", ylim=c(0,1))
lines(datap$times/365.241, datap$mpredictions$excess_cif, type="s", col="red", lty=1)
lines(datap$times/365.241, datap$mpredictions$population_cif, type="s", col="red", lty=2) ```
Describing the performences of 'splann' to predict the relative survival ratio
``` r fit_sr <- rs.surv(Surv(time, event) ~ 1, data=dataK, ratetable=fr.ratetable, rmap=list(age=age, sex= sex, year=year), method = "ederer1")
plot(fit_sr, col=1, lwd=1, lty=1, xscale = 365.241, xlab="Time (years)", ylim=c(0,1))
lines(x=datap$times, y=datap$mpredictions$relativeratiosurvival, type="s", col="red")
legend("topright", c("Ederer-I estimator", "Mean of the individual predictions"), col=c("black", "red"), lty=c(1,1), lwd=c(1,1)) ```
Installation
To install the latest release from CRAN:
r
install.packages("survivalPLANN")
To install the development version from GitHub:
r
remotes::install_github("chupverse/survivalPLANN")
Reporting bugs
You can report any issues at this link.
Owner
- Name: Poitiers Health Data
- Login: chupverse
- Kind: organization
- Location: Poitiers, France
- Website: https://www.chu-poitiers.fr/
- Repositories: 1
- Profile: https://github.com/chupverse
A collection of R packages and other codes from Poitiers Univeristy Hospital
GitHub Events
Total
- Member event: 1
- Push event: 7
- Pull request event: 16
- Pull request review event: 1
Last Year
- Member event: 1
- Push event: 7
- Pull request event: 16
- Pull request review event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- ollard-t (5)
- foucher-y (5)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 21,673 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: survivalPLANN
Neural Networks to Predict Survival
- Documentation: http://cran.r-project.org/web/packages/survivalPLANN/survivalPLANN.pdf
- License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
-
Latest release: 0.4
published 12 months ago
Rankings
Maintainers (1)
Dependencies
- R >= 4.0.0 depends
- nnet * depends
- survival * depends
- methods * imports
- stats * imports