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

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 19:10
Abarometer contains mercury with a density of 13600 kg/m3. atmospheric conditions are 95.8 kpa and 20 °c at 20 °c, the vapor pressure of the mercury is 0.000173 kpa. the column of mercury will rise to a height of most nearly. select one: a)- 0.38 m b)- 0.82 m c)- 0.48 m d)- 0.72 m
Answers: 1
question
Engineering, 04.07.2019 19:10
A)-explain briefly the importance of standards in engineering design. b)- what is patent? c)-explain the relationship between these standards: b.s. and b.s.en d)- in engineering design concepts, types of loads and how they act are important factors. explain.
Answers: 3
You know the right answer?
The file contains names of reviewers and their reviews of different restaurants in the comma separat...
Questions
question
Mathematics, 05.09.2020 08:01
question
Engineering, 05.09.2020 08:01
Questions on the website: 13722362