logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Kevin BatessAccounting
(5/5)

765 Answers

Hire Me
expert
Richard AlpertLaw
(5/5)

552 Answers

Hire Me
expert
Allen CrumpStatistics
(5/5)

659 Answers

Hire Me
expert
StatAnalytica ExpertPsychology
(5/5)

536 Answers

Hire Me
R Programming
(5/5)

In this exam, you will implement a simplified version of the user-to-user

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Instructions for Exam 1

By Rafael Becerril Arreola, Associate Professor of Marketing, DMSB

 

In this exam, you will implement a simplified version of the user-to-user (or user-based) collaborative filtering algorithm. This is a technique used to predict the items that a user might purchase on the basis of purchases of that item by the other users who have purchase histories similar to that of the target user.

 

A basic algorithm can be represented with the following pseudocode:

 

1) for each customer j in the data

a) compute the distances to every other customer k using their purchase histories on P products, π‘₯π‘˜ = [π‘₯1π‘˜, … , π‘₯π‘ƒπ‘˜ ]′, such that

 

𝑃

𝑑(𝑗, π‘˜) = √∑(π‘₯𝑖𝑗

 

 

− π‘₯π‘–π‘˜)

 

𝑖=1

 

b) identify the customer s (or set of customers, S, if ties exist)

 

𝑠 = {argmin 𝑑(𝑗, π‘˜)}

π‘˜,π‘˜≠𝑗

who is (are) most similar to customer j

c) make a vector L of items purchased by s (S)

d) remove duplicates in the vector L

e) remove from vector L the products that customer j has bought in the past

f) report vector L

 

To implement and test the algorithm, please follow the steps below.

1. Use the data file provided together with these instructions. Each row j=1,…,8 represents a customer, each column i=1,…,10 represents a product. The entries π‘₯𝑖𝑗 are either “0” or “1”. A “0” represents “no purchase” and a “1” represents “purchase”. For example, if the data are loaded into a data frame called “purchHist”, then purchHist$x2[1] equals “1” if and only if customer 1 has purchased product 2.

2. Translate the pseudocode above into R code and store it in file called “E1_X_Y.r”, where X should be your first name and Y your last name. To report the recommended products, simply let your code print them with R’s print command. Note that the number of products recommended can vary across customers and it can be zero if there are no new products to recommend. That is fine.

 

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. ThisΒ  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme