Skip to content
Prev 323419 / 398503 Next

prediction in a loop with only one sample

Hi

Without reproducible example you probably do not persuade us to go through your almost unreadable code.
The approach I would use is sampling a row index.

ind<- sample(1:nrow(some.data), 300)

testing <- some.data[ind,]
training <- some.data[-ind,]

Regards
Petr