Description Usage Arguments Details Value See Also
The goal in this dataset is to predict binary (positive/negative) sentiment from product reviews taken from Amazon.com in four different categories: books, dvds, electronics and kitchen.
1 2 | createAmazonSentiment(file = getfilepath("amazonsentiment.rds"),
write = TRUE, read = TRUE)
|
file |
character; path/filename to write data file to |
write |
logical; should the dataset be written to disk for later use? (default: TRUE) |
read |
logical; should we try to read the dataset from the specified location first? (default: TRUE) |
For 27677 reviews, 1110349 unigram and bigram features are given in a sparse matrix X, along with a label vector y and a vector indicating the domain. Note the data is NOT a data.table
, but sparse matrix generated by sparseMatrix
.
Task: Classification: Use X to predict y, possibly in a domain adaptation setting.
List containing:
"X" dgCMatrix
; sparse matrix with count of unigram and bigram features
"y" factor; labels
"domains" factor; domain/category for each review
createAmazonSentimentStars
, http://www.cs.jhu.edu/~mdredze/datasets/sentiment/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.