Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jiangaimin1995 opened this issue Apr 12, 2023 · 1 comment

Comments

@jiangaimin1995
Copy link

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants