partition | R Documentation |
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)
y |
input matrix to be split into train and test sets |
p |
fraction of observations to be used for the test set |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.