library(caret)
Fruit<-c("Banana", "Apple", "Banana", "Orange", "Appel")
Origin<-c("New Guinea", "China","Germany", "USA", "Germany")
Quality<-c("Good", "Bad", "Good", "Very bad", "Decent")
Price<-c(1,2,1,3,1)
Fruits<-data.frame(Fruit, Origin, Quality, Price)
n <- 50
Fruits.replicated<-do.call("rbind", replicate(n, Fruits, simplify = FALSE))
KI <- train(
x = as.data.frame(subset(Fruits.replicated, select=-c(`Price`))),
y = Fruits.replicated$`Price`,
method = "nnet",
preProc = c("center", "scale"),
trControl = trainControl(
search = "random",
allowParallel = TRUE,
savePredictions = "final"
),
tuneLength = 5,
maxit = 500,
MaxNWts = 5000,
linout = TRUE,
trace = TRUE
)
Let's use the example above. From what I know, 75% of the data in used for training, and 25% for testing. The value 0.75 (75%) coincides with the variable p in the neural network "AI", which can be found when clicking on "KI" and then "control".
Now to my question: Is it correct, that only 75% is used for actual training? If so, how can I change the value? Is the variable "p" responsible?