SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 213 Weeks Ago, 6 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Science Posted 15 Oct 2017 My Price 10.00

This is python problem, all requirements on the doc, do it carefully and ASAP

Problem DefnitionLet’s say we have 5 users, User P and User Q, and they have rated 7 diferent cell phone brands on ascale oF 1 to 10. Note that not all users have rated all cell phones.UserPRaTngs = {'Motorola':8, 'LG':5, 'Sony':1, 'Apple':1, 'Samsung':5, 'Nokia':7}UserQRaTngs = {'Apple':7, 'Samsung':1, 'Nokia':4, 'LG':4, 'Sony':6, 'Blackberry':3}Requirement For this AssignmentYou have been provided with a Framework which de±nes a Class calledsimilarity. It includes a classiniTalizaTon method which takes two raTng dicTonariesraTngPandraTngQas parameters. You mustuse the iniTalizaTon method as-is with no changes.Your task in this assignment is to extend the Framework as Follows:(1) Code up the Class method calledminkowskiwhich takes a single parameterr(no addiTonalparameters must be included in the method call), and returns the Minkowki Distance betweenthe two dicTonaries (that the Class object is instanTated with). Note: you must include a phoneraTng in the distance calculaTon only iF the phone was rated by both users.(2) Code up the Class method calledpearsonwhich takes no parameters (no addiTonal parametersmust be included in the method call), and returns the Pearson CorrelaTon between the twodicTonaries (that the Class object is instanTated with). Note: you must include a phone raTng inthe correlaTon calculaTon only iF the phone was rated by both users.(3) Create an object oF class similarity. IniTalize it with raTng dicTonariesUserPRaTngsandUserQRaTngs. Call theminkowskiandpearsonclass methods to calculate the Followingmeasures between the two dicTonaries:oManha²an Distance[Answer: 19.0]oEuclidean Distance[Answer: 9.3274]oMinkowski Distance (r=3)[Answer: 7.5654]oPearson CorrelaTon[Answer: -0.7123]±ramework For coding:1
Background image of page 1
Assignment SubmissionSome things to keep in mind as you code:Make your code readable – for instance, use meaningful variable names and comments.Make your code elegant – for instance, balance the number of variables you introduce – toomany or too few make your code diFcult to debug, read, and maintain.Make your output readable and user-friendlyOnce you have wriTen up the script, save it as follows. Submit the script by uploading your python script.Note: upload the actual script – DO NO± aTach a screenshot of the script!<²irstName><LastName>Assignment2.py.[Example: HinaAroraAssignment2.py]±he submiTed script will be runas-isfor grading. Points will be deducted for scripts that:are diFcult to read/followdon’t compile/rundon’t have all the various pieces of code requiredhave hard-code values instead of using variableshave logical errorsdon’t result in the expected outputdon’t have user-friendly outputHint2
Background image of page 2

Attachments:

Answers

(5)
Status NEW Posted 15 Oct 2017 09:10 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)