laser.embedding.prcomp | R Documentation |
prcomp
object fitted to the LASER embedding representations
of tweet texts contained in the training and validation data used
to obtain the ensemble classifier distributed with
the politicaltweets
package
laser.embedding.prcomp
A prcomp
object, which is a list with the following elements:
standard deviations of the principal components
a matrix
of variable loadings. Row names "e0001", ..., "e1024"; column names "PC1", ..., "PC300"
FALSE
, since no centering applied
FALSE
, since no scaling applied
## Not run:
# create fake 'test' observation (1-row matrix)
X <- matrix(
rnorm(1024)
, nrow = 1
# column names must be "e0001", ..., "e1024"
, dimnames = list(c("test"), sprintf("e%04d", 1:1024))
)
# use precomp predict method to obtain PCs
predict(laser.embedding.prcomp, newdata = ndat)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.