I’m looking at an example for the knnflex package and they setup a training and test set using the following:
train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
My questions is how does this differ from :
train <- rbind(iris3[1:25,1], iris3[1:25,2], iris3[1:25,3])
test <- rbind(iris3[26:50,1], iris3[26:50,2], iris3[26:50,3])
Two commas means there were more than two dimensions and you selected all of the items in the dimension that could have been specified between the two commas. For example, imagine a cube instead of a square, with all of the data in it. You can select row, height, and depth. If you select [row,,depth], then you will have selected an entire column in the cube at that row and depth. The principle is the same up to larger dimensions but harder to describe.