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 15:10
Ahouse has the following electrical appliance usage (1) single 40w lamp used for 4 hours per day (2) single 60w fan used for 12 hours per day (3) single 200w refrigerator that runs 24 hours per day with compressor run 12 hours and off 12 hours find the solar power inverter size in watt with correction factor of 1.25.
Answers: 1
question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
Water at 55c flows across a flat plate whose surface temperature is held constant at 95c. if the temperature gradient at the plate's surface for a given value of x is 18 c/mm, find a) local heat transfer coefficient. b) heat flux
Answers: 3
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
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
Geography, 04.10.2019 21:40
question
Mathematics, 04.10.2019 21:40
question
Mathematics, 04.10.2019 21:40
Questions on the website: 13722367