Question

In: Computer Science

1 Question 1 Suppose a tweet is represented as a tuple (tweet id, Boolean, Boolean). The...

1 Question 1
Suppose a tweet is represented as a tuple (tweet id, Boolean, Boolean). The second Boolean element will be True if the tweet matches Twitter REST API Query otherwise, it will be False. The third Boolean element will be True if the tweet content is positive (relevant to the topic of interest); Otherwise, it will be False.
The whole twitter space is represented as the set of tweets:
Suppose the crawled tweets using Twitter REST API Query is represented as the set of tweets: M = {(4, True, False), (7, True, False), (8, True, False), (10, True, True), (11, True, True), (13, True, True), (17, True, False)} Suppose the set of tweets from randomly sampled users is: D0= {(3, False, False), (4, True, False), (5, True, True), (8, True, False), (11, True, True), (12, False, False), (13, True, True) , (14, True, False), (15, False, True)}
Give the above sampled tweets, calculate the approximate values of the three metrics, including API recall, quality recall, and quality precision.

2 Question 2
Suppose a tweet is represented as a tuple (tweet id, Boolean, Boolean). The second Boolean element will be True if the tweet matches Twitter REST API Query otherwise, it will be False. The third Boolean element will be True if the tweet content is positive (relevant to the topic of interest); Otherwise, it will be False.
The whole twitter space is represented as the set of tweets:
Suppose the crawled tweets using Twitter REST API Query is represented as the set of tweets: M = {(2, True, False), (3, True, True), (6, True, True), (9, True, False), (14, True, False)} Suppose the set of tweets from randomly sampled users is: D0 = {(1, False, False), (4, True, True), (6, True, True), (9, True, False), (10, False, True), (12, True, False), (13, True, False), (14, True, False), (15, True, True)}
Give the above sampled tweets, calculate the approximate values of the three metrics, including API recall, quality recall, and quality precision.

Solutions

Expert Solution

Answer:
Data Mining Question:
As we can see that we have whole set of Twitter space is represented from the mentioned 2 sets of tweets.

Total there are the following unique tweet IDs from the 2 sets.

3, 4, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17

API recall is the fraction of the tweets that are successfully retrieved by API.

The tweets from the whole set is(only showing the ids): 3, 4, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17

Out of this API got the tweets with ids: 4, 7, 8, 10, 11, 13, 17

Therefore API recall is: 7/12

Quality recall is the fraction of the relevant(quality) tweets of the relevant total tweet set.
The relevant tweet from the whole set is(only showing the ids): 5, 10, 11, 13, 15

Out of this API got the tweets with ids: 10, 11, 13
Therefore API recall is: 3/5

Quality precision is the fraction of the retrieved(quality) tweets that are successfully retrieved by API.

Total tweet retrieved by API(only showing the ids): 4, 7, 8, 10, 11, 13, 17

The relevant tweet got by API: 10, 11, 13

Therefore Quality precision is: 3/7

The difference between precision and recall is that:

precision counts the fraction of relevance among the retrieved documents whereas
recall counts the fraction of relevance among the whole set of documents.
Note: i write the question num1 only

i hope you can understand this answer.


Related Solutions

In python this structure can be represented by a set of tuples, where each tuple has...
In python this structure can be represented by a set of tuples, where each tuple has two elements. The following two lines would build the set given above and the print it. >>> L = [(’dog’,’white’), (’cat’,’black’),(’mouse’,’black’)] >>> f = set(L) >>> print(f) {(’cat’, ’black’), (’dog’, ’white’), (’mouse’, ’black’)} In the example, first we store the tuples into a list, and then we create a set with those tuples. There are obviously countless other ways to initialize f and get...
Question 1: Processing Compound Data: Binary Trees A binary tree is a tuple with the following...
Question 1: Processing Compound Data: Binary Trees A binary tree is a tuple with the following recursive structure   ("btree", [val, left_tree, right_tree]) where first part of the tuple is a string "btree" and second part of the tuple is a list in which val is the value at the root and left_tree and right_tree are the binary trees for the left and right children or ("btree",[]) for the empty tree.   (A) Implement a binary tree ADT. Type Name Description Create...
VBA question, write a function check keyword in a string. Question: Function sentimentCalc(tweet As String) As...
VBA question, write a function check keyword in a string. Question: Function sentimentCalc(tweet As String) As Integer This function should check each word in the tweet and if the word exists as one of the keywords in the positive list or negative list it should impact the overall sentiment value. The positive list and negative list words exist in the keywords sheet. Access the keywords as ranges within your VBA code. The case of the word is inconsequential. For instance,...
Python 3 question Suppose that a directed and weighted graph represented as vertex-list, how could it...
Python 3 question Suppose that a directed and weighted graph represented as vertex-list, how could it perform uniform cost search by using priority queue?
1. Suppose the demand for coffee mugs is represented by the following demand curve: Qd =...
1. Suppose the demand for coffee mugs is represented by the following demand curve: Qd = 50 – 2P. Further, suppose that the current price is $5. a. (5 points) What is the current quantity demanded? Show your work. b. (15 points) Calculate the current price elasticity of demand and show all your work. Interpret the number you calculated (I’m looking for more than just “elastic” or “inelastic". c. Suppose when the price of ice cream is $2 there are...
1. Suppose the variable x is represented by a standard normal distribution. What is the probability...
1. Suppose the variable x is represented by a standard normal distribution. What is the probability of x < -0.6? Please specify your answer in decimal terms and round your answer to the nearest hundredth (e.g., enter 12 percent as 0.12). 2. Suppose the variable x is represented by a standard normal distribution. What value of x is at the 90th percentile of the distribution? Equivalently, what is the value for which there is a probability of 0.90 that x...
1. Use Boolean algebra to simplify the following Boolean expressions to expressions containing a minimum number...
1. Use Boolean algebra to simplify the following Boolean expressions to expressions containing a minimum number of literals: (a) A’C’ + A’BC + B’C (b) (A + B + C)’(ABC)’ (c) ABC’ + AC (d) A’B’D + A’C’D + BD (e) (A’ + B)’(A’ + C’)’(AB’C)’ (f) (AE + A’B’)(C’D’ + CD) + (AC)’ 2. Obtain the truth table of the function F = (AB + C)(B + AC), express the function F in sum-of-minterms and product-of-maxterms forms, and express...
Question 1 - Create a class named Student that has fields for an ID number, number...
Question 1 - Create a class named Student that has fields for an ID number, number of credit hours earned, and number of points earned. (For example, many schools compute grade point averages based on a scale of 4, so a three-credit-hour class in which a student earns an A is worth 12 points.) Include methods to assign values to all fields. A Student also has a field for grade point average. Include a method to compute the grade point...
QUESTION 1 Consider the Boolean function F(x, y) = x + y, how many cells in...
QUESTION 1 Consider the Boolean function F(x, y) = x + y, how many cells in the Kmap representing this function have value of “1”? A. 3 B. 2 C. 4 D. 1 10 points    QUESTION 2 Using Kmap for simplification, we can select multiple smaller groups (instead of a larger group) as long as all “1” are selected. A. False B. True 10 points    QUESTION 3 In Kmap representation, how many values of “0” and “1” two...
1.     Suppose the United States economy is represented by the following equations: Z = C + I...
1.     Suppose the United States economy is represented by the following equations: Z = C + I + G            C = 100 + .YD                     T = 200                     I = 30 YD = Y - T                 G = 100 Suppose that the wage and price setting relations are given by W = Pe(1-u) P = (1+μ) W a.      If P = Pe and the mark-up is 20% find the real wage b.     Calculate the natural rate of unemployment c.      Calculate the real wage and the natural rate of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT