[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-289766-105":3,"doc-detail-289766-en":81,"detail-sidebar-cat-0-en-105":98},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","lab-course-machine-learning-exercise-sheet-3-submission-instructions-and-programming-tasks","Lab Course Machine Learning - Exercise Sheet 3 - Submission Instructions and Programming Tasks","","Lab Course Machine Learning Exercise Sheet 3 provides submission requirements and lab policy references, followed by two programming-focused exercises on supervised learning. Exercise 1 requires dataset preprocessing: encoding non-numeric attributes, handling missing values, and splitting data into an 80/20 train/test partition. Exercise 2 asks for linear regression trained with gradient descent, including implementation details, loss minimization, fixed and adaptive step lengths, convergence diagnostics, RMSE evaluation on the test set, and comparison across algorithms.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/lab-course-machine-learning-exercise-sheet-3-submission-instructions-and-programming-tasks/289766/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/lab-course-machine-learning-exercise-sheet-3-submission-instructions-and-programming-tasks/289766.png","ImageObject",300,407,{"name":42,"@type":43},"Caleb Sterling","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-01","2026-09-17",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",14,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What preprocessing steps are required in Exercise 1?","Question",{"text":63,"@type":64},"Convert non-numeric values to numeric values (e.g., country-to-integer or one-hot encoding), optionally drop rows with missing values if required, then split data into train (80%) and test (20%).","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What must be implemented for Exercise 2, Part A?",{"text":68,"@type":64},"Implement linear regression with gradient descent for each dataset, compute and minimize the least-squares loss, track the change metric per iteration, and evaluate and plot RMSE on the test set across iterations.",{"name":70,"@type":61,"acceptedAnswer":71},"How should Exercise 2, Part B compare step length methods?",{"text":72,"@type":64},"Implement steplength-armijo and steplengthbolddriver, plot the per-iteration change metric and test RMSE versus iteration, then compare the RMSE graphs across both adaptive methods and the three fixed step lengths.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},289766,1790196625,{"code":4,"msg":82,"data":83},"success",{"doc_id":79,"user_id":84,"nickname":42,"user_avatar":85,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":86,"file_id":87,"file_url":88,"file_type":89,"file_size":90,"view_count":91,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":26,"language":92,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":93,"faqs":94,"seo_title":95,"seo_description":12,"update_tm":96,"read_time":97},962084925290,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","Lab Course Machine Learning  \nExercise Sheet 3  \nProf. Dr. Dr. Lars Schmidt-Thieme, Mohsan Jameel  \nInformation Systems and Machine Learning Lab  \nUniversity of Hildesheim  \nNovember 3rd, 2016  \nSubmission on November 9th, 2016 at 11:55pm,(on moodle, course code 3112)  \nInstructions  \nPlease read the lab related instructions, i.e. submission, report format and policies, at [https://www](https://www) .  \nismll .uni-hildesheim .de/lehre/prakAIML-16w/exercises/ml_lab_instructions .  \npdf  \nDatasets  \n1) Airfare and demand: [http://www.stat.ufl.edu/~winner/data/airq402.dat](http://www.stat.ufl.edu/~winner/data/airq402.dat descrip)[ descrip](http://www.stat.ufl.edu/~winner/data/airq402.dat descrip)  \ntion: [http://www.stat.ufl.edu/~winner/data/airq402.txt](http://www.stat.ufl.edu/~winner/data/airq402.txt.)[.](http://www.stat.ufl.edu/~winner/data/airq402.txt.)  \n2) Wine Quality: [http://archive.ics.uci.edu/ml/datasets/Wine](http://archive.ics.uci.edu/ml/datasets/Wine)+Quality  \nExercise 1: Data preprocessing (5 Points)  \nYou are required to pre-process given datasets.  \n1. convert any non-numeric values to numeric values. For example you can replace a country name with an integer value or more appropriately use hot-one encoding. [Hint: use hashmap (dict) or pandas:get_dummies] . Please explain your solution.  \n2. If required drop out the rows with missing values or NA. In next lectures we will handle sparse data, which will allow us to use records with missing values.  \n3. Split the data into a train(80%) and test(20%) .  \nExercise 2: Linear Regression with Gradient Descent (15 Points)  \nPart A: (8 Points): Implement Linear Regression with Gradient Descent In this part you are required to implement linear regression algorithm with gradient descent algorithm. Reference lecture [https://](https://)[ ](https://)[www.ismll.uni-hildesheim.de/lehre/ml-16w/script/ml-02-A1-linear-regression](www.ismll.uni-hildesheim.de/lehre/ml-16w/script/ml-02-A1-linear-regression) . pdf  \nFor each dataset given above  \n1. A set of training data Dtrain = f (x(1) ; y (1) ); (x(2) ; y (2) ); : : : ; (x(N ); y (N ))g, where x 2 RM , y 2 R, N is number of training examples and M is number of features  \n2. Linear Regression model is given as y^n = PMm=1 􀀌mxnm  \n3. Least square loss function is given as l(x; y) = PNn=1 (yn 􀀀 y^n )2  \n4. minimize the loss function l(x; y) using Gradient Descent algorithm. Implement (learn-linregGDand minimize-GD algorithms given in the lecture slides) . Choose imax between 100 to 1000 .  \n5. You can choose three suitable values of step length 􀀋 > 0. For each value of step length perform the learning and record  \n(a) In each iteration of the minimize-GD algorithm calculate j f(xi 􀀀1) 􀀀 f(xi)j and at the end of learning, plot it against iteration number i. Explain the graph.  \n(b) In each iteration step also calculate RMSE on test set RMSE = qPTq=1~~ ~~(yqteTst~~ ~~􀀀~~ ~~y^q~~ ~~)2  and at the end of learning, plot it against iteration number i. Explain the graph.  \nPart B: (7 Points): Step Length for Gradient Descent This task is based on Part A. You have to implement two algorithms steplength-armijo and steplengthbolddriver given in the lecture slides. For each step length Algorithm  \n1. In each iteration of the minimize-GD algorithm calculate j f(xi 􀀀1)􀀀f(xi)j and at the end of learning, plot it against iteration number i. Explain the graph.  \n2. In each iteration step also calculate RMSE on test set RMSE = qPTq=1~~ ~~(yqteTst~~ ~~􀀀~~ ~~y^q~~ ~~)2 and at the end of learning, plot it against iteration number i. Explain the graph.  \nCompare different step length algorithms  \nCompare the RMSE graphs of steplength-armijo and steplengthbolddriver and the three ﬁxed step length. Explain your graph.  \nAnnex  \n1. You can use numpy or scipy in build methods for doing linear algebra operations.  \n2. You can use pandas to read and processing data  \n3. You can use matplotlib for plotting.  \n4. You should not use any machine learning library","cbCaieYjarQWJvpF","https://ap.wps.com/l/cbCaieYjarQWJvpF","pdf",151238,15,"English","# Exercise 1: Data preprocessing\n## convert non-numeric to numeric\n## handle missing values\n## train/test split (80/20)\n# Exercise 2: Linear Regression with Gradient Descent\n## Part A: Implement gradient descent linear regression\n## Part B: Step length algorithms and comparison\n# Annex: Allowed tools and restrictions","[{\"question\":\"What preprocessing steps are required in Exercise 1?\",\"answer\":\"Convert non-numeric values to numeric values (e.g., country-to-integer or one-hot encoding), optionally drop rows with missing values if required, then split data into train (80%) and test (20%).\"},{\"question\":\"What must be implemented for Exercise 2, Part A?\",\"answer\":\"Implement linear regression with gradient descent for each dataset, compute and minimize the least-squares loss, track the change metric per iteration, and evaluate and plot RMSE on the test set across iterations.\"},{\"question\":\"How should Exercise 2, Part B compare step length methods?\",\"answer\":\"Implement steplength-armijo and steplengthbolddriver, plot the per-iteration change metric and test RMSE versus iteration, then compare the RMSE graphs across both adaptive methods and the three fixed step lengths.\"}]","Lab Course Machine Learning - Exercise Sheet 3 - Submission Instructions and Programming Tasks | PDF",1789636918,5,{"code":4,"msg":82,"data":99},[100,104,108,111,115,120,125,130,135,138,142],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":101,"show_sort_weight":102,"slug":103},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":109,"slug":110},70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},"Comic",60,"comic",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},6,"Technology",50,"technology",{"id":121,"doc_module":4,"doc_module_name":25,"category_name":122,"show_sort_weight":123,"slug":124},7,"Healthcare",40,"healthcare",{"id":126,"doc_module":4,"doc_module_name":25,"category_name":127,"show_sort_weight":128,"slug":129},8,"Research & Report",30,"research-report",{"id":131,"doc_module":4,"doc_module_name":25,"category_name":132,"show_sort_weight":133,"slug":134},9,"Religion & Spirituality",20,"religion-spirituality",{"id":133,"doc_module":4,"doc_module_name":25,"category_name":136,"show_sort_weight":133,"slug":137},"World Cup","world-cup",{"id":139,"doc_module":4,"doc_module_name":25,"category_name":140,"show_sort_weight":139,"slug":141},10,"Lifestyle","lifestyle",{"id":143,"doc_module":4,"doc_module_name":25,"category_name":144,"show_sort_weight":97,"slug":145},19,"General","general"]