a) Solve 9.3.1-a (normalize the ratings based on a threshold), 9.3.1-e f 9 h 3 2...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a) Solve 9.3.1-a (normalize the ratings based on a threshold), 9.3.1-e f 9 h 3 2 A B C 4 2 b 5 CO CT 3 4 1 d e 5 1 3 1 3 2 1 4 5 3 Figure 9.8: A utility matrix for exercises Exercise 9.3.1: Figure 9.8 is a utility matrix, representing the ratings, on a 1-5 star scale, of eight items, a through h, by three users A, B, and C. Compute the following from the data of this matrix. (a) Treating the utility matrix as boolean, compute the Jaccard distance be- tween each pair of users. (e) Normalize the matrix by subtracting from each nonblank entry the average value for its user. b) Describe one strategy that is used to make a utility matrix less sparse Acti Go to 2) a) Describe at least one mechanism that ensures that data is not lost in Spark when a hardware/software failure occurs. b) From a resource (i.e., disk, memory, CPU) managing perspective, which Hadoop nodes should be chosen to run Spark tasks? Specifically, which type of tasks can co-exist with Spark and which ones should not be using the same node as Spark? c) Implement (in python only, without actual Storm) a solution that would compute streaming queries average for a specified window. For example, to compute a 4-value windowed average that moves 2 tuples at a time, you can use the following line (make sure that your code supports other sizes as well). You are not allowed to first read the entire input before producing output, because the input stream is infinite. Instead, you should compute and print the output as the data arrives. cat mydata | python storm.py 4 2 This can be tested in your own environment, without Linux, using the following code: fd = open('mydata', 'r') sys.stdin = fd for line in sys.stdin: Assuming that mydata file contains (one value per line, no error checking is necessary) 5 3 6 11 # Your code goes here. 8 4 6 3 7 Your command above should output the following three averages (representing an average of (5,3,6,11), (6,11,8,4), (8,4,6,3)): 6.25 7.25 5.25 The last window only contains 6, 3, 7 and cannot output an average until more data arrives. a) Solve 9.3.1-a (normalize the ratings based on a threshold), 9.3.1-e f 9 h 3 2 A B C 4 2 b 5 CO CT 3 4 1 d e 5 1 3 1 3 2 1 4 5 3 Figure 9.8: A utility matrix for exercises Exercise 9.3.1: Figure 9.8 is a utility matrix, representing the ratings, on a 1-5 star scale, of eight items, a through h, by three users A, B, and C. Compute the following from the data of this matrix. (a) Treating the utility matrix as boolean, compute the Jaccard distance be- tween each pair of users. (e) Normalize the matrix by subtracting from each nonblank entry the average value for its user. b) Describe one strategy that is used to make a utility matrix less sparse Acti Go to 2) a) Describe at least one mechanism that ensures that data is not lost in Spark when a hardware/software failure occurs. b) From a resource (i.e., disk, memory, CPU) managing perspective, which Hadoop nodes should be chosen to run Spark tasks? Specifically, which type of tasks can co-exist with Spark and which ones should not be using the same node as Spark? c) Implement (in python only, without actual Storm) a solution that would compute streaming queries average for a specified window. For example, to compute a 4-value windowed average that moves 2 tuples at a time, you can use the following line (make sure that your code supports other sizes as well). You are not allowed to first read the entire input before producing output, because the input stream is infinite. Instead, you should compute and print the output as the data arrives. cat mydata | python storm.py 4 2 This can be tested in your own environment, without Linux, using the following code: fd = open('mydata', 'r') sys.stdin = fd for line in sys.stdin: Assuming that mydata file contains (one value per line, no error checking is necessary) 5 3 6 11 # Your code goes here. 8 4 6 3 7 Your command above should output the following three averages (representing an average of (5,3,6,11), (6,11,8,4), (8,4,6,3)): 6.25 7.25 5.25 The last window only contains 6, 3, 7 and cannot output an average until more data arrives.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
On January 4, 2024, Runyan Bakery paid $324 million for 10 million shares of Lavery Labeling Company common stock. The investment represents a 30% interest in the net assets of Lavery and gave Runyan...
-
Read the case study and answer the question below with a one page response. What does a SWOT analysis reveal about the overall attractiveness of Under Armours situation? Founded in 1996 by former...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
CASE STUDY 1: Facebook, Cambridge Analytica and Trump Scandal: Lessonfor Government, Business, Consumers and Voters. In early 2018, Facebook admitted to mishandling datafrom over 50 million Facebook...
-
Explain the advantage of polarized sunglasses over normal tinted sunglasses.
-
Which one of the following lists only includes amounts that are components of earned income for RRSP purposes Automobile standby charge salespersons expenses and resource royalties Business income or...
-
Home Realty, Incorporated, has been operating for three years and is owned by three investors. J. Doe owns 60 percent of the total outstanding stock of 9,000 shares and is the managing executive in...
-
Suppose the population of Area Y is relatively young while that of Area O is relatively old, but everything else about the two areas is equal. a. Would interest rates likely be the same or different...
-
Jungleland, Inc., acquired 1,000 of the 4,000 shares of Clemmons Corporation for $300 each on January 1,2024 . The book value of Jungleland's share of Clemmons's identiflable net assets was $275,000...
-
Based on the information provided in the case, illustrate the pricing game between Sony and Microsoft using a 2-by-2 payoff matrix when Sony and Microsoft charge for their games $399, or lower price...
-
A spacecraft moves along a path described by the parametric equations shown below for the first 200 s after launch. Here, x and y are measured in meters, and t is measured in seconds. Find the...
-
In 2019, Susan (44 years old) is a highly successful architect and is covered by an employee-sponsored plan. Her husband, Dan (47 years old), however, is a Ph.D. student and unemployed. Compute the...
-
Leslie participates in IBOs nonqualified deferred compensation plan. For 2019, she is deferring 10 percent of her $300,000 annual salary. Based on her deemed investment choice, Leslie expects to earn...
-
Michael is single and 35 years old. He is a participant in his employers sponsored retirement plan. How much can Michael contribute to a Roth IRA in 2019 in each of the following alternative...
-
Under the Healthy Start scheme, low-income women in the United Kingdom who are pregnant or have a child under 4 years of age can get free vouchers every week to spend on milk, fruit and vegetables,...
-
Harriet and Harry Combs (both 37 years old) are married and both want to contribute to a Roth IRA. In 2019, their AGI before any IRA contribution deductions is $50,000. Harriet earned $46,000 and...
-
1.) Consider the sphere: (X + 1) + y+(-3) = 4 (a) What are the center and radius of this sphere? (b) Find an equation of the circle (if any) where the sphere intersects the three coordinate planes....
-
Dr. Chan obtained a $15,000 demand loan at prime plus 1.5% on September 13 from the Bank of Montreal to purchase a new dental X-ray machine. Fixed payments of $700 will be deducted from the dentists...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1 and 2. On September 1, Irene opened a retail store that specializes in sports car...
-
Jason and Mary are married taxpayers in 2012. They are both under age 65 and in good health. For this tax year, they have a total of $41,000 in wages and $500 in interest income. Jason and Mary's...
-
Mallory Corporation has a calendar year-end. The corporation has paid estimated payments of $10,000 during 2012 but still owes an additional $5,000 for its 2012 tax year. a. When is the 2012 tax...
-
Identify the primary purposes of an initial client interview.
-
Define unbundled legal services.
-
Identify the kinds of resources included in a basic family law library.
Study smarter with the SolutionInn App