SHARE
TWEET

Untitled

a guest Jul 17th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(i in 1:10){
  2. testIndexes <- which(folds==i,arr.ind=TRUE)
  3. testData <- yourData[testIndexes, ]
  4. trainData <- yourData[-testIndexes, ]
  5.  
  6. if(i==1){
  7.    set.seed=1234
  8.    Subtest = data.frame(i,sample(nrow(trainData) , size = round(0.3*(nrow(trainData))),replace=F),trainData)
  9. }else{
  10.   Subtest = rbind(data.frame(sample(nrow(trainData) , size = round(0.3*(nrow(trainData)))),
  11.                         i,trainData))
  12. }
  13. }
  14.      
  15. Error in data.frame(i, sample(nrow(trainData), size = round(0.3 * (nrow(trainData))),  :
  16.   arguments imply differing number of rows: 1, 81, 270
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top