bips-hb / neuralnet

Training of Neural Networks
30 stars 12 forks source link

Error in x - y : non-conformable arrays when performing survival analysis using neuralnet #42

Open jiangaimin1995 opened 1 year ago

jiangaimin1995 commented 1 year ago

I want to perform neural network analysis for a survival data (the lung dataset in the survival package). However, i got the following Error. Error in x - y : non-conformable arrays The following is the source code. nn.model <- neuralnet(Surv(time, status) ~ ., data = train.data, hidden = c(3, 2), linear.output = FALSE) Many thanks.

mnwright commented 1 year ago

The package does not support survival data. There is no loss function appropriate to survival data implemented.

We could check that and give a meaningful error message though.