subject
Engineering, 19.11.2019 04:31 samueladetoro54

The file contains names of reviewers and their reviews of different restaurants in the comma separated format. the first string is the name of the reviewer followed by a name of a restaurant and its rating. you are required to write a python program that computes a similarity score between any two reviewers using euclidean distances. an example data from the restaurant_reviews. txt file is given below: pete wellsworth’s reviews are: 'rooster and owl': 3.0, 'el sapo cuban social club': 4.0, 'punjab grill': 3.0, 'shibumi': 5.0,'mama chang': 3.5 jay samuel’s reviews are: 'el sapo cuban social club': 4.5, 'mama chang': 1.0, 'shibumi': 4.0the euclidean distance between jay samuel and pete wellsworth is computed as follows: 1) only consider the restaurants that both have reviewed. 2) take the difference between corresponding reviews. 3) sum the square of the differences 4) the square root of the sum of differences is the euclidean score. the shorter the distance the closer the two reviewers. for our example, this would be: (4.0 – 4.5)2 + (3.5 – 1.0)2 + (5.0 – 4.0)2 = 0.25 + 6.25 + 1 = 7.5 euclidean distance is square root of 7.5 = 2.7386your program should provide the following: 1) ability to read in a user provided filename which contains restaurant reviews in the comma separated format similar to the given file restaurant_reviews. txt2) functionality to compute the similarity between two reviewers provided by the user3) functionality to compute the similarity between one user provided reviewer and all other reviewers in the database

ansver
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, 19deleonl
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
image
Engineering, 04.07.2019 18:10, ayoismeisjjjjuan
Manometers are good examples of measuring instruments, nowadays they are not as common as before. a)-capacitive probe gauges b)-gravitational gauges deformation ) gauges d)-digital gauges
Answers: 1
image
Engineering, 04.07.2019 18:10, wyattlb97
Water at the rate of 1 kg/s is forced through a tube with a 2.5 cm inner diameter. the inlet water temperature is 15°c, and the outlet water temperature is 50°c. the tube wall temperature is 14°c higher than the local water temperature all along the length of the tube. what is the length of the tube?
Answers: 3
image
Engineering, 04.07.2019 19:10, ultimateapes
When subject to a steady load (within elastic range) over a long period of time, what is the major difference in material behavoir between steel and plastic?
Answers: 2
You know the right answer?
The file contains names of reviewers and their reviews of different restaurants in the comma separat...

Questions in other subjects:

Konu
Mathematics, 16.10.2020 18:01
Konu
Advanced Placement (AP), 16.10.2020 18:01
Konu
Chemistry, 16.10.2020 18:01