[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-160318-en":3,"doc-seo-160318-105":29,"detail-sidebar-cat-0-en-105":89},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":11,"language":21,"language_code":22,"site_id":23,"html_lang":22,"table_of_contents":24,"faqs":25,"seo_title":26,"seo_description":14,"update_tm":27,"read_time":28},160318,13056703020460,"Valentina","https://ap-avatar.wpscdn.com/avatar/be000253dac470eee5d?_k=1778207105932848923",4,"Exam","Exercises - Sample Exercises and Exam Questions from Previous Years","A set of sample exercises and past exam questions focused on core machine learning tasks and their mathematical formulations. The exercises cover regression with squared loss and its least-squares solution, regularization to control coefficient magnitude, K-means clustering with cost functions and Lloyd’s algorithm, and supervised learning topics including logistic regression and neural-network forward computation. Additional problems address SVMs with kernels and feature maps, PCA for unsupervised dimensionality reduction and its link to regression complexity, support vector machines with slack variables, and generalization error evaluation via k-fold cross-validation. The set also includes VC-dimension reasoning and maximum-margin decision boundaries after feature mapping, suitable for study and revision.","Sample Exercises and Exam Questions from previous years  \nThis document contains some sample exercises in large part derived from exam questions given in previous years. Some of them are just questions about the theory while some others are exercises to be solved.  \nExercise 1  \n1. Describe the regression task.  \n2. Introduce the linear regression model class under squared loss and derive the optimal solution (in terms of training error, i.e., the least squares algorithm) .  \n3. Describe how the approach can be extended in order to avoid the problem of having too large coefficients using regularization.  \nExercise 2  \n1. Define the clustering problem.  \n2. Introduce the cost function for the K-means clustering problem and describe Lloyd's iterative algorithm.  \n3. Mark approximately in the graph below the solution (clusters and centers) found by Lloyd algorithm for the 2 clusters (K = 2) problem, when the data (􀝔􀯜 ∈ ℝ ) are the crosses in the figure below and the algorithm is initialised with center values indicated with the circle (cluster 1) and triangle (cluster 2) shown in the figure.  \nExercise 3  \n1. Describe the classification task  \n2. Describe logistic regression (model, cost function and classification rule; no need to derive the details of optimization algorithm)  \nExercise 4  \nConsider the neural network in the figure and assume the activation function 􀁖 (x) is defined as:  \nCompute the value of the output y when the input z is z = [1 3]  \nExercise 5  \n1. Introduce the concept of Kernel and its use in SVM for classification.  \n2. Consider the configuration of training data points (crosses for class 0 and circles for class 1) in the figure below and a scalar function (feature map) Φ(∙): ℝ2 → ℝ such that the data become linearly separable after the map Φ has been applied.  \n3. Relate the map Φ to a kernel  \nExercise 6  \n1. Let 􀜺 = [􀢞􀫚 …􀢞􀢔], 􀢞 􀢏 ∈ ℝ􀯣 be the data matrix. Introduce the Principal Component Analysis in the context of unsupervised learning.  \n2. With reference to the figure below draw approximately the first and second right singular vectors of X.  \n3. Describe how PCA can be used in the context of linear regression to reduce the complexity of the model.  \nExercise 7  \n1. Describe the linear support vector machine for classification in the case of non linearly separable data.  \n2. The figure shows the results (separating hyperplane and margin) of linear SVM for binary classification on the data points (in ℝ2 ) in the figure, where the class of each point is represented by its shape (triangle or square) . Mark with circles the misclassified points and draw the segments which length corresponds to the non-zero slack variables.  \n3. Discuss how the solution (margin width and slack variables 􀟦􀯜) changes if the value of C in the objective function 12 ‖􀟚‖2 + 􀜥 ∑􀯜 􀟦􀯜 increases.  \nExercise 8  \n1. Consider a supervised learning problem, describe the concepts of training and generalization errors.  \n2. With reference to item 1 above, how would you state the final goal of supervised learning?  \n3. What role does k-fold cross validation play in estimating the errors (training and generalization) in item 1 above?  \nExercise 9  \n1. Consider an hypothesis class ℋ . What do you need to show in order to demonstrate that VCdim(ℋ)=d ?  \n2. Consider right triangles in the plane with the sides adjacent to the right angle both parallel to the axes and with the right angle in the lower left corner. What is the VC-dimension of this family?  \nHint: Recall the axis-aligned rectangle demonstration  \nExercise 10  \nConsider a dataset with the following six 1-dimensional points (the first element of the couple is the value x while the second is the label y):  \n{(xi , yi) } = { ( -3, + 1 ) , ( -2, + 1 ) , ( -1, -1 ) , ( 1, -1 ) , ( 2, + 1 ) , ( 3, + 1 ) }  \nConsider mapping these points to 2 dimensions using the mapping 􀟶: 􀝔 → (􀝔, 􀝔 2 )  \nWhich is the maximum margin decision boundary? Which is the corresponding margin?","cbCaiawHdQLznYnO","https://ap.wps.com/l/cbCaiawHdQLznYnO","pdf",891097,1,"English","en",105,"# Exercise 1\n## Regression and regularization\n# Exercise 2\n## K-means clustering and Lloyd algorithm\n# Exercise 3\n## Classification and logistic regression\n# Exercise 4\n## Neural network output computation\n# Exercise 5\n## Kernels and SVM feature mapping\n# Exercise 6\n## PCA and SVD vectors\n# Exercise 7\n## Linear SVM, slack variables, and parameter C\n# Exercise 8\n## Training vs generalization error and learning goal\n# Exercise 9\n## VC-dimension and hypothesis class capacity\n# Exercise 10\n## Maximum-margin boundary after feature mapping","[{\"question\":\"What learning tasks are included in these exercises?\",\"answer\":\"The document includes regression, clustering, classification, neural-network evaluation, SVMs, PCA, generalization-error analysis, and VC-dimension questions, along with a maximum-margin decision boundary problem after feature mapping.\"},{\"question\":\"How does the document address controlling large coefficients in regression?\",\"answer\":\"Exercise 1 asks how to extend the least-squares approach using regularization to avoid overly large coefficients, connecting the solution to training error considerations and the regularized objective.\"},{\"question\":\"How is model performance estimated and what is the role of k-fold cross validation?\",\"answer\":\"Exercise 8 defines training and generalization errors and asks how the final goal of supervised learning relates to them, then explains how k-fold cross validation estimates these errors.\"}]","Exercises - Sample Exercises and Exam Questions from Previous Years | PDF",1788053915,10,{"code":4,"msg":30,"data":31},"ok",{"site_id":23,"language":22,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":84,"head_meta":86,"extra_data":88,"updated_unix":27},"exercises-sample-exercises-and-exam-questions-from-previous-years","",{"@graph":35,"@context":83},[36,52,66],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/exam/",3,{"item":51,"name":13,"@type":42,"position":11},"https://docshare.wps.com/document/exercises-sample-exercises-and-exam-questions-from-previous-years/160318/",{"url":51,"name":13,"@type":53,"author":54,"headline":13,"publisher":56,"fileFormat":59,"inLanguage":22,"description":14,"dateModified":60,"datePublished":60,"encodingFormat":59,"isAccessibleForFree":61,"interactionStatistic":62},"DigitalDocument",{"name":9,"@type":55},"Person",{"url":40,"name":57,"@type":58},"DocShare","Organization","application/pdf","2026-08-30",true,{"@type":63,"interactionType":64,"userInteractionCount":4},"InteractionCounter",{"@type":65},"ViewAction",{"@type":67,"mainEntity":68},"FAQPage",[69,75,79],{"name":70,"@type":71,"acceptedAnswer":72},"What learning tasks are included in these exercises?","Question",{"text":73,"@type":74},"The document includes regression, clustering, classification, neural-network evaluation, SVMs, PCA, generalization-error analysis, and VC-dimension questions, along with a maximum-margin decision boundary problem after feature mapping.","Answer",{"name":76,"@type":71,"acceptedAnswer":77},"How does the document address controlling large coefficients in regression?",{"text":78,"@type":74},"Exercise 1 asks how to extend the least-squares approach using regularization to avoid overly large coefficients, connecting the solution to training error considerations and the regularized objective.",{"name":80,"@type":71,"acceptedAnswer":81},"How is model performance estimated and what is the role of k-fold cross validation?",{"text":82,"@type":74},"Exercise 8 defines training and generalization errors and asks how the final goal of supervised learning relates to them, then explains how k-fold cross validation estimates these errors.","https://schema.org",{"og:url":51,"og:type":85,"og:title":13,"og:site_name":57,"og:description":14},"article",{"robots":87,"canonical":51},"index,follow",{"doc_id":7,"site_id":23},{"code":4,"msg":5,"data":90},[91,95,99,102,107,112,117,122,127,130,133],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":92,"show_sort_weight":93,"slug":94},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":96,"show_sort_weight":97,"slug":98},"Literature",80,"literature",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":100,"slug":101},70,"exam",{"id":103,"doc_module":4,"doc_module_name":45,"category_name":104,"show_sort_weight":105,"slug":106},5,"Comic",60,"comic",{"id":108,"doc_module":4,"doc_module_name":45,"category_name":109,"show_sort_weight":110,"slug":111},6,"Technology",50,"technology",{"id":113,"doc_module":4,"doc_module_name":45,"category_name":114,"show_sort_weight":115,"slug":116},7,"Healthcare",40,"healthcare",{"id":118,"doc_module":4,"doc_module_name":45,"category_name":119,"show_sort_weight":120,"slug":121},8,"Research & Report",30,"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":28,"doc_module":4,"doc_module_name":45,"category_name":131,"show_sort_weight":28,"slug":132},"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":45,"category_name":135,"show_sort_weight":103,"slug":136},19,"General","general"]