Description Usage Arguments Value Super classes Active bindings Methods
Key-value dictionary contains data.frame
class objects.
This class is used to extract train and test data for model input, and also
contains ResampleCalls class object to generate resamples.
1 2 3 4 5 6 7 |
... |
Key and value pairs. |
.id_col |
A character scalar. An id column name contains integer ids.
Leave |
.test_ids |
A integer vector specifiying test data. If |
.resample_calls |
A ResampleCalls class object. |
.value_width |
A integer scalar of character length. Used as max
width of output value by |
A new Datasets class object
Dict::Dict
-> ml4e::Option
-> Datasets
id_col
An id column name.
test_ids
Test data ids.
resample_calls
A ResampleCalls class object.
has_id_col
Wheather to have id_col
.
has_test_ids
Wheather to have test_ids
.
has_resample_calls
Wheather to have resample_calls
.
new()
Construct a new Datasets
class object.
Datasets$new( ..., .id_col = NULL, .test_ids = NULL, .resample_calls = NULL, .value_width = Inf )
...
Key and value pairs.
.id_col
A character scalar. An id column name contains integer
ids. Leave NULL
if dataset does not have id column.
.test_ids
A integer vector specifiying test data. If id_col
is
not NULL
, test_ids
must be id_col
ranges. If NULL
test_ids
are
considered as row numbers.
.resample_calls
A ResampleCalls class object.
.value_width
A integer scalar of character length. Used as max
width of output value by self$print()
method.
A new Datasets
class object
print()
Print object.
Datasets$print()
add()
Adds key-value objects to the dictionary.
Datasets$add(...)
...
Key and value pairs.
get()
Get data.
Datasets$get(key = NULL, preproc_call = NULL)
key
A character or integer scalar of the keys.
preproc_call
A call
to convert data.
A data.frame
.
get_train()
Get train data.
Datasets$get_train(key = NULL, preproc_call = NULL)
key
A character or integer scalar of the keys.
preproc_call
A call
to convert data.
A data.frame
of train data.
get_test()
Get test data.
Datasets$get_test(key = NULL, preproc_call = NULL)
key
A character or integer scalar of the keys.
preproc_call
A call
to convert data.
A data.frame
of test data.
get_resample()
Get resample data. Internally call self$resample_calls$get_resample()
.
Datasets$get_resample( dataset_key = NULL, resample_call_key = NULL, seed = NULL, preproc_call = NULL )
dataset_key
A character or integer scalar of the datasets keys.
resample_call_key
A character or integer scalar of the resample_calls keys.
seed
A integer scalar seed.
preproc_call
A call
to convert data.
A resample of rset
class object.
clone()
The objects of this class are cloneable with this method.
Datasets$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.