Description Usage Arguments Value
View source: R/bind_numerical_vars.R
Add numerical variables to the document term matrices such as follower count, favourites, and reach.
1 2 3 4 5 6 7 8 9 10 | bind_numerical_vars(
labelled_raw,
unlabelled_raw,
full_labelled_dtm,
train_labelled_dtm,
valid_labelled_dtm,
unlabelled_dtm,
numerical_vars,
val_split = 0.2
)
|
labelled_raw |
Original labelled dataframe before any pre-processing. |
unlabelled_raw |
Original unlabelled datafame before any pre-processing. |
full_labelled_dtm |
Full labelled document term matrix. |
train_labelled_dtm |
Training labelled document term matrix. |
valid_labelled_dtm |
Validation labelled document term matrix. |
unlabelled_dtm |
Unlabelled document term matrix. |
numerical_vars |
List of numerical variables to include. |
val_split |
The amount of training data that should be included in the validation set. Must be the same as in create_dt_matrices function. Default: 0.2. |
A complete labelled document-term matrix, a labelled document-term matrix split into training and validation sets, and an unlabelled document-term matrix used for predictions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.