n
Code
ngram(test_data, n = 0L, n_min = 0L, delim = "_")
Condition
Error in `ngram()`:
! n must be a positive integer.
Code
ngram(test_data, n = -1L, n_min = -1L, delim = "_")
Condition
Error in `ngram()`:
! n must be a positive integer.
Code
prep(step_ngram(recipe(~., data = mtcars), num_tokens = -4))
Condition
Error in `step_ngram()`:
Caused by error in `prep()`:
! `num_tokens` must be a whole number larger than or equal to 0, not the number -4.
Code
prep(step_ngram(recipe(~., data = mtcars), min_num_tokens = -4))
Condition
Error in `step_ngram()`:
Caused by error in `prep()`:
! `min_num_tokens` must be a whole number larger than or equal to 0, not the number -4.
Code
prep(step_ngram(recipe(~., data = mtcars), delim = -4))
Condition
Error in `step_ngram()`:
Caused by error in `prep()`:
! `delim` must be a single string, not the number -4.
Code
bake(trained, new_data = tokenized_test_data[, -1])
Condition
Error in `step_ngram()`:
! The following required column is missing from `new_data`: text.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* ngramming for: <none>
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Training information
Training data contained 32 data points and no incomplete rows.
-- Operations
* ngramming for: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 1
-- Operations
* Tokenization for: text
* ngramming for: text
Code
prep(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 1
-- Training information
Training data contained 2 data points and no incomplete rows.
-- Operations
* Tokenization for: text | Trained
* ngramming for: text | Trained
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.