Returns a list of two matrices train
and test
.
train
corresponds to the input matrix with a fixed persentage of
entries masked by NA values. test
is the complement of train
and contains the values of the input matrix in the cells where train
is NA, while all the other entries are filled by NA values.
partition(y, p = 0.3)
input matrix to be split into train and test sets
fraction of observations to be used for the test set