cvo_get_info: Access information in a cvo object

Description Usage Arguments Details See Also Examples

View source: R/cvo_get_info.R

Description

Utility functions for cvo object. More in section "Details."

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cvo_get_inds(cvo, fold, type = c("asis", "train", "test"))

## S3 method for class 'cvo_caret'
cvo_get_inds(cvo, fold, type = c("asis", "train",
  "test"))

## S3 method for class 'cvo_mlr'
cvo_get_inds(cvo, fold, type = c("asis", "train",
  "test"))

cvo_get_info(cvo)

cvo_get_sample_size(cvo)

cvo_get_seeds(cvo)

cvo_count_folds(cvo)

## S3 method for class 'cvo_caret'
cvo_count_folds(cvo)

## S3 method for class 'cvo_mlr'
cvo_count_folds(cvo)

cvo_get_fold_names(cvo)

## S3 method for class 'cvo_caret'
cvo_get_fold_names(cvo)

## S3 method for class 'cvo_mlr'
cvo_get_fold_names(cvo)

Arguments

cvo

a cross-validation object (cvo) created with function cvo_create_folds.

fold

either a name or an index of fold of interest.

type

(string) one of options, indicating the kind of indices you are interested in:

  • "AsIs" - indices as they are in the object,

  • "Train" - indices of training set,

  • "Test" - indices of test set.

Details

Function cvo_get_info returns information about the cross-validation object cvo.

Function cvo_get_sample_size returns sample size of the object used to create the cross-validation object cvo.

Function cvo_count_folds returns total number of folds in a cvo object.

Function cvo_get_inds extracts indices of indicated set (either training or test) from cross-validation object (cvo) created with function cvo_create_folds when fold of interest is indicated as fold (it can be either a name of fold or an index of fold). If cvo does not contain indices of chosen type, it returns a complement to those indices and this information is indicated in attributes of returned object.

Function cvo_get_seeds returns information about seeds of (pseudo)random number generator used for each repetition of splitting to folds.

See Also

cvo_create_folds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
cvo <- cvo_create_folds(fluorescence, folds = 10)
cvo

cvo_get_info(cvo)

cvo_get_seeds(cvo)

cvo_get_sample_size(cvo)

cvo_count_folds(cvo)

cvo_get_fold_names(cvo)

cvo_get_inds(cvo, 1)

cvo_get_inds(cvo, 1, "train")

cvo_get_inds(cvo, 1, "test")

GegznaV/manyROC documentation built on Sept. 17, 2018, 2:15 p.m.