Prepare a dataset for analysis
Transform a dataset with named columns into a list with features (
dataset_prepare(dataset, x, y = NULL, named = TRUE, named_features = FALSE, parallel_records = NULL, batch_size = NULL, num_parallel_batches = NULL, drop_remainder = FALSE)
Features to include. When
(Optional). Response variable.
(Optional) An integer, representing the number of records to decode in parallel. If not specified, records will be processed sequentially.
(Optional). Batch size if you would like to fuse the
(Optional) An integer, representing the number of batches to create in parallel. On one hand, higher values can help mitigate the effect of stragglers. On the other hand, higher values can increase contention if CPU is scarce.
Ensure that batches have a fixed size by omitting any final smaller batch if it's present. Note that this is required for use with the Keras tensor inputs to fit/evaluate/etc.
A dataset. The dataset will have a structure of either:
list(x = list(feature_name = feature_values, ...), y = response_values)
list(x = features_array, y = response_values), where
features_arrayis a Rank 2 array of
Note that the
y element will be omitted when
input_fn() for use with tfestimators.