From 19acb911ba02235b1ca94ca9ac9346c1eb252bfc Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 7 Oct 2025 16:34:31 -0400 Subject: [PATCH 1/3] Support `convert=FALSE` for builtin datasets --- R/datasets.R | 263 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 201 insertions(+), 62 deletions(-) diff --git a/R/datasets.R b/R/datasets.R index d43dfc394..c1b63f4c2 100644 --- a/R/datasets.R +++ b/R/datasets.R @@ -6,8 +6,19 @@ #' Dataset of 50,000 32x32 color training images, labeled over 10 categories, #' and 10,000 test images. #' +#' @param convert When `TRUE` (default) the datasets are returned as R arrays. +#' If `FALSE`, objects are returned as NumPy arrays. +#' #' @returns Lists of training and test data: `train$x, train$y, test$x, test$y`. #' +#' ```{r cifar10-str-true} +#' str(dataset_cifar10()) +#' ``` +#' +#' ```{r cifar10-str-false} +#' str(dataset_cifar10(convert = FALSE)) +#' ``` +#' #' The `x` data is an array of RGB image data with shape (num_samples, 3, 32, #' 32). #' @@ -17,8 +28,11 @@ #' @family datasets #' #' @export -dataset_cifar10 <- function() { - dataset <- keras$datasets$cifar10$load_data() +dataset_cifar10 <- function(convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$cifar10$load_data, + convert = convert + ) as_dataset_list(dataset) } @@ -30,9 +44,18 @@ dataset_cifar10 <- function() { #' and 10,000 test images. #' #' @param label_mode one of "fine", "coarse". +#' @inheritParams dataset_cifar10 #' #' @returns Lists of training and test data: `train$x, train$y, test$x, test$y`. #' +#' ```{r cifar100-str-true} +#' str(dataset_cifar100()) +#' ``` +#' +#' ```{r cifar100-str-false} +#' str(dataset_cifar100(convert = FALSE)) +#' ``` +#' #' The `x` data is an array of RGB image data with shape (num_samples, 3, 32, 32). #' #' The `y` data is an array of category labels with shape (num_samples). @@ -40,9 +63,13 @@ dataset_cifar10 <- function() { #' @family datasets #' #' @export -dataset_cifar100 <- function(label_mode = c("fine", "coarse")) { - dataset <- keras$datasets$cifar100$load_data( - label_mode = match.arg(label_mode) +dataset_cifar100 <- function(label_mode = c("fine", "coarse"), convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$cifar100$load_data, + convert = convert, + args = list( + label_mode = match.arg(label_mode) + ) ) as_dataset_list(dataset) } @@ -75,9 +102,19 @@ dataset_cifar100 <- function(label_mode = c("fine", "coarse")) { #' @param oov_char Words that were cut out because of the `num_words` or #' `skip_top` limit will be replaced with this character. #' @param index_from Index actual words with this index and higher. +#' @inheritParams dataset_cifar10 #' #' @returns Lists of training and test data: `train$x, train$y, test$x, test$y`. #' +#' ``` +#' train/ +#' ├─ x +#' └─ y +#' test/ +#' ├─ x +#' └─ y +#' ``` +#' #' The `x` data includes integer sequences. If the `num_words` argument was #' specific, the maximum possible index value is `num_words-1`. If the #' `maxlen` argument was specified, the largest possible sequence length is @@ -85,6 +122,14 @@ dataset_cifar100 <- function(label_mode = c("fine", "coarse")) { #' #' The `y` data includes a set of integer labels (0 or 1). #' +#' ```{r imdb-str-true} +#' str(dataset_imdb()) +#' ``` +#' +#' ```{r imdb-str-false} +#' str(dataset_imdb(convert = FALSE)) +#' ``` +#' #' The `dataset_imdb_word_index()` function returns a list where the #' names are words and the values are integer. #' @@ -92,19 +137,24 @@ dataset_cifar100 <- function(label_mode = c("fine", "coarse")) { #' #' @export dataset_imdb <- function(path = "imdb.npz", num_words = NULL, skip_top = 0L, maxlen = NULL, - seed = 113L, start_char = 1L, oov_char = 2L, index_from = 3L) { - dataset <- keras$datasets$imdb$load_data( - path = path, - num_words = as_nullable_integer(num_words), - skip_top = as.integer(skip_top), - maxlen = as_nullable_integer(maxlen), - seed = as.integer(seed), - start_char = as.integer(start_char), - oov_char = as.integer(oov_char), - index_from = as.integer(index_from) + seed = 113L, start_char = 1L, oov_char = 2L, index_from = 3L, + convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$imdb$load_data, + convert = convert, + args = list( + path = path, + num_words = as_nullable_integer(num_words), + skip_top = as.integer(skip_top), + maxlen = as_nullable_integer(maxlen), + seed = as.integer(seed), + start_char = as.integer(start_char), + oov_char = as.integer(oov_char), + index_from = as.integer(index_from) + ) ) - as_sequences_dataset_list(dataset) + as_sequences_dataset_list(dataset, convert = convert) } @@ -136,30 +186,52 @@ dataset_imdb_word_index <- function(path = "imdb_word_index.json") { #' @param oov_char words that were cut out because of the `num_words` or #' `skip_top` limit will be replaced with this character. #' @param index_from index actual words with this index and higher. +#' @inheritParams dataset_cifar10 #' #' @returns Lists of training and test data: `train$x, train$y, test$x, test$y` #' with same format as [dataset_imdb()]. The `dataset_reuters_word_index()` #' function returns a list where the names are words and the values are #' integer. e.g. `word_index[["giraffe"]]` might return `1234`. #' +#' ``` +#' train/ +#' ├─ x +#' └─ y +#' test/ +#' ├─ x +#' └─ y +#' ``` +#' +#' ```{r reuters-str-true} +#' str(dataset_reuters()) +#' ``` +#' +#' ```{r reuters-str-false} +#' str(dataset_reuters(convert = FALSE)) +#' ``` +#' #' @family datasets #' #' @export dataset_reuters <- function(path = "reuters.npz", num_words = NULL, skip_top = 0L, maxlen = NULL, test_split = 0.2, seed = 113L, start_char = 1L, oov_char = 2L, - index_from = 3L) { - dataset <- keras$datasets$reuters$load_data( - path = path, - num_words = as_nullable_integer(num_words), - skip_top = as.integer(skip_top), - maxlen = as_nullable_integer(maxlen), - test_split = test_split, - seed = as.integer(seed), - start_char = as.integer(start_char), - oov_char = as.integer(oov_char), - index_from = as.integer(index_from) + index_from = 3L, convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$reuters$load_data, + convert = convert, + args = list( + path = path, + num_words = as_nullable_integer(num_words), + skip_top = as.integer(skip_top), + maxlen = as_nullable_integer(maxlen), + test_split = test_split, + seed = as.integer(seed), + start_char = as.integer(start_char), + oov_char = as.integer(oov_char), + index_from = as.integer(index_from) + ) ) - as_sequences_dataset_list(dataset) + as_sequences_dataset_list(dataset, convert = convert) } @@ -176,16 +248,29 @@ dataset_reuters_word_index <- function(path = "reuters_word_index.pkl") { #' Dataset of 60,000 28x28 grayscale images of the 10 digits, along with a test set of 10,000 images. #' #' @param path Path where to cache the dataset locally (relative to ~/.keras/datasets). +#' @inheritParams dataset_cifar10 #' #' @returns Lists of training and test data: `train$x, train$y, test$x, test$y`, where #' `x` is an array of grayscale image data with shape (num_samples, 28, 28) and `y` #' is an array of digit labels (integers in range 0-9) with shape (num_samples). #' +#' ```{r mnist-str-true} +#' str(dataset_mnist()) +#' ``` +#' +#' ```{r mnist-str-false} +#' str(dataset_mnist(convert = FALSE)) +#' ``` +#' #' @family datasets #' #' @export -dataset_mnist <- function(path = "mnist.npz") { - dataset <- keras$datasets$mnist$load_data(path) +dataset_mnist <- function(path = "mnist.npz", convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$mnist$load_data, + convert = convert, + args = list(path = path) + ) as_dataset_list(dataset) } @@ -224,18 +309,6 @@ dataset_mnist <- function(path = "mnist.npz") { #' values for block groups with few households and many empty houses, #' such as vacation resorts. #' -#' @returns -#' Nested list of arrays: `(x_train, y_train), (x_test, y_test)`. -#' -#' **`x_train`, `x_test`**: arrays with shape `(num_samples, 8)` -#' containing either the training samples (for `x_train`), -#' or test samples (for `y_train`). -#' -#' **`y_train`, `y_test`**: arrays of shape `(num_samples)` -#' containing the target scalars. The targets are float scalars -#' typically between 25,000 and 500,000 that represent -#' the home prices in dollars. -#' #' @param version #' `"small"` or `"large"`. The small version #' contains 600 samples, the large version contains @@ -254,15 +327,32 @@ dataset_mnist <- function(path = "mnist.npz") { #' Random seed for shuffling the data #' before computing the test split. #' +#' @inheritParams dataset_cifar10 +#' +#' @returns +#' Nested list of arrays: `(x_train, y_train), (x_test, y_test)`. +#' +#' ```{r california-housing-str-true} +#' str(dataset_california_housing()) +#' ``` +#' +#' ```{r california-housing-str-false} +#' str(dataset_california_housing(convert = FALSE)) +#' ``` +#' #' @export #' @family datasets #' @tether keras.datasets.california_housing.load_data dataset_california_housing <- function (version = "large", path = "california_housing.npz", - test_split = 0.2, seed = 113L) + test_split = 0.2, seed = 113L, convert = TRUE) { - args <- capture_args(list(seed = as_integer)) - dataset <- do.call(keras$datasets$california_housing$load_data, args) + args <- capture_args(list(seed = as_integer), ignore = "convert") + dataset <- call_dataset_loader( + loader = keras$datasets$california_housing$load_data, + convert = convert, + args = args + ) as_dataset_list(dataset) } @@ -280,6 +370,14 @@ function (version = "large", path = "california_housing.npz", #' `x` is an array of grayscale image data with shape (num_samples, 28, 28) and `y` #' is an array of article labels (integers in range 0-9) with shape (num_samples). #' +#' ```{r fashion-mnist-str-true} +#' str(dataset_fashion_mnist()) +#' ``` +#' +#' ```{r fashion-mnist-str-false} +#' str(dataset_fashion_mnist(convert = FALSE)) +#' ``` +#' #' @details Dataset of 60,000 28x28 grayscale images of 10 fashion categories, #' along with a test set of 10,000 images. This dataset can be used as a drop-in #' replacement for MNIST. The class labels are: @@ -294,12 +392,16 @@ function (version = "large", path = "california_housing.npz", #' * 7 - Sneaker #' * 8 - Bag #' * 9 - Ankle boot +#' @inheritParams dataset_cifar10 #' #' @family datasets #' #' @export -dataset_fashion_mnist <- function() { - dataset <- keras$datasets$fashion_mnist$load_data() +dataset_fashion_mnist <- function(convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$fashion_mnist$load_data, + convert = convert + ) as_dataset_list(dataset) } @@ -314,6 +416,7 @@ dataset_fashion_mnist <- function() { #' @param test_split fraction of the data to reserve as test set. #' @param seed Random seed for shuffling the data before computing the test #' split. +#' @inheritParams dataset_cifar10 #' #' @returns Lists of training and test data: `train$x, train$y, test$x, test$y`. #' @@ -321,14 +424,27 @@ dataset_fashion_mnist <- function() { #' the Boston suburbs in the late 1970s. Targets are the median values of the #' houses at a location (in k$). #' +#' ```{r boston-housing-str-true} +#' str(dataset_boston_housing()) +#' ``` +#' +#' ```{r boston-housing-str-false} +#' str(dataset_boston_housing(convert = FALSE)) +#' ``` +#' #' @family datasets #' #' @export -dataset_boston_housing <- function(path = "boston_housing.npz", test_split = 0.2, seed = 113L) { - dataset <- keras$datasets$boston_housing$load_data( - path = path, - seed = as.integer(seed), - test_split = test_split +dataset_boston_housing <- function(path = "boston_housing.npz", test_split = 0.2, seed = 113L, + convert = TRUE) { + dataset <- call_dataset_loader( + loader = keras$datasets$boston_housing$load_data, + convert = convert, + args = list( + path = path, + seed = as.integer(seed), + test_split = test_split + ) ) as_dataset_list(dataset) } @@ -336,6 +452,16 @@ dataset_boston_housing <- function(path = "boston_housing.npz", test_split = 0.2 +call_dataset_loader <- function(loader, convert, args = list()) { + if (convert) { + return(do.call(loader, args)) + } + + dataset <- do.call(r_to_py(loader), args) + iterate(dataset, iterate, simplify = FALSE) +} + + as_dataset_list <- function(dataset) { list( train = list( @@ -349,15 +475,28 @@ as_dataset_list <- function(dataset) { ) } -as_sequences_dataset_list <- function(dataset) { - list( - train = list( - x = lapply(dataset[[1]][[1]], identity), - y = as.integer(dataset[[1]][[2]]) - ), - test = list( - x = lapply(dataset[[2]][[1]], identity), - y = as.integer(dataset[[2]][[2]]) +as_sequences_dataset_list <- function(dataset, convert) { + if (convert) { + list( + train = list( + x = lapply(dataset[[1]][[1]], identity), + y = as.integer(dataset[[1]][[2]]) + ), + test = list( + x = lapply(dataset[[2]][[1]], identity), + y = as.integer(dataset[[2]][[2]]) + ) ) - ) + } else { + list( + train = list( + x = dataset[[1]][[1]], + y = dataset[[1]][[2]] + ), + test = list( + x = dataset[[2]][[1]], + y = dataset[[2]][[2]] + ) + ) + } } From 40ac2138d91250b3d071fce6efe6d1b8b58eb072 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 7 Oct 2025 17:29:07 -0400 Subject: [PATCH 2/3] redocument --- man/dataset_boston_housing.Rd | 32 +++- man/dataset_california_housing.Rd | 37 ++++- man/dataset_cifar10.Rd | 32 +++- man/dataset_cifar100.Rd | 31 +++- man/dataset_fashion_mnist.Rd | 32 +++- man/dataset_imdb.Rd | 240 +++++++++++++++++++++++++++++- man/dataset_mnist.Rd | 31 +++- man/dataset_reuters.Rd | 240 +++++++++++++++++++++++++++++- man/layer_tfsm.Rd | 4 +- 9 files changed, 662 insertions(+), 17 deletions(-) diff --git a/man/dataset_boston_housing.Rd b/man/dataset_boston_housing.Rd index 05df5a5e5..38b151320 100644 --- a/man/dataset_boston_housing.Rd +++ b/man/dataset_boston_housing.Rd @@ -7,7 +7,8 @@ dataset_boston_housing( path = "boston_housing.npz", test_split = 0.2, - seed = 113L + seed = 113L, + convert = TRUE ) } \arguments{ @@ -18,6 +19,9 @@ dataset_boston_housing( \item{seed}{Random seed for shuffling the data before computing the test split.} + +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}. @@ -25,6 +29,32 @@ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}. Samples contain 13 attributes of houses at different locations around the Boston suburbs in the late 1970s. Targets are the median values of the houses at a location (in k$). + +\if{html}{\out{
}}\preformatted{str(dataset_boston_housing()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: num [1:404, 1:13] 1.2325 0.0218 4.8982 0.0396 3.6931 ... +## ..$ y: num [1:404(1d)] 15.2 42.3 50 21.1 17.7 18.5 11.3 15.6 15.6 14.4 ... +## $ test :List of 2 +## ..$ x: num [1:102, 1:13] 18.0846 0.1233 0.055 1.2735 0.0715 ... +## ..$ y: num [1:102(1d)] 7.2 18.8 19 27 22.2 24.5 31.2 22.9 20.5 23.2 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_boston_housing(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} } \description{ Dataset taken from the StatLib library which is maintained at Carnegie Mellon diff --git a/man/dataset_california_housing.Rd b/man/dataset_california_housing.Rd index d77b77369..3ac4968ac 100644 --- a/man/dataset_california_housing.Rd +++ b/man/dataset_california_housing.Rd @@ -8,7 +8,8 @@ dataset_california_housing( version = "large", path = "california_housing.npz", test_split = 0.2, - seed = 113L + seed = 113L, + convert = TRUE ) } \arguments{ @@ -25,18 +26,38 @@ deprecated \code{boston_housing} dataset.} \item{seed}{Random seed for shuffling the data before computing the test split.} + +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Nested list of arrays: \verb{(x_train, y_train), (x_test, y_test)}. -\strong{\code{x_train}, \code{x_test}}: arrays with shape \verb{(num_samples, 8)} -containing either the training samples (for \code{x_train}), -or test samples (for \code{y_train}). +\if{html}{\out{
}}\preformatted{str(dataset_california_housing()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: num [1:16512, 1:8] -118 -118 -122 -118 -123 ... +## ..$ y: num [1:16512(1d)] 252300 146900 290900 141300 500001 ... +## $ test :List of 2 +## ..$ x: num [1:4128, 1:8] -118 -120 -121 -122 -117 ... +## ..$ y: num [1:4128(1d)] 397900 227900 172100 186500 148900 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_california_housing(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: -\strong{\code{y_train}, \code{y_test}}: arrays of shape \code{(num_samples)} -containing the target scalars. The targets are float scalars -typically between 25,000 and 500,000 that represent -the home prices in dollars. +}\if{html}{\out{
}} } \description{ This dataset was obtained from the \href{https://www.dcc.fc.up.pt/~ltorgo/Regression/cal_housing.html}{StatLib repository}. diff --git a/man/dataset_cifar10.Rd b/man/dataset_cifar10.Rd index 1d0c29857..dd8a77ea1 100644 --- a/man/dataset_cifar10.Rd +++ b/man/dataset_cifar10.Rd @@ -4,11 +4,41 @@ \alias{dataset_cifar10} \title{CIFAR10 small image classification} \usage{ -dataset_cifar10() +dataset_cifar10(convert = TRUE) +} +\arguments{ +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}. +\if{html}{\out{
}}\preformatted{str(dataset_cifar10()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: int [1:50000, 1:32, 1:32, 1:3] 59 154 255 28 170 159 164 28 134 125 ... +## ..$ y: int [1:50000, 1] 6 9 9 4 1 1 2 7 8 3 ... +## $ test :List of 2 +## ..$ x: int [1:10000, 1:32, 1:32, 1:3] 158 235 158 155 65 179 160 83 23 217 ... +## ..$ y: int [1:10000, 1] 3 8 8 0 6 6 1 6 3 1 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_cifar10(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} + The \code{x} data is an array of RGB image data with shape (num_samples, 3, 32, 32). diff --git a/man/dataset_cifar100.Rd b/man/dataset_cifar100.Rd index c7b429b9b..278ace00d 100644 --- a/man/dataset_cifar100.Rd +++ b/man/dataset_cifar100.Rd @@ -4,14 +4,43 @@ \alias{dataset_cifar100} \title{CIFAR100 small image classification} \usage{ -dataset_cifar100(label_mode = c("fine", "coarse")) +dataset_cifar100(label_mode = c("fine", "coarse"), convert = TRUE) } \arguments{ \item{label_mode}{one of "fine", "coarse".} + +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}. +\if{html}{\out{
}}\preformatted{str(dataset_cifar100()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: int [1:50000, 1:32, 1:32, 1:3] 255 255 250 124 43 190 50 178 122 255 ... +## ..$ y: num [1:50000, 1] 19 29 0 11 1 86 90 28 23 31 ... +## $ test :List of 2 +## ..$ x: int [1:10000, 1:32, 1:32, 1:3] 199 113 61 93 80 168 37 175 233 182 ... +## ..$ y: num [1:10000, 1] 49 33 72 51 71 92 15 14 23 0 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_cifar100(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} + The \code{x} data is an array of RGB image data with shape (num_samples, 3, 32, 32). The \code{y} data is an array of category labels with shape (num_samples). diff --git a/man/dataset_fashion_mnist.Rd b/man/dataset_fashion_mnist.Rd index ade51bb97..c0d06a4fe 100644 --- a/man/dataset_fashion_mnist.Rd +++ b/man/dataset_fashion_mnist.Rd @@ -4,12 +4,42 @@ \alias{dataset_fashion_mnist} \title{Fashion-MNIST database of fashion articles} \usage{ -dataset_fashion_mnist() +dataset_fashion_mnist(convert = TRUE) +} +\arguments{ +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}, where \code{x} is an array of grayscale image data with shape (num_samples, 28, 28) and \code{y} is an array of article labels (integers in range 0-9) with shape (num_samples). + +\if{html}{\out{
}}\preformatted{str(dataset_fashion_mnist()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: int [1:60000, 1:28, 1:28] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ y: int [1:60000(1d)] 9 0 0 3 0 2 7 2 5 5 ... +## $ test :List of 2 +## ..$ x: int [1:10000, 1:28, 1:28] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ y: int [1:10000(1d)] 9 2 1 1 6 1 4 6 5 7 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_fashion_mnist(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} } \description{ Dataset of 60,000 28x28 grayscale images of the 10 fashion article classes, diff --git a/man/dataset_imdb.Rd b/man/dataset_imdb.Rd index ea71f2190..491d3e6e8 100644 --- a/man/dataset_imdb.Rd +++ b/man/dataset_imdb.Rd @@ -13,7 +13,8 @@ dataset_imdb( seed = 113L, start_char = 1L, oov_char = 2L, - index_from = 3L + index_from = 3L, + convert = TRUE ) dataset_imdb_word_index(path = "imdb_word_index.json") @@ -39,10 +40,21 @@ Set to 1 because 0 is usually the padding character.} \code{skip_top} limit will be replaced with this character.} \item{index_from}{Index actual words with this index and higher.} + +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}. +\if{html}{\out{
}}\preformatted{train/ +├─ x +└─ y +test/ +├─ x +└─ y +}\if{html}{\out{
}} + The \code{x} data includes integer sequences. If the \code{num_words} argument was specific, the maximum possible index value is \code{num_words-1}. If the \code{maxlen} argument was specified, the largest possible sequence length is @@ -50,6 +62,232 @@ specific, the maximum possible index value is \code{num_words-1}. If the The \code{y} data includes a set of integer labels (0 or 1). +\if{html}{\out{
}}\preformatted{str(dataset_imdb()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x:List of 25000 +## .. ..$ : int [1:218] 1 14 22 16 43 530 973 1622 1385 65 ... +## .. ..$ : int [1:189] 1 194 1153 194 8255 78 228 5 6 1463 ... +## .. ..$ : int [1:141] 1 14 47 8 30 31 7 4 249 108 ... +## .. ..$ : int [1:550] 1 4 18609 16085 33 2804 4 2040 432 111 ... +## .. ..$ : int [1:147] 1 249 1323 7 61 113 10 10 13 1637 ... +## .. ..$ : int [1:43] 1 778 128 74 12 630 163 15 4 1766 ... +## .. ..$ : int [1:123] 1 6740 365 1234 5 1156 354 11 14 5327 ... +## .. ..$ : int [1:562] 1 4 14906 716 4 65 7 4 689 4367 ... +## .. ..$ : int [1:233] 1 43 188 46 5 566 264 51 6 530 ... +## .. ..$ : int [1:130] 1 14 20 47 111 439 3445 19 12 15 ... +## .. ..$ : int [1:450] 1 785 189 438 47 110 142 7 6 7475 ... +## .. ..$ : int [1:99] 1 54 13 1610 14 20 13 69 55 364 ... +## .. ..$ : int [1:117] 1 13 119 954 189 1554 13 92 459 48 ... +## .. ..$ : int [1:238] 1 259 37 100 169 1653 1107 11 14 418 ... +## .. ..$ : int [1:109] 1 503 20 33 118 481 302 26 184 52 ... +## .. ..$ : int [1:129] 1 6 964 437 7 58 43 1402 11 6 ... +## .. ..$ : int [1:163] 1 7092 1662 11 4 1749 9 4 2165 4 ... +## .. ..$ : int [1:752] 1 33 4 5673 7 4 61433 194 33815 3089 ... +## .. ..$ : int [1:212] 1 13 28 64 69 4 8742 7 319 14 ... +## .. ..$ : int [1:177] 1 3432 26 9 6 1220 731 939 44 6 ... +## .. ..$ : int [1:129] 1 617 11 3875 17 72274 14 966 78 20 ... +## .. ..$ : int [1:140] 1 466 49 2036 204 2442 40 4 6724 732 ... +## .. ..$ : int [1:256] 1 13 784 886 857 15 135 142 40 23826 ... +## .. ..$ : int [1:888] 1 4 712 19 17268 50361 19984 963 16272 26 ... +## .. ..$ : int [1:93] 1 4 204 7610 20 16 93 11 9075 19 ... +## .. ..$ : int [1:142] 1 14 9 6 55 641 2854 212 44 6 ... +## .. ..$ : int [1:220] 1 4 288 310 3202 7 241 672 4 41852 ... +## .. ..$ : int [1:193] 1 75 69 8 140 8 35 17856 38 75 ... +## .. ..$ : int [1:171] 1 4679 2784 1482 11 450 7 134 364 352 ... +## .. ..$ : int [1:221] 1 13 28 332 4 274 6 378 7 211 ... +## .. ..$ : int [1:174] 1 13 1059 14 33 6 2181 2824 32 13 ... +## .. ..$ : int [1:647] 1 6 565 255 5964 875 103 196 167 10614 ... +## .. ..$ : int [1:233] 1 4 86 390 1241 520 6 52 1384 51 ... +## .. ..$ : int [1:162] 1 13 92 124 51 12 9 13 169 38 ... +## .. ..$ : int [1:597] 1 111 28 3431 15 11176 475 455 4127 9 ... +## .. ..$ : int [1:234] 1 1255 1223 5547 1265 2390 1747 8 4 268 ... +## .. ..$ : int [1:51] 1 806 13 43 161 169 4 875 551 17 ... +## .. ..$ : int [1:336] 1 23 3333 7449 7505 4 254 157 34308 7 ... +## .. ..$ : int [1:139] 1 17 19 111 85 1719 1181 3135 201 14 ... +## .. ..$ : int [1:231] 1 14 38 446 1034 9 394 13 435 8 ... +## .. ..$ : int [1:704] 1 14 16 4 840 5582 20 5 4 236 ... +## .. ..$ : int [1:142] 1 14 22 16 23 522 33 314 54 13 ... +## .. ..$ : int [1:861] 1 1710 14 733 1367 1028 81 24 332 48 ... +## .. ..$ : int [1:132] 1 4 229 18 14 248 1844 1422 9 38 ... +## .. ..$ : int [1:122] 1 3420 9 34 230 61 514 7 32 7 ... +## .. ..$ : int [1:570] 1 11 14 4419 3073 14 9061 50 26 1093 ... +## .. ..$ : int [1:55] 1 568 65 9 4689 31 7 4 118 495 ... +## .. ..$ : int [1:214] 1 806 21 13 80 2372 199 4 114 347 ... +## .. ..$ : int [1:103] 1 54 7850 5397 8633 7455 9 2090 32606 23 ... +## .. ..$ : int [1:186] 1 13 244 1713 1681 8 97 134 243 7 ... +## .. ..$ : int [1:113] 1 13 165 219 14 20 33 6 750 17 ... +## .. ..$ : int [1:169] 1 159 13 296 14 22 13 332 6 733 ... +## .. ..$ : int [1:469] 1 14 364 1242 2460 11025 47 43 77 7548 ... +## .. ..$ : int [1:138] 1 1400 168 855 19 12 50 26 76 128 ... +## .. ..$ : int [1:302] 1 101 20 11 63 7564 11468 46 1421 6 ... +## .. ..$ : int [1:766] 1 5011 892 711 12 2774 38 2428 145 11 ... +## .. ..$ : int [1:351] 1 1318 13 191 264 146 4 86 5 64 ... +## .. ..$ : int [1:146] 1 13 974 13 69 8 702 930 143 14 ... +## .. ..$ : int [1:59] 1 13 296 4 20 11 6 4435 5 13 ... +## .. ..$ : int [1:206] 1 209 888 14 22 47 8 30 31 7 ... +## .. ..$ : int [1:107] 1 13 219 14 33 4 12180 22 1413 12 ... +## .. ..$ : int [1:152] 1 591 92 851 42 60 104 44 2644 14 ... +## .. ..$ : int [1:186] 1 13 258 14 20 8 30 6 87 326 ... +## .. ..$ : int [1:431] 1 4 2019 9 149 16 35 221 22 585 ... +## .. ..$ : int [1:147] 1 146 242 31 7 4 1126 2406 2266 451 ... +## .. ..$ : int [1:684] 1 1810 8 516 7732 93 6 227 7 6 ... +## .. ..$ : int [1:383] 1 1028 11 86 8213 14 1327 1210 1124 5205 ... +## .. ..$ : int [1:324] 1 85073 8810 322 7398 5 68 1667 476 24783 ... +## .. ..$ : int [1:252] 1 13 286 1017 76 5 8 30 1202 13 ... +## .. ..$ : int [1:263] 1 48 335 6 337 7 22 1359 5 104 ... +## .. ..$ : int [1:787] 1 6 1380 6733 3453 54 49 432 7 5682 ... +## .. ..$ : int [1:211] 1 14 20 218 290 4 22 12 16 3551 ... +## .. ..$ : int [1:314] 1 49 24 38 56861 1028 1404 10 10 138 ... +## .. ..$ : int [1:118] 1 480 302 18 6 20 7 14 58 6 ... +## .. ..$ : int [1:390] 1 670 5304 1616 97 6 20 40 14 21 ... +## .. ..$ : int [1:132] 1 1756 5663 9 2990 17096 133 177 17 6 ... +## .. ..$ : int [1:710] 1 1065 2474 7 3508 53303 645 113 17 6 ... +## .. ..$ : int [1:306] 1 17 210 14 9 35 6213 431 7 4 ... +## .. ..$ : int [1:167] 1 2500 1040 4 327 1208 44 14 215 28 ... +## .. ..$ : int [1:115] 1 11 4 402 3469 111 7 178 37 69 ... +## .. ..$ : int [1:95] 1 435 8 67 14 17 72 5 61 761 ... +## .. ..$ : int [1:158] 1 31 7 61 118 369 839 14 20 120 ... +## .. ..$ : int [1:156] 1 66 371 17941 50341 373 21 284 16055 2567 ... +## .. ..$ : int [1:82] 1 4 1126 282 13 69 8 67 14 20 ... +## .. ..$ : int [1:502] 1 14 22 7930 236 314 33 35925 5510 750 ... +## .. ..$ : int [1:314] 1 13 144 1260 138 13 520 14 418 7 ... +## .. ..$ : int [1:190] 1 13 92 400 140 46 7 61 96 8 ... +## .. ..$ : int [1:174] 1 61 795 203 30 6 227 7 6 1361 ... +## .. ..$ : int [1:60] 1 18 6 20 19 6 114 40 14 13 ... +## .. ..$ : int [1:145] 1 13 219 14 22 5236 145 137 780 23 ... +## .. ..$ : int [1:214] 1 11 192 5192 34954 125 2139 1253 7 39258 ... +## .. ..$ : int [1:659] 1 541 5156 517 19 4 4791 7 2408 827 ... +## .. ..$ : int [1:408] 1 474 66 66 473 8 67 14 20 5 ... +## .. ..$ : int [1:515] 1 7931 4 425 410 2568 4 876 7 4 ... +## .. ..$ : int [1:461] 1 121 81 13 895 13 473 8 358 14 ... +## .. ..$ : int [1:202] 1 13 66 215 28 1059 6 275 22 39 ... +## .. ..$ : int [1:238] 1 827 11172 81031 10 10 1251 8598 300 19354 ... +## .. ..$ : int [1:170] 1 24 15 76 183 593 11 14 20 21 ... +## .. ..$ : int [1:107] 1 14 20 9 389 10 10 13 16 82810 ... +## .. .. [list output truncated] +## ..$ y: int [1:25000] 1 0 0 1 0 0 1 0 1 0 ... +## $ test :List of 2 +## ..$ x:List of 25000 +## .. ..$ : int [1:68] 1 591 202 14 31 6 717 10 10 18142 ... +## .. ..$ : int [1:260] 1 14 22 3443 6 176 7 5063 88 12 ... +## .. ..$ : int [1:603] 1 111 748 4368 1133 33782 24563 4 87 1551 ... +## .. ..$ : int [1:181] 1 13 1228 119 14 552 7 20 190 14 ... +## .. ..$ : int [1:108] 1 40 49 85 84 1040 146 6 783 254 ... +## .. ..$ : int [1:132] 1 146 427 5718 14 20 218 112 2962 32 ... +## .. ..$ : int [1:761] 1 1822 424 8 30 43 6 173 7 6 ... +## .. ..$ : int [1:180] 1 4 14839 745 86533 912 9 20923 8 83400 ... +## .. ..$ : int [1:134] 1 363 69 6 196 119 1586 19 6514 15614 ... +## .. ..$ : int [1:370] 1 14 22 9 121 4 1354 3135 3882 8 ... +## .. ..$ : int [1:209] 1 1581 34 7908 5082 23 6 1374 1120 7 ... +## .. ..$ : int [1:248] 1 54 13 86 219 14 20 11 4 750 ... +## .. ..$ : int [1:398] 1 449 3214 449 3214 12 66 214 23 61 ... +## .. ..$ : int [1:326] 1 13 645 149 14 88 13 197 12 16 ... +## .. ..$ : int [1:131] 1 6 1301 664 15 1457 6 406 393 23 ... +## .. ..$ : int [1:255] 1 387 72 86 380 46 34 660 300 46 ... +## .. ..$ : int [1:127] 1 39 4142 86 13 296 14 20 13 235 ... +## .. ..$ : int [1:184] 1 1659 23487 3717 9 6 2343 37 456 18 ... +## .. ..$ : int [1:188] 1 13 16 66 12086 56 8 106 54 107 ... +## .. ..$ : int [1:105] 1 208 38 25 28 6 10781 3400 7 1093 ... +## .. ..$ : int [1:230] 1 14 22 16 31 15 13 28 4465 8 ... +## .. ..$ : int [1:137] 1 14 9 31 7 61 1640 910 108 12 ... +## .. ..$ : int [1:88] 1 89 1319 8 798 692 1287 6 736 6 ... +## .. ..$ : int [1:70] 1 2127 1256 8 1686 39 109 8 109 11 ... +## .. ..$ : int [1:170] 1 14598 8415 5968 2102 13005 39 4819 11 5399 ... +## .. ..$ : int [1:305] 1 146 24 252 138 14 22 9 41075 38 ... +## .. ..$ : int [1:273] 1 13 69 332 4692 857 12118 14 3720 5675 ... +## .. ..$ : int [1:134] 1 3799 117 183 16 6 66 52 20 13 ... +## .. ..$ : int [1:232] 1 688 8 6 55 5328 4593 5653 13 219 ... +## .. ..$ : int [1:264] 1 4 145 7 4 288 18 14 20 17806 ... +## .. ..$ : int [1:99] 1 1756 5663 122 6 4796 292 940 14 22 ... +## .. ..$ : int [1:133] 1 48 25 535 15 14 20 9 368 7 ... +## .. ..$ : int [1:121] 1 48 25 28 115 332 4 356 1067 1219 ... +## .. ..$ : int [1:521] 1 48 14 9 24 2699 2561 23 175 1029 ... +## .. ..$ : int [1:133] 1 1018 3577 4150 3188 14598 8 30 35 12789 ... +## .. ..$ : int [1:124] 1 14 9 44 31 7 4 249 102 474 ... +## .. ..$ : int [1:228] 1 14 20 9 434 31 7 4 833 108 ... +## .. ..$ : int [1:159] 1 20936 2688 17 644 961 46 160 480 65 ... +## .. ..$ : int [1:132] 1 449 558 12 100 30 6 55 221 22 ... +## .. ..$ : int [1:141] 1 14 664 16 357 5 179 379 10 10 ... +## .. ..$ : int [1:310] 1 11 14969 6 185 132 584 11 6 686 ... +## .. ..$ : int [1:431] 1 117 30364 738 8 2223 9 160 11 4 ... +## .. ..$ : int [1:214] 1 260 77 6 4279 337 18 111 153 6662 ... +## .. ..$ : int [1:185] 1 13 219 14 5126 20 88 13 244 6 ... +## .. ..$ : int [1:549] 1 2285 1447 2435 15644 2365 2018 18 692 19 ... +## .. ..$ : int [1:136] 1 4 752 7486 16 398 34 72 54 13 ... +## .. ..$ : int [1:89] 1 23 2195 6 513 9 12598 34 6 7472 ... +## .. ..$ : int [1:298] 1 313 7 4 6333 82 573 17 19823 9 ... +## .. ..$ : int [1:127] 1 402 10286 792 448 23 6 1063 868 297 ... +## .. ..$ : int [1:252] 1 13 191 391 138 899 6320 62 967 14 ... +## .. ..$ : int [1:289] 1 86 7 13 144 213 46 15 13 343 ... +## .. ..$ : int [1:125] 1 13 43 332 35 1727 196 733 23 4 ... +## .. ..$ : int [1:64] 1 13 69 210 473 8 67 14 22 5 ... +## .. ..$ : int [1:111] 1 1469 2102 5 2163 26 6 378 7 4 ... +## .. ..$ : int [1:132] 1 12 299 40 129 644 1667 311 830 6 ... +## .. ..$ : int [1:256] 1 14 9 6 318 22 48 25 124 4 ... +## .. ..$ : int [1:100] 1 13 16 55 685 54 14 123 16 6769 ... +## .. ..$ : int [1:152] 1 48 25 447 4 5040 2475 920 1219 6537 ... +## .. ..$ : int [1:203] 1 11 4618 689 69166 51992 34 2643 745 13338 ... +## .. ..$ : int [1:124] 1 449 89 4916 14 20 9 13 92 124 ... +## .. ..$ : int [1:113] 1 13 66 423 4 20 1065 162 87082 21 ... +## .. ..$ : int [1:208] 1 4 969 80 168 55 1081 8 25 38 ... +## .. ..$ : int [1:106] 1 43 191 106 14 227 99 111 211 45 ... +## .. ..$ : int [1:234] 1 66 133 4 785 438 1936 741 1324 5 ... +## .. ..$ : int [1:114] 1 146 770 8 332 32 4 1123 795 23 ... +## .. ..$ : int [1:210] 1 1318 45 77 6 196 58 237 207 236 ... +## .. ..$ : int [1:733] 1 14 20 93 72 104 7 89 13 100 ... +## .. ..$ : int [1:173] 1 61 336 4 632 9 1047 163 5 1036 ... +## .. ..$ : int [1:321] 1 39 4 86 8 4 236 136 7 4 ... +## .. ..$ : int [1:86] 1 14 20 203 15436 977 8 30 23932 5 ... +## .. ..$ : int [1:112] 1 1318 13 447 14 20 14 22 16 1061 ... +## .. ..$ : int [1:195] 1 14 22 188 329 692 74 2756 7 68 ... +## .. ..$ : int [1:101] 1 2676 9 4 243 7 20 36 93 11 ... +## .. ..$ : int [1:194] 1 14 20 9 24 290 4 58 12 304 ... +## .. ..$ : int [1:122] 1 14 20 16 608 17 230 17 102 140 ... +## .. ..$ : int [1:324] 1 4 2474 7 14915 47 8 30 31 7 ... +## .. ..$ : int [1:195] 1 13 1053 4480 234 7 61 113 23 14 ... +## .. ..$ : int [1:257] 1 50 28 77 55 171 87 212 108 11 ... +## .. ..$ : int [1:307] 1 50 186 8 30 6 9557 7 438 23 ... +## .. ..$ : int [1:78] 1 14 20 47 188 8 30 4 433 20 ... +## .. ..$ : int [1:157] 1 19 4 578 1401 7 6799 3236 14 16 ... +## .. ..$ : int [1:213] 1 14915 4 248 20 14915 6 55 2509 5 ... +## .. ..$ : int [1:163] 1 33 2405 197 4 1120 7 14 123 468 ... +## .. ..$ : int [1:122] 1 146 24 83 635 287 15 76 21 14 ... +## .. ..$ : int [1:197] 1 10 10 132 13 43 2488 264 14 20 ... +## .. ..$ : int [1:169] 1 13 122 6 733 18 14 2030 2615 9730 ... +## .. ..$ : int [1:81] 1 73 474 28 8 135 15 13 81 205 ... +## .. ..$ : int [1:242] 1 13 191 79 14 509 125 61 1224 45 ... +## .. ..$ : int [1:218] 1 13 188 5158 8 14 2446 31 16821 2655 ... +## .. ..$ : int [1:193] 1 864 13 124 198 1591 623 23 94 2558 ... +## .. ..$ : int [1:467] 1 1318 133 9 160 87 8894 20 198 33 ... +## .. ..$ : int [1:74] 1 13 104 14 9 6 87 356 969 22 ... +## .. ..$ : int [1:76] 1 114 600 229 6 3592 7 6363 116 24 ... +## .. ..$ : int [1:736] 1 4 3768 356 20 1308 47 1084 4 3241 ... +## .. ..$ : int [1:448] 1 44026 6172 526 34 4 530 16098 5893 46203 ... +## .. ..$ : int [1:200] 1 14 9 6 1332 1253 7 4 592 848 ... +## .. ..$ : int [1:185] 1 13 296 14 20 260 115 332 4 274 ... +## .. ..$ : int [1:124] 1 2787 7056 59 93 14 20 18 72 207 ... +## .. ..$ : int [1:122] 1 216 23 150 89 122 32 7 134 1020 ... +## .. .. [list output truncated] +## ..$ y: int [1:25000] 0 1 1 0 1 1 1 0 0 1 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_imdb(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} + The \code{dataset_imdb_word_index()} function returns a list where the names are words and the values are integer. } diff --git a/man/dataset_mnist.Rd b/man/dataset_mnist.Rd index 50b56f4d1..5c3815579 100644 --- a/man/dataset_mnist.Rd +++ b/man/dataset_mnist.Rd @@ -4,15 +4,44 @@ \alias{dataset_mnist} \title{MNIST database of handwritten digits} \usage{ -dataset_mnist(path = "mnist.npz") +dataset_mnist(path = "mnist.npz", convert = TRUE) } \arguments{ \item{path}{Path where to cache the dataset locally (relative to ~/.keras/datasets).} + +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y}, where \code{x} is an array of grayscale image data with shape (num_samples, 28, 28) and \code{y} is an array of digit labels (integers in range 0-9) with shape (num_samples). + +\if{html}{\out{
}}\preformatted{str(dataset_mnist()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: int [1:60000, 1:28, 1:28] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ y: int [1:60000(1d)] 5 0 4 1 9 2 1 3 1 4 ... +## $ test :List of 2 +## ..$ x: int [1:10000, 1:28, 1:28] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ y: int [1:10000(1d)] 7 2 1 0 4 1 4 9 5 9 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_mnist(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} } \description{ Dataset of 60,000 28x28 grayscale images of the 10 digits, along with a test set of 10,000 images. diff --git a/man/dataset_reuters.Rd b/man/dataset_reuters.Rd index 7a79bc0ca..16e48ddf5 100644 --- a/man/dataset_reuters.Rd +++ b/man/dataset_reuters.Rd @@ -14,7 +14,8 @@ dataset_reuters( seed = 113L, start_char = 1L, oov_char = 2L, - index_from = 3L + index_from = 3L, + convert = TRUE ) dataset_reuters_word_index(path = "reuters_word_index.pkl") @@ -42,12 +43,249 @@ Set to 1 because 0 is usually the padding character.} \code{skip_top} limit will be replaced with this character.} \item{index_from}{index actual words with this index and higher.} + +\item{convert}{When \code{TRUE} (default) the datasets are returned as R arrays. +If \code{FALSE}, objects are returned as NumPy arrays.} } \value{ Lists of training and test data: \verb{train$x, train$y, test$x, test$y} with same format as \code{\link[=dataset_imdb]{dataset_imdb()}}. The \code{dataset_reuters_word_index()} function returns a list where the names are words and the values are integer. e.g. \code{word_index[["giraffe"]]} might return \code{1234}. + +\if{html}{\out{
}}\preformatted{train/ +├─ x +└─ y +test/ +├─ x +└─ y +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_reuters()) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x:List of 8982 +## .. ..$ : int [1:87] 1 27595 28842 8 43 10 447 5 25 207 ... +## .. ..$ : int [1:56] 1 3267 699 3434 2295 56 16784 7511 9 56 ... +## .. ..$ : int [1:139] 1 53 12 284 15 14 272 26 53 959 ... +## .. ..$ : int [1:224] 1 4 686 867 558 4 37 38 309 2276 ... +## .. ..$ : int [1:101] 1 8295 111 8 25 166 40 638 10 436 ... +## .. ..$ : int [1:116] 1 4 37 38 309 213 349 1632 48 193 ... +## .. ..$ : int [1:100] 1 56 5539 925 149 8 16 23 931 3875 ... +## .. ..$ : int [1:100] 1 53 648 26 14 749 26 39 6207 5466 ... +## .. ..$ : int [1:82] 1 178 53 321 26 14 948 26 178 39 ... +## .. ..$ : int [1:106] 1 56 7224 81 40 1175 174 19892 6 1793 ... +## .. ..$ : int [1:31] 1 245 273 207 156 53 74 160 26 14 ... +## .. ..$ : int [1:59] 1 56 141 5618 1607 149 8 16 33 223 ... +## .. ..$ : int [1:65] 1 14786 81 8 16 625 42 120 7 1679 ... +## .. ..$ : int [1:316] 1 248 409 166 1461 1284 3906 8 4 495 ... +## .. ..$ : int [1:527] 1 4 113 23 133 6 433 226 7 1182 ... +## .. ..$ : int [1:76] 1 577 9 355 430 21 4 2222 5 4 ... +## .. ..$ : int [1:114] 1 945 65 111 8 10 498 40 85 2120 ... +## .. ..$ : int [1:17] 1 486 341 785 26 14 482 26 255 606 ... +## .. ..$ : int [1:91] 1 53 19 296 15 14 258 26 53 959 ... +## .. ..$ : int [1:77] 1 7567 851 260 542 159 13 52 29 23 ... +## .. ..$ : int [1:231] 1 779 37 38 465 278 6623 55 900 6 ... +## .. ..$ : int [1:108] 1 73 418 904 2627 2198 8 36 717 271 ... +## .. ..$ : int [1:83] 1 10779 71 8 16 385 6 42 904 103 ... +## .. ..$ : int [1:29] 1 245 273 397 124 53 191 26 14 83 ... +## .. ..$ : int [1:95] 1 29 6 207 156 169 103 858 131 74 ... +## .. ..$ : int [1:110] 1 144 62 2115 451 82 5 37 38 399 ... +## .. ..$ : int [1:23] 1 53 745 26 14 722 26 39 7442 18 ... +## .. ..$ : int [1:373] 1 10 545 856 3931 1187 20189 33 1076 2045 ... +## .. ..$ : int [1:114] 1 178 53 279 26 14 124 26 178 39 ... +## .. ..$ : int [1:354] 1 2163 317 65 131 1462 23 768 1225 15825 ... +## .. ..$ : int [1:133] 1 4 37 38 309 213 8 443 37 38 ... +## .. ..$ : int [1:222] 1 293 270 111 8 16 34 4814 27 3546 ... +## .. ..$ : int [1:571] 1 4 37 38 424 309 415 524 795 6 ... +## .. ..$ : int [1:155] 1 4 1795 232 60 240 128 140 21 68 ... +## .. ..$ : int [1:83] 1 4 37 38 23 6 3186 6526 841 11 ... +## .. ..$ : int [1:208] 1 1961 81 149 56 28762 115 8 16 33 ... +## .. ..$ : int [1:170] 1 1378 234 99 610 60 8 4 60 1543 ... +## .. ..$ : int [1:269] 1 978 66 262 1251 10180 8 107 4 293 ... +## .. ..$ : int [1:74] 1 29 6 94 156 89 67 2115 2453 14 ... +## .. ..$ : int [1:19] 1 486 341 119 26 14 119 26 7 255 ... +## .. ..$ : int [1:23] 1 53 258 26 14 187 26 39 3914 18 ... +## .. ..$ : int [1:78] 1 4 7085 66 253 2776 6 5345 11 15 ... +## .. ..$ : int [1:21] 1 599 1815 299 45 1320 194 198 2041 28 ... +## .. ..$ : int [1:377] 1 496 427 111 450 91 57 6 679 25 ... +## .. ..$ : int [1:104] 1 2856 56 12269 626 450 8 16 40 129 ... +## .. ..$ : int [1:299] 1 4 37 38 431 8 25 1213 1957 5 ... +## .. ..$ : int [1:89] 1 11178 442 101 13 104 34 68 20 217 ... +## .. ..$ : int [1:56] 1 155 822 62 3510 9 188 5104 7 42 ... +## .. ..$ : int [1:94] 1 60 5 130 1461 3366 1896 8 36 2464 ... +## .. ..$ : int [1:139] 1 53 284 26 14 319 39 47 5211 18 ... +## .. ..$ : int [1:118] 1 1479 1197 71 8 25 1479 1197 640 71 ... +## .. ..$ : int [1:36] 1 53 19 1090 15 14 1018 26 39 44 ... +## .. ..$ : int [1:137] 1 2185 921 9 1493 103 4971 1925 8 16 ... +## .. ..$ : int [1:107] 1 53 74 312 26 14 651 10 39 74 ... +## .. ..$ : int [1:83] 1 537 232 1231 537 232 703 111 8 16 ... +## .. ..$ : int [1:66] 1 53 191 26 14 158 26 39 19 3412 ... +## .. ..$ : int [1:70] 1 53 46 142 26 14 46 155 26 39 ... +## .. ..$ : int [1:112] 1 7674 10659 71 8 16 2892 3514 1620 2357 ... +## .. ..$ : int [1:88] 1 2626 141 450 56 2626 626 8 16 64 ... +## .. ..$ : int [1:51] 1 53 767 26 14 124 26 39 72 2756 ... +## .. ..$ : int [1:83] 1 56 735 268 626 71 8 16 41 2049 ... +## .. ..$ : int [1:123] 1 15754 231 81 8 16 638 42 3699 322 ... +## .. ..$ : int [1:17] 1 486 341 312 26 14 312 26 255 219 ... +## .. ..$ : int [1:185] 1 1537 9347 534 45 6 761 13 10 393 ... +## .. ..$ : int [1:84] 1 1284 5682 136 484 5 789 8 54 2395 ... +## .. ..$ : int [1:52] 1 218 430 21 4 2222 5 181 37 38 ... +## .. ..$ : int [1:102] 1 56 5539 925 149 8 25 116 13 12 ... +## .. ..$ : int [1:73] 1 10524 752 13 234 867 247 79 8 16 ... +## .. ..$ : int [1:106] 1 56 1621 3922 9 1229 81 5662 369 25 ... +## .. ..$ : int [1:486] 1 367 40 2575 1470 6 30 7 538 5 ... +## .. ..$ : int [1:107] 1 11633 691 149 8 13762 600 822 28 25 ... +## .. ..$ : int [1:82] 1 53 751 26 14 648 26 39 482 32 ... +## .. ..$ : int [1:263] 1 802 64 10 4478 66 253 5 32 59 ... +## .. ..$ : int [1:172] 1 6475 214 71 8 25 362 23 7326 6 ... +## .. ..$ : int [1:491] 1 569 40 129 306 572 13 25 357 162 ... +## .. ..$ : int [1:190] 1 5985 2861 282 5 2883 9037 28 153 48 ... +## .. ..$ : int [1:143] 1 2173 3174 2841 491 8 2478 3638 2383 3096 ... +## .. ..$ : int [1:62] 1 4 294 259 1613 16 3308 4 198 5 ... +## .. ..$ : int [1:26] 1 4 497 81 8 4 354 598 846 1227 ... +## .. ..$ : int [1:88] 1 12507 111 8 56 9891 11563 5 13733 192 ... +## .. ..$ : int [1:114] 1 1139 357 162 114 513 6 258 11 1232 ... +## .. ..$ : int [1:38] 1 53 272 26 14 158 26 39 32 3125 ... +## .. ..$ : int [1:85] 1 53 284 26 14 684 26 39 19 7103 ... +## .. ..$ : int [1:112] 1 4 37 38 740 291 1098 1641 40 1175 ... +## .. ..$ : int [1:793] 1 37 412 128 140 1431 306 6 449 246 ... +## .. ..$ : int [1:104] 1 178 53 46 142 26 14 46 319 12748 ... +## .. ..$ : int [1:25] 1 53 321 26 14 614 26 39 19 3611 ... +## .. ..$ : int [1:21] 1 486 341 61 19 32 26 14 61 19 ... +## .. ..$ : int [1:101] 1 56 1100 392 149 785 20 324 27 1406 ... +## .. ..$ : int [1:28] 1 53 684 26 14 648 26 39 19 1746 ... +## .. ..$ : int [1:25] 1 27926 1568 81 8 25 166 887 10 142 ... +## .. ..$ : int [1:81] 1 8521 81 384 4 8962 1029 111 8 16 ... +## .. ..$ : int [1:135] 1 53 750 26 14 644 26 39 758 980 ... +## .. ..$ : int [1:73] 1 56 234 1829 81 8 16 40 471 10 ... +## .. ..$ : int [1:62] 1 6120 23 772 6 334 93 187 13 10 ... +## .. ..$ : int [1:18] 1 486 341 158 44 26 14 158 44 26 ... +## .. ..$ : int [1:90] 1 4 237 259 1064 137 1386 13 664 76 ... +## .. ..$ : int [1:266] 1 4263 2162 81 8 24 25 731 1092 5 ... +## .. ..$ : int [1:91] 1 4 248 409 23 133 6 2156 4 106 ... +## .. .. [list output truncated] +## ..$ y: int [1:8982] 3 4 3 4 4 4 4 3 3 16 ... +## $ test :List of 2 +## ..$ x:List of 2246 +## .. ..$ : int [1:145] 1 4 1378 2025 9 697 4622 111 8 25 ... +## .. ..$ : int [1:745] 1 2768 283 122 7 4 89 544 463 29 ... +## .. ..$ : int [1:228] 1 4 309 2276 4759 5 2015 403 1920 33 ... +## .. ..$ : int [1:172] 1 11786 13716 65 9 249 1096 8 16 515 ... +## .. ..$ : int [1:187] 1 470 354 18270 4231 62 2373 509 1687 5138 ... +## .. ..$ : int [1:80] 1 53 134 26 14 102 26 39 5150 18 ... +## .. ..$ : int [1:249] 1 7236 1650 71 8 16 369 99 98 186 ... +## .. ..$ : int [1:118] 1 53 321 26 14 284 26 39 63 5201 ... +## .. ..$ : int [1:123] 1 178 53 74 19 865 15 14 46 353 ... +## .. ..$ : int [1:207] 1 790 752 73 418 81 8 16 40 1954 ... +## .. ..$ : int [1:79] 1 361 372 8 77 62 325 4105 336 5 ... +## .. ..$ : int [1:60] 1 30522 71 8 16 385 4 611 1731 9 ... +## .. ..$ : int [1:206] 1 1719 40 1667 7 10 825 7 1932 349 ... +## .. ..$ : int [1:27] 1 245 273 110 156 53 272 26 14 158 ... +## .. ..$ : int [1:377] 1 987 23 19470 229 198 88 27 45 2289 ... +## .. ..$ : int [1:703] 1 779 260 1165 1971 33 842 203 9 240 ... +## .. ..$ : int [1:45] 1 25012 149 8 16 40 813 21 10 315 ... +## .. ..$ : int [1:27] 1 30279 231 81 8 25 166 887 42 943 ... +## .. ..$ : int [1:79] 1 4 60 5 794 8 16 299 45 1321 ... +## .. ..$ : int [1:47] 1 53 751 26 14 279 26 39 160 1668 ... +## .. ..$ : int [1:103] 1 4 204 60 40 582 61 1588 35 15 ... +## .. ..$ : int [1:73] 1 304 46 47 597 15 14 46 47 318 ... +## .. ..$ : int [1:22] 1 486 341 841 19 32 26 14 751 19 ... +## .. ..$ : int [1:160] 1 15199 1568 81 8 16 23 7316 554 1078 ... +## .. ..$ : int [1:92] 1 1371 40 129 2221 5 2226 4 141 357 ... +## .. ..$ : int [1:27] 1 3840 341 61 19 26 14 61 19 26 ... +## .. ..$ : int [1:259] 1 1615 3055 111 8 25 166 1763 28 10 ... +## .. ..$ : int [1:200] 1 56 2725 71 8 16 792 5342 220 28 ... +## .. ..$ : int [1:182] 1 4 599 283 76 453 166 14538 560 25 ... +## .. ..$ : int [1:32] 1 53 160 26 14 134 26 39 3859 5024 ... +## .. ..$ : int [1:65] 1 53 158 26 14 272 26 39 19 6749 ... +## .. ..$ : int [1:122] 1 1932 48 193 283 463 40 85 553 6 ... +## .. ..$ : int [1:105] 1 56 392 2811 387 149 8 16 625 120 ... +## .. ..$ : int [1:53] 1 346 273 1215 284 53 352 26 14 546 ... +## .. ..$ : int [1:96] 1 599 313 262 3557 2636 8 24 4 231 ... +## .. ..$ : int [1:87] 1 1626 21670 111 8 25 166 5 863 4004 ... +## .. ..$ : int [1:22] 1 9597 204 29726 1209 4 113 101 13 577 ... +## .. ..$ : int [1:69] 1 599 1815 57 2540 2041 6 198 5871 18 ... +## .. ..$ : int [1:93] 1 342 697 149 8 16 2503 4549 10924 71 ... +## .. ..$ : int [1:123] 1 234 3154 71 8 16 369 99 98 39 ... +## .. ..$ : int [1:216] 1 3157 1262 162 281 1271 1555 48 1002 2425 ... +## .. ..$ : int [1:169] 1 130 23 133 6 1227 10 12 59 20 ... +## .. ..$ : int [1:21] 1 486 341 134 19 32 26 14 134 19 ... +## .. ..$ : int [1:373] 1 4 37 38 7982 961 101 202 6 59 ... +## .. ..$ : int [1:46] 1 214 1657 362 81 8 16 40 515 4 ... +## .. ..$ : int [1:711] 1 2330 231 103 1765 25 344 322 31 4142 ... +## .. ..$ : int [1:117] 1 4290 346 1271 156 153 53 46 109 26 ... +## .. ..$ : int [1:104] 1 6636 81 8 16 385 78 11 79 5 ... +## .. ..$ : int [1:17] 1 486 341 425 26 14 425 26 384 219 ... +## .. ..$ : int [1:106] 1 2609 64 10 66 253 5 4823 61 11 ... +## .. ..$ : int [1:35] 1 4 99 232 60 5 1638 4 673 495 ... +## .. ..$ : int [1:166] 1 1621 693 81 56 11458 1089 363 6 501 ... +## .. ..$ : int [1:427] 1 4 2047 4952 654 1579 6 219 410 13 ... +## .. ..$ : int [1:189] 1 56 1925 12784 7 50 1925 8974 56 14115 ... +## .. ..$ : int [1:29] 1 3410 9 16466 231 71 8 16 887 25 ... +## .. ..$ : int [1:168] 1 37 412 2152 5 4 2087 2905 1313 8 ... +## .. ..$ : int [1:160] 1 42 2014 5 4 141 1301 120 7167 23 ... +## .. ..$ : int [1:83] 1 293 1277 111 450 56 22527 626 11159 487 ... +## .. ..$ : int [1:57] 1 945 248 60 8 16 1551 10 2473 475 ... +## .. ..$ : int [1:164] 1 591 262 2273 1270 8 24 130 9 100 ... +## .. ..$ : int [1:98] 1 56 697 643 1639 81 8 4 2155 1593 ... +## .. ..$ : int [1:79] 1 4977 137 4322 732 721 8 16 887 42 ... +## .. ..$ : int [1:52] 1 18059 141 71 8 16 40 1669 25 300 ... +## .. ..$ : int [1:53] 1 681 192 1211 71 8 16 471 4 280 ... +## .. ..$ : int [1:84] 1 6699 2162 71 8 16 40 1128 25 384 ... +## .. ..$ : int [1:49] 1 17393 1051 221 721 71 8 25 166 887 ... +## .. ..$ : int [1:59] 1 53 312 26 14 151 26 39 2543 18 ... +## .. ..$ : int [1:114] 1 4791 1710 859 40 992 126 3451 7 6846 ... +## .. ..$ : int [1:95] 1 19889 13803 647 71 8 16 40 737 1647 ... +## .. ..$ : int [1:443] 1 4 221 182 491 2335 10 3148 5 6217 ... +## .. ..$ : int [1:69] 1 4 174 308 40 5335 242 92 42 1158 ... +## .. ..$ : int [1:48] 1 9041 71 8 1348 324 9041 65 37 38 ... +## .. ..$ : int [1:15] 1 53 119 26 14 147 26 39 3914 18 ... +## .. ..$ : int [1:488] 1 4 294 423 298 350 25 7018 7580 325 ... +## .. ..$ : int [1:342] 1 603 936 1970 96 620 623 1518 202 70 ... +## .. ..$ : int [1:55] 1 109 3242 407 5 332 164 362 9 2332 ... +## .. ..$ : int [1:104] 1 4 740 291 1098 1641 40 1175 10 416 ... +## .. ..$ : int [1:23] 1 53 440 26 14 158 26 39 3978 18 ... +## .. ..$ : int [1:75] 1 11578 81 8 16 40 1300 172 42 3384 ... +## .. ..$ : int [1:91] 1 232 5380 71 8 16 471 4 280 5 ... +## .. ..$ : int [1:53] 1 53 46 312 26 14 74 142 26 39 ... +## .. ..$ : int [1:17] 1 53 296 26 14 296 26 255 346 219 ... +## .. ..$ : int [1:17] 1 486 341 155 26 14 155 26 255 219 ... +## .. ..$ : int [1:243] 1 4 409 60 5 1563 10115 292 73 1001 ... +## .. ..$ : int [1:115] 1 896 1511 227 1137 145 7 432 790 528 ... +## .. ..$ : int [1:493] 1 496 60 623 893 140 55 328 6 302 ... +## .. ..$ : int [1:75] 1 37 38 361 18665 1643 365 1929 2157 7 ... +## .. ..$ : int [1:209] 1 4 113 33 433 117 4 225 78 6 ... +## .. ..$ : int [1:239] 1 1068 9 2094 450 56 4788 626 8 73 ... +## .. ..$ : int [1:63] 1 53 46 196 26 14 46 119 26 39 ... +## .. ..$ : int [1:22] 1 486 341 134 19 32 26 14 134 19 ... +## .. ..$ : int [1:34] 1 8552 1152 647 71 8 25 344 270 5 ... +## .. ..$ : int [1:37] 1 53 46 1012 26 14 46 360 26 39 ... +## .. ..$ : int [1:774] 1 7584 154 43 10 238 2690 13 37 38 ... +## .. ..$ : int [1:21] 1 486 341 63 19 32 26 14 63 19 ... +## .. ..$ : int [1:182] 1 4 490 558 1381 6 1673 2280 66 31 ... +## .. ..$ : int [1:228] 1 2605 4478 66 253 2446 6 10 878 466 ... +## .. ..$ : int [1:27] 1 245 273 207 156 53 147 26 14 119 ... +## .. ..$ : int [1:333] 1 1855 81 265 5259 3568 118 371 36 299 ... +## .. .. [list output truncated] +## ..$ y: int [1:2246] 3 10 1 4 4 3 3 3 3 3 ... + +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{str(dataset_reuters(convert = FALSE)) +}\if{html}{\out{
}} + +\if{html}{\out{
}}\preformatted{## List of 2 +## $ train:List of 2 +## ..$ x: +## ..$ y: +## $ test :List of 2 +## ..$ x: +## ..$ y: + +}\if{html}{\out{
}} } \description{ Dataset of 11,228 newswires from Reuters, labeled over 46 topics. As with diff --git a/man/layer_tfsm.Rd b/man/layer_tfsm.Rd index ba6b79213..470628661 100644 --- a/man/layer_tfsm.Rd +++ b/man/layer_tfsm.Rd @@ -59,8 +59,8 @@ model |> export_savedmodel("path/to/artifact") ## Output Type: ## TensorSpec(shape=(None, 10), dtype=tf.float32, name=None) ## Captures: -## 127701998122768: TensorSpec(shape=(), dtype=tf.resource, name=None) -## 127701998119504: TensorSpec(shape=(), dtype=tf.resource, name=None) +## 138425115270160: TensorSpec(shape=(), dtype=tf.resource, name=None) +## 138425115263824: TensorSpec(shape=(), dtype=tf.resource, name=None) }\if{html}{\out{}} From a14bd68e2bf750e6ed74c808854bf7cda4ed759f Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 7 Oct 2025 17:42:54 -0400 Subject: [PATCH 3/3] limit `list.len` in docs --- man/callback_reduce_lr_on_plateau.Rd | 2 +- man/dataset_imdb.Rd | 186 ------------------ man/dataset_reuters.Rd | 186 ------------------ man/layer_tfsm.Rd | 4 +- ...learning_rate_schedule_polynomial_decay.Rd | 2 +- man/roxygen/meta.R | 9 + 6 files changed, 13 insertions(+), 376 deletions(-) diff --git a/man/callback_reduce_lr_on_plateau.Rd b/man/callback_reduce_lr_on_plateau.Rd index dc0459cdb..cefbd6318 100644 --- a/man/callback_reduce_lr_on_plateau.Rd +++ b/man/callback_reduce_lr_on_plateau.Rd @@ -10,7 +10,7 @@ callback_reduce_lr_on_plateau( patience = 10L, verbose = 0L, mode = "auto", - min_delta = 1e-04, + min_delta = 0.0001, cooldown = 0L, min_lr = 0, ... diff --git a/man/dataset_imdb.Rd b/man/dataset_imdb.Rd index 491d3e6e8..fc8b5d299 100644 --- a/man/dataset_imdb.Rd +++ b/man/dataset_imdb.Rd @@ -74,99 +74,6 @@ The \code{y} data includes a set of integer labels (0 or 1). ## .. ..$ : int [1:550] 1 4 18609 16085 33 2804 4 2040 432 111 ... ## .. ..$ : int [1:147] 1 249 1323 7 61 113 10 10 13 1637 ... ## .. ..$ : int [1:43] 1 778 128 74 12 630 163 15 4 1766 ... -## .. ..$ : int [1:123] 1 6740 365 1234 5 1156 354 11 14 5327 ... -## .. ..$ : int [1:562] 1 4 14906 716 4 65 7 4 689 4367 ... -## .. ..$ : int [1:233] 1 43 188 46 5 566 264 51 6 530 ... -## .. ..$ : int [1:130] 1 14 20 47 111 439 3445 19 12 15 ... -## .. ..$ : int [1:450] 1 785 189 438 47 110 142 7 6 7475 ... -## .. ..$ : int [1:99] 1 54 13 1610 14 20 13 69 55 364 ... -## .. ..$ : int [1:117] 1 13 119 954 189 1554 13 92 459 48 ... -## .. ..$ : int [1:238] 1 259 37 100 169 1653 1107 11 14 418 ... -## .. ..$ : int [1:109] 1 503 20 33 118 481 302 26 184 52 ... -## .. ..$ : int [1:129] 1 6 964 437 7 58 43 1402 11 6 ... -## .. ..$ : int [1:163] 1 7092 1662 11 4 1749 9 4 2165 4 ... -## .. ..$ : int [1:752] 1 33 4 5673 7 4 61433 194 33815 3089 ... -## .. ..$ : int [1:212] 1 13 28 64 69 4 8742 7 319 14 ... -## .. ..$ : int [1:177] 1 3432 26 9 6 1220 731 939 44 6 ... -## .. ..$ : int [1:129] 1 617 11 3875 17 72274 14 966 78 20 ... -## .. ..$ : int [1:140] 1 466 49 2036 204 2442 40 4 6724 732 ... -## .. ..$ : int [1:256] 1 13 784 886 857 15 135 142 40 23826 ... -## .. ..$ : int [1:888] 1 4 712 19 17268 50361 19984 963 16272 26 ... -## .. ..$ : int [1:93] 1 4 204 7610 20 16 93 11 9075 19 ... -## .. ..$ : int [1:142] 1 14 9 6 55 641 2854 212 44 6 ... -## .. ..$ : int [1:220] 1 4 288 310 3202 7 241 672 4 41852 ... -## .. ..$ : int [1:193] 1 75 69 8 140 8 35 17856 38 75 ... -## .. ..$ : int [1:171] 1 4679 2784 1482 11 450 7 134 364 352 ... -## .. ..$ : int [1:221] 1 13 28 332 4 274 6 378 7 211 ... -## .. ..$ : int [1:174] 1 13 1059 14 33 6 2181 2824 32 13 ... -## .. ..$ : int [1:647] 1 6 565 255 5964 875 103 196 167 10614 ... -## .. ..$ : int [1:233] 1 4 86 390 1241 520 6 52 1384 51 ... -## .. ..$ : int [1:162] 1 13 92 124 51 12 9 13 169 38 ... -## .. ..$ : int [1:597] 1 111 28 3431 15 11176 475 455 4127 9 ... -## .. ..$ : int [1:234] 1 1255 1223 5547 1265 2390 1747 8 4 268 ... -## .. ..$ : int [1:51] 1 806 13 43 161 169 4 875 551 17 ... -## .. ..$ : int [1:336] 1 23 3333 7449 7505 4 254 157 34308 7 ... -## .. ..$ : int [1:139] 1 17 19 111 85 1719 1181 3135 201 14 ... -## .. ..$ : int [1:231] 1 14 38 446 1034 9 394 13 435 8 ... -## .. ..$ : int [1:704] 1 14 16 4 840 5582 20 5 4 236 ... -## .. ..$ : int [1:142] 1 14 22 16 23 522 33 314 54 13 ... -## .. ..$ : int [1:861] 1 1710 14 733 1367 1028 81 24 332 48 ... -## .. ..$ : int [1:132] 1 4 229 18 14 248 1844 1422 9 38 ... -## .. ..$ : int [1:122] 1 3420 9 34 230 61 514 7 32 7 ... -## .. ..$ : int [1:570] 1 11 14 4419 3073 14 9061 50 26 1093 ... -## .. ..$ : int [1:55] 1 568 65 9 4689 31 7 4 118 495 ... -## .. ..$ : int [1:214] 1 806 21 13 80 2372 199 4 114 347 ... -## .. ..$ : int [1:103] 1 54 7850 5397 8633 7455 9 2090 32606 23 ... -## .. ..$ : int [1:186] 1 13 244 1713 1681 8 97 134 243 7 ... -## .. ..$ : int [1:113] 1 13 165 219 14 20 33 6 750 17 ... -## .. ..$ : int [1:169] 1 159 13 296 14 22 13 332 6 733 ... -## .. ..$ : int [1:469] 1 14 364 1242 2460 11025 47 43 77 7548 ... -## .. ..$ : int [1:138] 1 1400 168 855 19 12 50 26 76 128 ... -## .. ..$ : int [1:302] 1 101 20 11 63 7564 11468 46 1421 6 ... -## .. ..$ : int [1:766] 1 5011 892 711 12 2774 38 2428 145 11 ... -## .. ..$ : int [1:351] 1 1318 13 191 264 146 4 86 5 64 ... -## .. ..$ : int [1:146] 1 13 974 13 69 8 702 930 143 14 ... -## .. ..$ : int [1:59] 1 13 296 4 20 11 6 4435 5 13 ... -## .. ..$ : int [1:206] 1 209 888 14 22 47 8 30 31 7 ... -## .. ..$ : int [1:107] 1 13 219 14 33 4 12180 22 1413 12 ... -## .. ..$ : int [1:152] 1 591 92 851 42 60 104 44 2644 14 ... -## .. ..$ : int [1:186] 1 13 258 14 20 8 30 6 87 326 ... -## .. ..$ : int [1:431] 1 4 2019 9 149 16 35 221 22 585 ... -## .. ..$ : int [1:147] 1 146 242 31 7 4 1126 2406 2266 451 ... -## .. ..$ : int [1:684] 1 1810 8 516 7732 93 6 227 7 6 ... -## .. ..$ : int [1:383] 1 1028 11 86 8213 14 1327 1210 1124 5205 ... -## .. ..$ : int [1:324] 1 85073 8810 322 7398 5 68 1667 476 24783 ... -## .. ..$ : int [1:252] 1 13 286 1017 76 5 8 30 1202 13 ... -## .. ..$ : int [1:263] 1 48 335 6 337 7 22 1359 5 104 ... -## .. ..$ : int [1:787] 1 6 1380 6733 3453 54 49 432 7 5682 ... -## .. ..$ : int [1:211] 1 14 20 218 290 4 22 12 16 3551 ... -## .. ..$ : int [1:314] 1 49 24 38 56861 1028 1404 10 10 138 ... -## .. ..$ : int [1:118] 1 480 302 18 6 20 7 14 58 6 ... -## .. ..$ : int [1:390] 1 670 5304 1616 97 6 20 40 14 21 ... -## .. ..$ : int [1:132] 1 1756 5663 9 2990 17096 133 177 17 6 ... -## .. ..$ : int [1:710] 1 1065 2474 7 3508 53303 645 113 17 6 ... -## .. ..$ : int [1:306] 1 17 210 14 9 35 6213 431 7 4 ... -## .. ..$ : int [1:167] 1 2500 1040 4 327 1208 44 14 215 28 ... -## .. ..$ : int [1:115] 1 11 4 402 3469 111 7 178 37 69 ... -## .. ..$ : int [1:95] 1 435 8 67 14 17 72 5 61 761 ... -## .. ..$ : int [1:158] 1 31 7 61 118 369 839 14 20 120 ... -## .. ..$ : int [1:156] 1 66 371 17941 50341 373 21 284 16055 2567 ... -## .. ..$ : int [1:82] 1 4 1126 282 13 69 8 67 14 20 ... -## .. ..$ : int [1:502] 1 14 22 7930 236 314 33 35925 5510 750 ... -## .. ..$ : int [1:314] 1 13 144 1260 138 13 520 14 418 7 ... -## .. ..$ : int [1:190] 1 13 92 400 140 46 7 61 96 8 ... -## .. ..$ : int [1:174] 1 61 795 203 30 6 227 7 6 1361 ... -## .. ..$ : int [1:60] 1 18 6 20 19 6 114 40 14 13 ... -## .. ..$ : int [1:145] 1 13 219 14 22 5236 145 137 780 23 ... -## .. ..$ : int [1:214] 1 11 192 5192 34954 125 2139 1253 7 39258 ... -## .. ..$ : int [1:659] 1 541 5156 517 19 4 4791 7 2408 827 ... -## .. ..$ : int [1:408] 1 474 66 66 473 8 67 14 20 5 ... -## .. ..$ : int [1:515] 1 7931 4 425 410 2568 4 876 7 4 ... -## .. ..$ : int [1:461] 1 121 81 13 895 13 473 8 358 14 ... -## .. ..$ : int [1:202] 1 13 66 215 28 1059 6 275 22 39 ... -## .. ..$ : int [1:238] 1 827 11172 81031 10 10 1251 8598 300 19354 ... -## .. ..$ : int [1:170] 1 24 15 76 183 593 11 14 20 21 ... -## .. ..$ : int [1:107] 1 14 20 9 389 10 10 13 16 82810 ... ## .. .. [list output truncated] ## ..$ y: int [1:25000] 1 0 0 1 0 0 1 0 1 0 ... ## $ test :List of 2 @@ -177,99 +84,6 @@ The \code{y} data includes a set of integer labels (0 or 1). ## .. ..$ : int [1:181] 1 13 1228 119 14 552 7 20 190 14 ... ## .. ..$ : int [1:108] 1 40 49 85 84 1040 146 6 783 254 ... ## .. ..$ : int [1:132] 1 146 427 5718 14 20 218 112 2962 32 ... -## .. ..$ : int [1:761] 1 1822 424 8 30 43 6 173 7 6 ... -## .. ..$ : int [1:180] 1 4 14839 745 86533 912 9 20923 8 83400 ... -## .. ..$ : int [1:134] 1 363 69 6 196 119 1586 19 6514 15614 ... -## .. ..$ : int [1:370] 1 14 22 9 121 4 1354 3135 3882 8 ... -## .. ..$ : int [1:209] 1 1581 34 7908 5082 23 6 1374 1120 7 ... -## .. ..$ : int [1:248] 1 54 13 86 219 14 20 11 4 750 ... -## .. ..$ : int [1:398] 1 449 3214 449 3214 12 66 214 23 61 ... -## .. ..$ : int [1:326] 1 13 645 149 14 88 13 197 12 16 ... -## .. ..$ : int [1:131] 1 6 1301 664 15 1457 6 406 393 23 ... -## .. ..$ : int [1:255] 1 387 72 86 380 46 34 660 300 46 ... -## .. ..$ : int [1:127] 1 39 4142 86 13 296 14 20 13 235 ... -## .. ..$ : int [1:184] 1 1659 23487 3717 9 6 2343 37 456 18 ... -## .. ..$ : int [1:188] 1 13 16 66 12086 56 8 106 54 107 ... -## .. ..$ : int [1:105] 1 208 38 25 28 6 10781 3400 7 1093 ... -## .. ..$ : int [1:230] 1 14 22 16 31 15 13 28 4465 8 ... -## .. ..$ : int [1:137] 1 14 9 31 7 61 1640 910 108 12 ... -## .. ..$ : int [1:88] 1 89 1319 8 798 692 1287 6 736 6 ... -## .. ..$ : int [1:70] 1 2127 1256 8 1686 39 109 8 109 11 ... -## .. ..$ : int [1:170] 1 14598 8415 5968 2102 13005 39 4819 11 5399 ... -## .. ..$ : int [1:305] 1 146 24 252 138 14 22 9 41075 38 ... -## .. ..$ : int [1:273] 1 13 69 332 4692 857 12118 14 3720 5675 ... -## .. ..$ : int [1:134] 1 3799 117 183 16 6 66 52 20 13 ... -## .. ..$ : int [1:232] 1 688 8 6 55 5328 4593 5653 13 219 ... -## .. ..$ : int [1:264] 1 4 145 7 4 288 18 14 20 17806 ... -## .. ..$ : int [1:99] 1 1756 5663 122 6 4796 292 940 14 22 ... -## .. ..$ : int [1:133] 1 48 25 535 15 14 20 9 368 7 ... -## .. ..$ : int [1:121] 1 48 25 28 115 332 4 356 1067 1219 ... -## .. ..$ : int [1:521] 1 48 14 9 24 2699 2561 23 175 1029 ... -## .. ..$ : int [1:133] 1 1018 3577 4150 3188 14598 8 30 35 12789 ... -## .. ..$ : int [1:124] 1 14 9 44 31 7 4 249 102 474 ... -## .. ..$ : int [1:228] 1 14 20 9 434 31 7 4 833 108 ... -## .. ..$ : int [1:159] 1 20936 2688 17 644 961 46 160 480 65 ... -## .. ..$ : int [1:132] 1 449 558 12 100 30 6 55 221 22 ... -## .. ..$ : int [1:141] 1 14 664 16 357 5 179 379 10 10 ... -## .. ..$ : int [1:310] 1 11 14969 6 185 132 584 11 6 686 ... -## .. ..$ : int [1:431] 1 117 30364 738 8 2223 9 160 11 4 ... -## .. ..$ : int [1:214] 1 260 77 6 4279 337 18 111 153 6662 ... -## .. ..$ : int [1:185] 1 13 219 14 5126 20 88 13 244 6 ... -## .. ..$ : int [1:549] 1 2285 1447 2435 15644 2365 2018 18 692 19 ... -## .. ..$ : int [1:136] 1 4 752 7486 16 398 34 72 54 13 ... -## .. ..$ : int [1:89] 1 23 2195 6 513 9 12598 34 6 7472 ... -## .. ..$ : int [1:298] 1 313 7 4 6333 82 573 17 19823 9 ... -## .. ..$ : int [1:127] 1 402 10286 792 448 23 6 1063 868 297 ... -## .. ..$ : int [1:252] 1 13 191 391 138 899 6320 62 967 14 ... -## .. ..$ : int [1:289] 1 86 7 13 144 213 46 15 13 343 ... -## .. ..$ : int [1:125] 1 13 43 332 35 1727 196 733 23 4 ... -## .. ..$ : int [1:64] 1 13 69 210 473 8 67 14 22 5 ... -## .. ..$ : int [1:111] 1 1469 2102 5 2163 26 6 378 7 4 ... -## .. ..$ : int [1:132] 1 12 299 40 129 644 1667 311 830 6 ... -## .. ..$ : int [1:256] 1 14 9 6 318 22 48 25 124 4 ... -## .. ..$ : int [1:100] 1 13 16 55 685 54 14 123 16 6769 ... -## .. ..$ : int [1:152] 1 48 25 447 4 5040 2475 920 1219 6537 ... -## .. ..$ : int [1:203] 1 11 4618 689 69166 51992 34 2643 745 13338 ... -## .. ..$ : int [1:124] 1 449 89 4916 14 20 9 13 92 124 ... -## .. ..$ : int [1:113] 1 13 66 423 4 20 1065 162 87082 21 ... -## .. ..$ : int [1:208] 1 4 969 80 168 55 1081 8 25 38 ... -## .. ..$ : int [1:106] 1 43 191 106 14 227 99 111 211 45 ... -## .. ..$ : int [1:234] 1 66 133 4 785 438 1936 741 1324 5 ... -## .. ..$ : int [1:114] 1 146 770 8 332 32 4 1123 795 23 ... -## .. ..$ : int [1:210] 1 1318 45 77 6 196 58 237 207 236 ... -## .. ..$ : int [1:733] 1 14 20 93 72 104 7 89 13 100 ... -## .. ..$ : int [1:173] 1 61 336 4 632 9 1047 163 5 1036 ... -## .. ..$ : int [1:321] 1 39 4 86 8 4 236 136 7 4 ... -## .. ..$ : int [1:86] 1 14 20 203 15436 977 8 30 23932 5 ... -## .. ..$ : int [1:112] 1 1318 13 447 14 20 14 22 16 1061 ... -## .. ..$ : int [1:195] 1 14 22 188 329 692 74 2756 7 68 ... -## .. ..$ : int [1:101] 1 2676 9 4 243 7 20 36 93 11 ... -## .. ..$ : int [1:194] 1 14 20 9 24 290 4 58 12 304 ... -## .. ..$ : int [1:122] 1 14 20 16 608 17 230 17 102 140 ... -## .. ..$ : int [1:324] 1 4 2474 7 14915 47 8 30 31 7 ... -## .. ..$ : int [1:195] 1 13 1053 4480 234 7 61 113 23 14 ... -## .. ..$ : int [1:257] 1 50 28 77 55 171 87 212 108 11 ... -## .. ..$ : int [1:307] 1 50 186 8 30 6 9557 7 438 23 ... -## .. ..$ : int [1:78] 1 14 20 47 188 8 30 4 433 20 ... -## .. ..$ : int [1:157] 1 19 4 578 1401 7 6799 3236 14 16 ... -## .. ..$ : int [1:213] 1 14915 4 248 20 14915 6 55 2509 5 ... -## .. ..$ : int [1:163] 1 33 2405 197 4 1120 7 14 123 468 ... -## .. ..$ : int [1:122] 1 146 24 83 635 287 15 76 21 14 ... -## .. ..$ : int [1:197] 1 10 10 132 13 43 2488 264 14 20 ... -## .. ..$ : int [1:169] 1 13 122 6 733 18 14 2030 2615 9730 ... -## .. ..$ : int [1:81] 1 73 474 28 8 135 15 13 81 205 ... -## .. ..$ : int [1:242] 1 13 191 79 14 509 125 61 1224 45 ... -## .. ..$ : int [1:218] 1 13 188 5158 8 14 2446 31 16821 2655 ... -## .. ..$ : int [1:193] 1 864 13 124 198 1591 623 23 94 2558 ... -## .. ..$ : int [1:467] 1 1318 133 9 160 87 8894 20 198 33 ... -## .. ..$ : int [1:74] 1 13 104 14 9 6 87 356 969 22 ... -## .. ..$ : int [1:76] 1 114 600 229 6 3592 7 6363 116 24 ... -## .. ..$ : int [1:736] 1 4 3768 356 20 1308 47 1084 4 3241 ... -## .. ..$ : int [1:448] 1 44026 6172 526 34 4 530 16098 5893 46203 ... -## .. ..$ : int [1:200] 1 14 9 6 1332 1253 7 4 592 848 ... -## .. ..$ : int [1:185] 1 13 296 14 20 260 115 332 4 274 ... -## .. ..$ : int [1:124] 1 2787 7056 59 93 14 20 18 72 207 ... -## .. ..$ : int [1:122] 1 216 23 150 89 122 32 7 134 1020 ... ## .. .. [list output truncated] ## ..$ y: int [1:25000] 0 1 1 0 1 1 1 0 0 1 ... diff --git a/man/dataset_reuters.Rd b/man/dataset_reuters.Rd index 16e48ddf5..e07172675 100644 --- a/man/dataset_reuters.Rd +++ b/man/dataset_reuters.Rd @@ -73,99 +73,6 @@ test/ ## .. ..$ : int [1:224] 1 4 686 867 558 4 37 38 309 2276 ... ## .. ..$ : int [1:101] 1 8295 111 8 25 166 40 638 10 436 ... ## .. ..$ : int [1:116] 1 4 37 38 309 213 349 1632 48 193 ... -## .. ..$ : int [1:100] 1 56 5539 925 149 8 16 23 931 3875 ... -## .. ..$ : int [1:100] 1 53 648 26 14 749 26 39 6207 5466 ... -## .. ..$ : int [1:82] 1 178 53 321 26 14 948 26 178 39 ... -## .. ..$ : int [1:106] 1 56 7224 81 40 1175 174 19892 6 1793 ... -## .. ..$ : int [1:31] 1 245 273 207 156 53 74 160 26 14 ... -## .. ..$ : int [1:59] 1 56 141 5618 1607 149 8 16 33 223 ... -## .. ..$ : int [1:65] 1 14786 81 8 16 625 42 120 7 1679 ... -## .. ..$ : int [1:316] 1 248 409 166 1461 1284 3906 8 4 495 ... -## .. ..$ : int [1:527] 1 4 113 23 133 6 433 226 7 1182 ... -## .. ..$ : int [1:76] 1 577 9 355 430 21 4 2222 5 4 ... -## .. ..$ : int [1:114] 1 945 65 111 8 10 498 40 85 2120 ... -## .. ..$ : int [1:17] 1 486 341 785 26 14 482 26 255 606 ... -## .. ..$ : int [1:91] 1 53 19 296 15 14 258 26 53 959 ... -## .. ..$ : int [1:77] 1 7567 851 260 542 159 13 52 29 23 ... -## .. ..$ : int [1:231] 1 779 37 38 465 278 6623 55 900 6 ... -## .. ..$ : int [1:108] 1 73 418 904 2627 2198 8 36 717 271 ... -## .. ..$ : int [1:83] 1 10779 71 8 16 385 6 42 904 103 ... -## .. ..$ : int [1:29] 1 245 273 397 124 53 191 26 14 83 ... -## .. ..$ : int [1:95] 1 29 6 207 156 169 103 858 131 74 ... -## .. ..$ : int [1:110] 1 144 62 2115 451 82 5 37 38 399 ... -## .. ..$ : int [1:23] 1 53 745 26 14 722 26 39 7442 18 ... -## .. ..$ : int [1:373] 1 10 545 856 3931 1187 20189 33 1076 2045 ... -## .. ..$ : int [1:114] 1 178 53 279 26 14 124 26 178 39 ... -## .. ..$ : int [1:354] 1 2163 317 65 131 1462 23 768 1225 15825 ... -## .. ..$ : int [1:133] 1 4 37 38 309 213 8 443 37 38 ... -## .. ..$ : int [1:222] 1 293 270 111 8 16 34 4814 27 3546 ... -## .. ..$ : int [1:571] 1 4 37 38 424 309 415 524 795 6 ... -## .. ..$ : int [1:155] 1 4 1795 232 60 240 128 140 21 68 ... -## .. ..$ : int [1:83] 1 4 37 38 23 6 3186 6526 841 11 ... -## .. ..$ : int [1:208] 1 1961 81 149 56 28762 115 8 16 33 ... -## .. ..$ : int [1:170] 1 1378 234 99 610 60 8 4 60 1543 ... -## .. ..$ : int [1:269] 1 978 66 262 1251 10180 8 107 4 293 ... -## .. ..$ : int [1:74] 1 29 6 94 156 89 67 2115 2453 14 ... -## .. ..$ : int [1:19] 1 486 341 119 26 14 119 26 7 255 ... -## .. ..$ : int [1:23] 1 53 258 26 14 187 26 39 3914 18 ... -## .. ..$ : int [1:78] 1 4 7085 66 253 2776 6 5345 11 15 ... -## .. ..$ : int [1:21] 1 599 1815 299 45 1320 194 198 2041 28 ... -## .. ..$ : int [1:377] 1 496 427 111 450 91 57 6 679 25 ... -## .. ..$ : int [1:104] 1 2856 56 12269 626 450 8 16 40 129 ... -## .. ..$ : int [1:299] 1 4 37 38 431 8 25 1213 1957 5 ... -## .. ..$ : int [1:89] 1 11178 442 101 13 104 34 68 20 217 ... -## .. ..$ : int [1:56] 1 155 822 62 3510 9 188 5104 7 42 ... -## .. ..$ : int [1:94] 1 60 5 130 1461 3366 1896 8 36 2464 ... -## .. ..$ : int [1:139] 1 53 284 26 14 319 39 47 5211 18 ... -## .. ..$ : int [1:118] 1 1479 1197 71 8 25 1479 1197 640 71 ... -## .. ..$ : int [1:36] 1 53 19 1090 15 14 1018 26 39 44 ... -## .. ..$ : int [1:137] 1 2185 921 9 1493 103 4971 1925 8 16 ... -## .. ..$ : int [1:107] 1 53 74 312 26 14 651 10 39 74 ... -## .. ..$ : int [1:83] 1 537 232 1231 537 232 703 111 8 16 ... -## .. ..$ : int [1:66] 1 53 191 26 14 158 26 39 19 3412 ... -## .. ..$ : int [1:70] 1 53 46 142 26 14 46 155 26 39 ... -## .. ..$ : int [1:112] 1 7674 10659 71 8 16 2892 3514 1620 2357 ... -## .. ..$ : int [1:88] 1 2626 141 450 56 2626 626 8 16 64 ... -## .. ..$ : int [1:51] 1 53 767 26 14 124 26 39 72 2756 ... -## .. ..$ : int [1:83] 1 56 735 268 626 71 8 16 41 2049 ... -## .. ..$ : int [1:123] 1 15754 231 81 8 16 638 42 3699 322 ... -## .. ..$ : int [1:17] 1 486 341 312 26 14 312 26 255 219 ... -## .. ..$ : int [1:185] 1 1537 9347 534 45 6 761 13 10 393 ... -## .. ..$ : int [1:84] 1 1284 5682 136 484 5 789 8 54 2395 ... -## .. ..$ : int [1:52] 1 218 430 21 4 2222 5 181 37 38 ... -## .. ..$ : int [1:102] 1 56 5539 925 149 8 25 116 13 12 ... -## .. ..$ : int [1:73] 1 10524 752 13 234 867 247 79 8 16 ... -## .. ..$ : int [1:106] 1 56 1621 3922 9 1229 81 5662 369 25 ... -## .. ..$ : int [1:486] 1 367 40 2575 1470 6 30 7 538 5 ... -## .. ..$ : int [1:107] 1 11633 691 149 8 13762 600 822 28 25 ... -## .. ..$ : int [1:82] 1 53 751 26 14 648 26 39 482 32 ... -## .. ..$ : int [1:263] 1 802 64 10 4478 66 253 5 32 59 ... -## .. ..$ : int [1:172] 1 6475 214 71 8 25 362 23 7326 6 ... -## .. ..$ : int [1:491] 1 569 40 129 306 572 13 25 357 162 ... -## .. ..$ : int [1:190] 1 5985 2861 282 5 2883 9037 28 153 48 ... -## .. ..$ : int [1:143] 1 2173 3174 2841 491 8 2478 3638 2383 3096 ... -## .. ..$ : int [1:62] 1 4 294 259 1613 16 3308 4 198 5 ... -## .. ..$ : int [1:26] 1 4 497 81 8 4 354 598 846 1227 ... -## .. ..$ : int [1:88] 1 12507 111 8 56 9891 11563 5 13733 192 ... -## .. ..$ : int [1:114] 1 1139 357 162 114 513 6 258 11 1232 ... -## .. ..$ : int [1:38] 1 53 272 26 14 158 26 39 32 3125 ... -## .. ..$ : int [1:85] 1 53 284 26 14 684 26 39 19 7103 ... -## .. ..$ : int [1:112] 1 4 37 38 740 291 1098 1641 40 1175 ... -## .. ..$ : int [1:793] 1 37 412 128 140 1431 306 6 449 246 ... -## .. ..$ : int [1:104] 1 178 53 46 142 26 14 46 319 12748 ... -## .. ..$ : int [1:25] 1 53 321 26 14 614 26 39 19 3611 ... -## .. ..$ : int [1:21] 1 486 341 61 19 32 26 14 61 19 ... -## .. ..$ : int [1:101] 1 56 1100 392 149 785 20 324 27 1406 ... -## .. ..$ : int [1:28] 1 53 684 26 14 648 26 39 19 1746 ... -## .. ..$ : int [1:25] 1 27926 1568 81 8 25 166 887 10 142 ... -## .. ..$ : int [1:81] 1 8521 81 384 4 8962 1029 111 8 16 ... -## .. ..$ : int [1:135] 1 53 750 26 14 644 26 39 758 980 ... -## .. ..$ : int [1:73] 1 56 234 1829 81 8 16 40 471 10 ... -## .. ..$ : int [1:62] 1 6120 23 772 6 334 93 187 13 10 ... -## .. ..$ : int [1:18] 1 486 341 158 44 26 14 158 44 26 ... -## .. ..$ : int [1:90] 1 4 237 259 1064 137 1386 13 664 76 ... -## .. ..$ : int [1:266] 1 4263 2162 81 8 24 25 731 1092 5 ... -## .. ..$ : int [1:91] 1 4 248 409 23 133 6 2156 4 106 ... ## .. .. [list output truncated] ## ..$ y: int [1:8982] 3 4 3 4 4 4 4 3 3 16 ... ## $ test :List of 2 @@ -176,99 +83,6 @@ test/ ## .. ..$ : int [1:172] 1 11786 13716 65 9 249 1096 8 16 515 ... ## .. ..$ : int [1:187] 1 470 354 18270 4231 62 2373 509 1687 5138 ... ## .. ..$ : int [1:80] 1 53 134 26 14 102 26 39 5150 18 ... -## .. ..$ : int [1:249] 1 7236 1650 71 8 16 369 99 98 186 ... -## .. ..$ : int [1:118] 1 53 321 26 14 284 26 39 63 5201 ... -## .. ..$ : int [1:123] 1 178 53 74 19 865 15 14 46 353 ... -## .. ..$ : int [1:207] 1 790 752 73 418 81 8 16 40 1954 ... -## .. ..$ : int [1:79] 1 361 372 8 77 62 325 4105 336 5 ... -## .. ..$ : int [1:60] 1 30522 71 8 16 385 4 611 1731 9 ... -## .. ..$ : int [1:206] 1 1719 40 1667 7 10 825 7 1932 349 ... -## .. ..$ : int [1:27] 1 245 273 110 156 53 272 26 14 158 ... -## .. ..$ : int [1:377] 1 987 23 19470 229 198 88 27 45 2289 ... -## .. ..$ : int [1:703] 1 779 260 1165 1971 33 842 203 9 240 ... -## .. ..$ : int [1:45] 1 25012 149 8 16 40 813 21 10 315 ... -## .. ..$ : int [1:27] 1 30279 231 81 8 25 166 887 42 943 ... -## .. ..$ : int [1:79] 1 4 60 5 794 8 16 299 45 1321 ... -## .. ..$ : int [1:47] 1 53 751 26 14 279 26 39 160 1668 ... -## .. ..$ : int [1:103] 1 4 204 60 40 582 61 1588 35 15 ... -## .. ..$ : int [1:73] 1 304 46 47 597 15 14 46 47 318 ... -## .. ..$ : int [1:22] 1 486 341 841 19 32 26 14 751 19 ... -## .. ..$ : int [1:160] 1 15199 1568 81 8 16 23 7316 554 1078 ... -## .. ..$ : int [1:92] 1 1371 40 129 2221 5 2226 4 141 357 ... -## .. ..$ : int [1:27] 1 3840 341 61 19 26 14 61 19 26 ... -## .. ..$ : int [1:259] 1 1615 3055 111 8 25 166 1763 28 10 ... -## .. ..$ : int [1:200] 1 56 2725 71 8 16 792 5342 220 28 ... -## .. ..$ : int [1:182] 1 4 599 283 76 453 166 14538 560 25 ... -## .. ..$ : int [1:32] 1 53 160 26 14 134 26 39 3859 5024 ... -## .. ..$ : int [1:65] 1 53 158 26 14 272 26 39 19 6749 ... -## .. ..$ : int [1:122] 1 1932 48 193 283 463 40 85 553 6 ... -## .. ..$ : int [1:105] 1 56 392 2811 387 149 8 16 625 120 ... -## .. ..$ : int [1:53] 1 346 273 1215 284 53 352 26 14 546 ... -## .. ..$ : int [1:96] 1 599 313 262 3557 2636 8 24 4 231 ... -## .. ..$ : int [1:87] 1 1626 21670 111 8 25 166 5 863 4004 ... -## .. ..$ : int [1:22] 1 9597 204 29726 1209 4 113 101 13 577 ... -## .. ..$ : int [1:69] 1 599 1815 57 2540 2041 6 198 5871 18 ... -## .. ..$ : int [1:93] 1 342 697 149 8 16 2503 4549 10924 71 ... -## .. ..$ : int [1:123] 1 234 3154 71 8 16 369 99 98 39 ... -## .. ..$ : int [1:216] 1 3157 1262 162 281 1271 1555 48 1002 2425 ... -## .. ..$ : int [1:169] 1 130 23 133 6 1227 10 12 59 20 ... -## .. ..$ : int [1:21] 1 486 341 134 19 32 26 14 134 19 ... -## .. ..$ : int [1:373] 1 4 37 38 7982 961 101 202 6 59 ... -## .. ..$ : int [1:46] 1 214 1657 362 81 8 16 40 515 4 ... -## .. ..$ : int [1:711] 1 2330 231 103 1765 25 344 322 31 4142 ... -## .. ..$ : int [1:117] 1 4290 346 1271 156 153 53 46 109 26 ... -## .. ..$ : int [1:104] 1 6636 81 8 16 385 78 11 79 5 ... -## .. ..$ : int [1:17] 1 486 341 425 26 14 425 26 384 219 ... -## .. ..$ : int [1:106] 1 2609 64 10 66 253 5 4823 61 11 ... -## .. ..$ : int [1:35] 1 4 99 232 60 5 1638 4 673 495 ... -## .. ..$ : int [1:166] 1 1621 693 81 56 11458 1089 363 6 501 ... -## .. ..$ : int [1:427] 1 4 2047 4952 654 1579 6 219 410 13 ... -## .. ..$ : int [1:189] 1 56 1925 12784 7 50 1925 8974 56 14115 ... -## .. ..$ : int [1:29] 1 3410 9 16466 231 71 8 16 887 25 ... -## .. ..$ : int [1:168] 1 37 412 2152 5 4 2087 2905 1313 8 ... -## .. ..$ : int [1:160] 1 42 2014 5 4 141 1301 120 7167 23 ... -## .. ..$ : int [1:83] 1 293 1277 111 450 56 22527 626 11159 487 ... -## .. ..$ : int [1:57] 1 945 248 60 8 16 1551 10 2473 475 ... -## .. ..$ : int [1:164] 1 591 262 2273 1270 8 24 130 9 100 ... -## .. ..$ : int [1:98] 1 56 697 643 1639 81 8 4 2155 1593 ... -## .. ..$ : int [1:79] 1 4977 137 4322 732 721 8 16 887 42 ... -## .. ..$ : int [1:52] 1 18059 141 71 8 16 40 1669 25 300 ... -## .. ..$ : int [1:53] 1 681 192 1211 71 8 16 471 4 280 ... -## .. ..$ : int [1:84] 1 6699 2162 71 8 16 40 1128 25 384 ... -## .. ..$ : int [1:49] 1 17393 1051 221 721 71 8 25 166 887 ... -## .. ..$ : int [1:59] 1 53 312 26 14 151 26 39 2543 18 ... -## .. ..$ : int [1:114] 1 4791 1710 859 40 992 126 3451 7 6846 ... -## .. ..$ : int [1:95] 1 19889 13803 647 71 8 16 40 737 1647 ... -## .. ..$ : int [1:443] 1 4 221 182 491 2335 10 3148 5 6217 ... -## .. ..$ : int [1:69] 1 4 174 308 40 5335 242 92 42 1158 ... -## .. ..$ : int [1:48] 1 9041 71 8 1348 324 9041 65 37 38 ... -## .. ..$ : int [1:15] 1 53 119 26 14 147 26 39 3914 18 ... -## .. ..$ : int [1:488] 1 4 294 423 298 350 25 7018 7580 325 ... -## .. ..$ : int [1:342] 1 603 936 1970 96 620 623 1518 202 70 ... -## .. ..$ : int [1:55] 1 109 3242 407 5 332 164 362 9 2332 ... -## .. ..$ : int [1:104] 1 4 740 291 1098 1641 40 1175 10 416 ... -## .. ..$ : int [1:23] 1 53 440 26 14 158 26 39 3978 18 ... -## .. ..$ : int [1:75] 1 11578 81 8 16 40 1300 172 42 3384 ... -## .. ..$ : int [1:91] 1 232 5380 71 8 16 471 4 280 5 ... -## .. ..$ : int [1:53] 1 53 46 312 26 14 74 142 26 39 ... -## .. ..$ : int [1:17] 1 53 296 26 14 296 26 255 346 219 ... -## .. ..$ : int [1:17] 1 486 341 155 26 14 155 26 255 219 ... -## .. ..$ : int [1:243] 1 4 409 60 5 1563 10115 292 73 1001 ... -## .. ..$ : int [1:115] 1 896 1511 227 1137 145 7 432 790 528 ... -## .. ..$ : int [1:493] 1 496 60 623 893 140 55 328 6 302 ... -## .. ..$ : int [1:75] 1 37 38 361 18665 1643 365 1929 2157 7 ... -## .. ..$ : int [1:209] 1 4 113 33 433 117 4 225 78 6 ... -## .. ..$ : int [1:239] 1 1068 9 2094 450 56 4788 626 8 73 ... -## .. ..$ : int [1:63] 1 53 46 196 26 14 46 119 26 39 ... -## .. ..$ : int [1:22] 1 486 341 134 19 32 26 14 134 19 ... -## .. ..$ : int [1:34] 1 8552 1152 647 71 8 25 344 270 5 ... -## .. ..$ : int [1:37] 1 53 46 1012 26 14 46 360 26 39 ... -## .. ..$ : int [1:774] 1 7584 154 43 10 238 2690 13 37 38 ... -## .. ..$ : int [1:21] 1 486 341 63 19 32 26 14 63 19 ... -## .. ..$ : int [1:182] 1 4 490 558 1381 6 1673 2280 66 31 ... -## .. ..$ : int [1:228] 1 2605 4478 66 253 2446 6 10 878 466 ... -## .. ..$ : int [1:27] 1 245 273 207 156 53 147 26 14 119 ... -## .. ..$ : int [1:333] 1 1855 81 265 5259 3568 118 371 36 299 ... ## .. .. [list output truncated] ## ..$ y: int [1:2246] 3 10 1 4 4 3 3 3 3 3 ... diff --git a/man/layer_tfsm.Rd b/man/layer_tfsm.Rd index 470628661..ef9337506 100644 --- a/man/layer_tfsm.Rd +++ b/man/layer_tfsm.Rd @@ -59,8 +59,8 @@ model |> export_savedmodel("path/to/artifact") ## Output Type: ## TensorSpec(shape=(None, 10), dtype=tf.float32, name=None) ## Captures: -## 138425115270160: TensorSpec(shape=(), dtype=tf.resource, name=None) -## 138425115263824: TensorSpec(shape=(), dtype=tf.resource, name=None) +## 131333390867856: TensorSpec(shape=(), dtype=tf.resource, name=None) +## 131333390868240: TensorSpec(shape=(), dtype=tf.resource, name=None) }\if{html}{\out{}} diff --git a/man/learning_rate_schedule_polynomial_decay.Rd b/man/learning_rate_schedule_polynomial_decay.Rd index 327b60e5c..cccccea16 100644 --- a/man/learning_rate_schedule_polynomial_decay.Rd +++ b/man/learning_rate_schedule_polynomial_decay.Rd @@ -7,7 +7,7 @@ learning_rate_schedule_polynomial_decay( initial_learning_rate, decay_steps, - end_learning_rate = 1e-04, + end_learning_rate = 0.0001, power = 1, cycle = FALSE, name = "PolynomialDecay" diff --git a/man/roxygen/meta.R b/man/roxygen/meta.R index 9b0fb06f7..afb267bb7 100644 --- a/man/roxygen/meta.R +++ b/man/roxygen/meta.R @@ -13,6 +13,15 @@ local({ } if (isNamespaceLoaded('roxygen2')) register_tether_tag_parser() else setHook(packageEvent("roxygen2", "onLoad"), register_tether_tag_parser) + + options( + paged.print = FALSE, + str = utils::strOptions(list.len = 6), + width = 76, + scipen = 1, # default ==0, positive valus bias fixed, negative bias scientific + keras.plot.history.theme_bw = TRUE, + pillar.print_min = 5 + ) }) local({