| split_random | R Documentation |
The data.frame should start with a vector containing labels, or formula should be defined.
split_random(df, formula = NULL, splits = c(0.5, 0.5), min_class = 0)
df |
data.frame; Data frame of interest |
formula |
formula; Formula to indicate the outputs |
splits |
numeric; Probability of of assigning to each part, automatically normalized, should be >1 |
min_class |
integer; minimum number of objects per class in each part |
list of data.frames
Other RSSL utilities:
LearningCurveSSL(),
SSLDataFrameToMatrices(),
add_missinglabels_mar(),
df_to_matrices(),
measure_accuracy(),
missing_labels(),
split_dataset_ssl(),
true_labels()
library(dplyr)
df <- generate2ClassGaussian(200,d=2)
dfs <- df %>% split_random(Class~.,split=c(0.5,0.3,0.2),min_class=1)
names(dfs) <- c("Train","Validation","Test")
lapply(dfs,summary)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.