Description Usage Arguments Details Value See Also
The goal in this dataset is to predict the number of stars given in a product review taken from Amazon.com in four different categories: books, dvds, electronics and kitchen.
1 2 | createAmazonSentimentStars(file = getfilepath("amazonsentimentstars.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 21669 reviews, 1009925 unigram and bigram features are given in a sparse matrix X, along with a vector y containing the star rating 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" numeric; star rating
"domains" factor; domain/category for each review
createAmazonSentiment
, 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.