R/scMethrix_transforms.R
generate_training_set.RdSplits an scMethrix object into two for use as a training and test set
generate_training_set(scm = NULL, training_prop = 0.2, seed = "123")
| scm |
|
|---|---|
| training_prop | numeric; The size of the training set as a proportion of the experiment (0 to 1) For a range, the optimal value will be estimated; this is time-intensive. |
| seed | string; value to use for sampling |
list; two scMethrix objects names 'training' and 'test'
Typically used for teaching classification algorithms. The seed can be set for consistency.
#> $training #> An object of class scMethrix #> n_CpGs: 57 #> n_samples: 4 #> assays: score, counts #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 33.6 Kb #> #> $test #> An object of class scMethrix #> n_CpGs: 229 #> n_samples: 4 #> assays: score, counts #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 43.7 Kb #>