Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need the code fot these two quations CMP2003 Data Structures and Algorithms (C++) Project Due Date: Jan 06, 2023 1 The Problem Reconmender systems
i need the code fot these two quations
CMP2003 Data Structures and Algorithms (C++) Project Due Date: Jan 06, 2023 1 The Problem Reconmender systems help people fird items of interest by making personalizd recumuenulations acconding to their preferences. Fot example, a recombender system can make persoanliacd recomenendationa of items sixch as mosies, bowlos, hotels, of masic to poople. In oeder to model uscis" prefereaces their past interactious such as prodict views, ratings, and purchases are ueod. In the recarmacnder aystems area of research (which is a suhficld of machine learning and information retrieval) different algorithens have beca developed which are currently loding used by many large companies. In this project you will implement seighborbood based collaborative filtering (NDCF) algotithms in ceder to make predictions for movie fatinge of people. There are two main ty]os of NBCF algorithans: uner-based (UBCF) and item-based (IBCF). Let tas describe each with an example datasct. 2 UBCF and IBCF One of the fundamental peoblems in recommender systeens is to predict the rating of a wer for a particular iteen. For examaple, gives the dataset in Tahle 1, what nught be the rating of User 2 for Movie 3 ? If we can prodict this rating thed, If it is a high value like 4 of a, we can decide to foomenmend Movie 3 to User 2. Table li An examsple dataset. In its sumplest form. UBCF works as follows: in order to pordict the rating of user w to item i, we first find the most sinailar k users to a (who tated i) and predict the rating as the average ratinge of these most similar k asers oa itean i. For finding the sienilarity between two iesers differeat methods can be used. In collaborative fltering we look at the ratings of otber users and find users which have kimilar ratings. One popular method to fimil such a similarity is called cosine similarity which is given belows cosinc(A,B)=ABAB=i=1nAi2i=1nBi2i=1nAiBi Fos example, gives two vectors A=[2,4,5] and B={3,2,4], their conite similarity is given lo; cosine(A,B)=22+42+5232+22+4223+42+54 IBCF, on the otber havd, works as followes: in ordes to peediet the rating of use u to lieen i, we finst ficd the ranst similar k iteras to i (which are rated by user u ) abd peedict the rating as the average rating of user a for these mast slmilar k iterns. For simblarity calculation, again cosane shmilasity cas be ascd. 3 Evaluation The dataset that will be give to you will be a text file and will have the followieg format foach bine coetains a rating of a particular user to a particular movin)a UserID. Movicid. Rating. 10,100,5 10, 101, 4 10,102,5 11,100,5 11,201,4 Fot testing your perfotusace you will he given a test set sinvilar to the following: UserID. MorteriD 10,200 10,201 10, 202 11,300 11, 301 As can be men, then ratings ate hiddhn, yeir task is to predict throe tatiege and make a stthenkoion to Kangle web site (more details alout this subeniosion will be given later). Yoar aim in to mabe the best pretictions, that is, predict the actaal ratings as ckase as poesible. The error metric for calculating your scotes will be root mean squated entur (FLMSE), which is given below: RLASE=ni=1m(miw^)2 where y4 is the actual rating and y4, is the predicted rating. For example if y=[2,4,5,3] and y^=[3,4.2.2] then R.ISSE=4(23)2+(44)2+(52)2+(32)2 4 Model Building and Experiments The above descriptice of UBCF and IBCF is a simple and geueral one You are free to nse different variations of these methords, especially you can try different similarity metrios fotber than cosiac). You can find mose information on NBCF on many web resouros, You are free to use any method you like (otbes than UBCF and IBCF) but you should implement at least UBCF or IBCF and show that it is wosking Since the ratings file that will be provided will be a large file, try to find the best (efficient) data structures and algorithms for applying UDCF and IBCF, Bofore suhenitting your predictioess, you might want to do offlise experiments. In its simplest ferm you can split your data into training and test wots. The test wit might be coastracted by randamly seikecting a sulbet of the rows (1000 rows for example) of the dataset provided and putring all the rest of the ratinge to the training set. Then you can try to peerlact the satiags in the test set using the training set and calcalate the MAE without making a submission. Note that you can malee at most 5 submissions to Kaggle wela site exry day, 5 Requirements and What to Submit - You can forrn teams of at most 3 studests. You can wotk alone but we encourage everyote to tee part of a team. Team members can be from different sections - Codes should be written in C+4. You ate allowed to use C++ standard lihrary. No onhry library can be wsod. - In the project report you should clesty explain the data structures asd algorithms you used. Also. you should clearly write which parts of the project you completed. Also, proside the tirae it talars to make all the predicthoes (omit the time for rrading the ratinge flle). Dedigaing etficlent data structures and algorithnus will Jead to higher grades, so describe them in detail. - You should submit a vixdeo reoording in which every team member should explain his/her part. Reroardings should be about. 1015 minutes long. You sbould subanit (to itslearning) the following as three reparate files ia the given formats. Submissions in other formats will not be evaluated. Every tean shoulh mala a single subnisoixan so write team member names clearly at the top of your reports. There will be a penalty of 10 points for exery late day after the due date. - All howike (h) and source (sepp) files. (sip format) - Project report (PDF format) - Video reoording (mpil format) 6 Grading - 40 points Reading the ingut file and carrectly printing the top 10 users and top 10 monies in decreasing order of number of ratiege that they have. An exanyle output bs given in the Tables 2 asxl 3 below: Table 2: Top users who have the ruost ratings. Table 3: Top tuevies which have the tnem ratings. - 40 points Sucoesofully applying the UBCF or IBCF, raaking a submbsion to Kakgle ueds site, and getting RUSE Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started