Here is a code snippet of the problem, once the BreastTissue data is loaded.
require(nnet)
# Training the multinomial model
multinom_model <- multinom(Class ~ ., data = tissue)
# Predicting the values for train dataset
train$ClassPredicted <- predict(multinom_model, newdata = train, "class")
It is no longer working and I have tried to delete the current version and go back a couple of versions with R studio to see if that would fix the problem, but still no luck. Very strange. Any guidance on how to solve an issue like this?
It does. Thank you FJCC.
Endless hours later... after clearing the workspace it is now working.
Still strange as I would have expected that to work after deleting R and reinstalling etc.
I do appreciate your input.