textmodel_doc2vec | R Documentation |
Create distributed representation of documents as weighted word vectors.
textmodel_doc2vec(
x,
model,
normalize = FALSE,
weights = 1,
pattern = NULL,
group_data = FALSE,
...
)
x |
a quanteda::tokens or quanteda::dfm object. |
model |
a textmodel_wordvector object. |
normalize |
if |
weights |
weight the word vectors by user-provided values; either a single value or multiple values sorted in the same order as the word vectors. |
pattern |
quanteda::pattern to select words to apply |
group_data |
if |
... |
additional arguments passed to quanteda::object2id. |
Returns a textmodel_docvector object with the following elements:
values |
a matrix for document vectors. |
dim |
the size of the document vectors. |
concatenator |
the concatenator in |
docvars |
document variables copied from |
normalize |
if the document vectors are normalized. |
call |
the command used to execute the function. |
version |
the version of the wordvector package. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.