Overview
I want to simulate the survival prediction using neural networks described in this paper entitled "Application of Artificial Neural Network-Based Survival Analysis on Two Breast Cancer Datasets" by Chi, Street and Wolberg where a target vector of 1's representing time points are evaluated and returns a vector of the probabilities. Unfortunately they did not provide the software used to create the method.
For example, a dataset with time
, status
(indicating alive or dead) and other predictive variables are needed to be trained in a neural network. There will be a data structure to hold the time points the research needs (say a {1,1,1,1,1,1}
, six-month intervals in three years). The output of this model, after taking into account the aforementioned predictive variables will look like this: {0.98761,0.91111,0.82710,0.70003,0.64253,0.47181}
that corresponds to:
6 12 18 24 30 36
1 0.98761 0.91111 0.82710 0.70003 0.64253 0.47181
2 ...
These data can be used for future records that will be fed into the network.
R neural network packages
I have been searching for ways to implement this in the nnet
, neuralnet
and rminer
packages and unfortunately my limited knowledge can't modify them to suit my needs. I only know that these predict nominal and numeric values but now how to do vectors.
So far the functions relating to predicting in those packages do not give a hint on the usage of a vector as output.
nnet
'spredict()
's description clearly states below.Predict new examples by a trained neural net.
# X1, X2, and the rest of predictive variables model.nnet <- nnet(Surv(time,status)~X1+X2, data=data.train, size=1, maxit=500)
neuralnet
'scompute()
does not support a similar target vector for support.Computation of a given neural network for given covariate vectors.
rminer
'spredict()
andlforecast()
prove to have potential (based from the examples) but I have no idea how to transform them into what I want to do.the
survnnet
package is said to support the commonpredictSurvProb
function of thepec
package but I stayed away from it because of the poor documentation and support here in the Internet.Predict new examples by a trained survival neural net.
model.survnet <- survnnet(Surv(time,status)~X1+X2, data=dat, model='llog', decay=0.1, bias.decay=25, size=1, skip=T, alpha=0.1) predictions <- predict(model.survnet, data.train, type="raw")
Cox PH (current known method)
The closest method I've got so far was coxph
and cph
applied with the predictSurvProb
function where a times
variable is declared with the numeric points of interest.
Usually I do this:
data.train <- SimSurv(300)
model.coxph <- cph(Surv(time,status)~X2,data=dat,surv=TRUE,x=TRUE,y=TRUE)
# declare target times as 25,50,75,100,150 for probabilities
predictions <- predictSurvProb(coxph12, newdata=data.train, times=c(25,50,75,100,150))
round(predictions, digits=6)
and I would get an output of probabilities per time period I specified:
25 50 75 100 150
1 0.648268 0.509353 0.460196 0.425917 0.324364
2 0.648268 0.509353 0.460196 0.425917 0.324364
3 0.756732 0.648020 0.607077 0.577596 0.484789
4 0.648268 0.509353 0.460196 0.425917 0.324364
5 0.648268 0.509353 0.460196 0.425917 0.324364
These are now ready to be integrated as new variables into the dataset for other purposes.
I now want to implement this in a neural network with the target vector or a similar implementation to the Cox PH process like the example above.
Unfortunately I can not find a straightforward package or tutorial online that states if this is possible to do, as I said before.
I checked into the data mining software WEKA's MultilayerPerceptron
implementation but it requires that the outcome variable (or in my case a vector of probabilities) to be existing first, which takes me back here into R.
Is this method possible in these R packages or the only way is to create my own? All help and suggestions would be greatly appreciated.