Section 2

docx

School

University of Notre Dame *

*We aren’t endorsed by this school

Course

412

Subject

Statistics

Date

Apr 3, 2024

Type

docx

Pages

5

Uploaded by ProfPencil13535

Report
Section 2 Saving your progress Up until the due date, you can go in and out of each section Quiz as many times as necessary. Your answers will be automatically be saved as long as you don't click the Submit Quiz button. Once you click Submit Quiz, you cannot resume the quiz attempt. To complete your assignment, you must click the Submit Quiz button at the bottom of the page. [0 Question 1 1 pts Let us use the dplyr and tidytext packages to explore the words used in the review. Use the unnest_tokens function from tidytext to tokenize the reviews and the following dplyr functions to organize the data: select, group_by, ungroup and count. What is the median number of words in reviews? [0 Question 2 1 pts Now, let us explore valence of the words used in reviews. Use the ‘bing’ dictionary to classify words in reviews into positive and negative. The bing dictionary of words can be accessed using tidytext::get_sentiments(‘bing’). What is the total number of positive words in all the reviews? 141,222
Question 3 1pts Among all the review words categorized as either positive or negative (using the ‘bing’ dictionary), what proportion are positive? Question 4 1pts Now, let us examine the proportion of positive words in reviews for each rating. Of the five possible review ratings, which has the least proportion of positive words? Ask yourself if the answer make sense. ® 2 o4 o6 o8 o 10 Question 5 2 pts Next, let us examine the emotions expressed in the reviews using the “nrc” dictionary. You can access the “nrc” dictionary from nrc.csv file accompanying this assignment. How many words reflect surprise? ® a3
. Question 6 1 pts Based on the code run for the previous question, how many words reflect “disgust”? Question 7 1pts The ‘afinn’ dictionary scores the sentiment of words. Use this dictionary to determine the sentiment of each review. You can access the “afinn” dictionary from afinn.csv file accompanying this assignment. What is the average sentiment score? Question 8 1pts One would expect a positive sentiment to be related to higher ratings for the dress. To test this hypothesis, examine the correlation between sentiment for each review and the corresponding rating? What is the correlation coefficient?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
| Question 9 2 pts Which of the following review ids have a sentiment score of -3 or lower? Select one or more correct answers. (If you are curious, you may also want to take a look at the review to understand the reason for the low sentiment score). 0 623 0 1473 0 124668 0 159690 0 168863 Question 10 2 pts What is the average sentiment score (based on the ‘afinn’ dictionary)? Quiz saved at 4:02pm Submit Quiz