{"id":1921,"date":"2019-05-20T12:00:00","date_gmt":"2019-05-20T10:00:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/machine-learning-questions-and-answers-questions-11-to-20\/"},"modified":"2026-07-05T03:23:26","modified_gmt":"2026-07-05T01:23:26","slug":"machine-learning-questions-and-answers-questions-11-to-20","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/machine-learning-questions-and-answers-questions-11-to-20\/","title":{"rendered":"Machine Learning Questions and Answers (Questions 11 to 20)"},"content":{"rendered":"<p>This is Machine Learning Questions and Answer (11 to 20)<\/p>\n<p><a href=\"https:\/\/kindsonthegenius.com\/tempsite\/machine-learning-questions-and-answers-question-1-to-10\/\">Find Question 1 to 10 here.<\/a><\/p>\n<p>So let&#8217;s get started!<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>11. Explain Clustering in your own words<\/strong><\/h5>\n<p>First, note that clustering is an unsupervised learning technique. It is used to find sub-groups or clusters within a dataset.<\/p>\n<p>When a set of observation is clustered, we partition the data into unique groups such that the data points within each of the groups share some common characteristics. At the same time, data points in different groups are different from each other.<\/p>\n<p>The two main types of clustering are<\/p>\n<ul>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/what-is-k-means-in-clustering-in-machine-learning\">k-Means clustering<\/a><\/li>\n<li>Hierarchical clustering<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h5><strong>12. Briefly Describe <a href=\"https:\/\/kindsonthegenius.com\/blog\/what-is-k-means-in-clustering-in-machine-learning\">k-Means Clustering<\/a><\/strong><\/h5>\n<p><a href=\"https:\/\/kindsonthegenius.com\/blog\/what-is-k-means-in-clustering-in-machine-learning\">K-Means clustering<\/a> seeks to partition the set of observations into K non-overlapping clusters.<\/p>\n<p>The first step is to choose the number of clusters, K.<\/p>\n<p>Then we define the K clusters. Let&#8217;s say<em> C<sub>1<\/sub>, C<sub>2<\/sub>, &#8230; C<sub>k<\/sub>.<\/em><\/p>\n<p>These clusters should satisfy the two conditions:<\/p>\n<p><strong>All-inclusive condition<\/strong>: this is given by<em> C<sub>1\u00a0<\/sub> \u222a\u00a0 C<sub>2\u00a0<\/sub> \u222a &#8230;\u00a0\u222a\u00a0 C<sub>k<\/sub> = {1, 2, &#8230;}.<\/em> This means that all observations must belong to one of the K clusters<\/p>\n<p><strong>Non-overlapping condition<\/strong>: this is given by <em>C<sub>i<\/sub>\u00a0\u2229 \u00a0C<sub>j<\/sub> =\u00a0\u00d8<\/em><\/p>\n<p>The objective of k-means clustering is to minimize the within-cluster variation W(C<sub>k<\/sub>) for cluster K. This is that amount\u00a0 by with the data points within a particular cluster differ from each other. Therefore k-means clustering seeks to find:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-876 aligncenter\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2020\/09\/k-Means-Clustering--300x133.jpg\" alt=\"k-Means Clustering\" width=\"221\" height=\"98\" \/><\/p>\n<p>This formula simply means that we would like to partition the data points into K clusters so that the overall within-cluster variation, summed over all K clusters is minimum.<\/p>\n<p>K-Means clustering procedure video<\/p>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/Gj_63EFkwZ8\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<h5><strong>13. What is Hierarchical Clustering?\u00a0 How is it different from k-Means?<\/strong><\/h5>\n<p>Hierarchical clustering an alternative clustering approach to K-Means. Unlike the K-Means, hierarchical clustering\u00a0 does not require specifying the initial number of clusters. It produces a set of nested clusters that can be organized and visualized as a hierarchical tree. This tree is called\u00a0 dendrogram.<\/p>\n<p>The two types of hierarchical clustering are: Agglomerative and Divisive<\/p>\n<p><strong>Agglomerative<\/strong>: Begin with each data point as its own cluster. Then at each step, it merges the nearest cluster until one cluster (or k clusters) is left.<\/p>\n<p><strong>Divisive<\/strong>: In this case, we start with one large cluster that includes all the elements. Then at each step, we split the cluster until all each cluster contains only a single data point<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>14. What is a Dendrogram. Give an Example<\/strong><\/h5>\n<p>A dendrogram is a tree-like diagram obtains from the hierarchical clustering process. It\u00a0 indicates the merges(or the split) carried out at each step of hierarchical clustering. The bottom of the tree are leaves which represent clusters of individual data points. As we move up the tree, the branches fuse together to for larger clusters.<\/p>\n<p>An example of a dendrogram is given below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-877 \" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2020\/09\/Dendrogram.jpg\" alt=\"Dendrogram\" width=\"483\" height=\"295\" \/><\/p>\n<p>&nbsp;<\/p>\n<h5><strong>15. What is Spectral Clustering?<\/strong><\/h5>\n<p>This is a more complex clustering method that is based on the graph theory. In spectral clustering, set of nodes in a graph are identified based on\u00a0 edges that connect them.<\/p>\n<p>First, it uses information obtained from the spectrum(or eigenvalues) of the similarity(spatial) matrix to perform dimensionality reduction on\u00a0 the data. Next, it builds the graph. Finally, it clusters the data.<\/p>\n<p>(you don&#8217;t need to focus on this type, unless you want to take on more advanced studies in data science\/ML)<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>16. What clustering algorithm is better? Give reasons<\/strong><\/h5>\n<p>The K-means clustering has a drawback of having to pre-choose the value of K. This restriction does not exist for hierarchical clustering.<\/p>\n<p>Hierarchical clustering has the following limitation:<\/p>\n<ul>\n<li>once a decision is made to combine two clusters, the decision cannot be undone<\/li>\n<li>no clear objective function is minimized<\/li>\n<li>sometimes breaking large clusters could be complex<\/li>\n<li>tends to be more sensitive to noise than k-means<\/li>\n<\/ul>\n<p>However, hierarchical clustering has the benefit of producing a set of clusters that can be visualized.<\/p>\n<p>Based on these few thoughts, it then seems I would prefer the K-means clustering!<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>17. What is bias in an Machine Learning Model<\/strong><\/h5>\n<p>Bias is the error introduced to our model when a simple model used in situation where a more complex model would have done better.<\/p>\n<p>For example, take the case of linear regression. Here a (simple) linear relationship is assumed between X and Y. But in the real world, it is likely the relationship may not really be linear. In this case, we are just being biased!!<\/p>\n<p>Generally, the more the biased, the less complex the model. An less flexible the model as well.<\/p>\n<p>&nbsp;<\/p>\n<h5>18. What is Variance a Machine Learning Model<\/h5>\n<p>Variance refers to the variation in the model due to the variation in the training data used to build the model. Remember that models are built using training data. Also remember that a model is simply a function or a relation that maps x to y.<\/p>\n<p>So let&#8217;s assume we have\u00a0 store of training set of say, 100,000 observations. Then you random take out 500 records and use to build a model<em> f<sub>1<\/sub>(x)<\/em>. Next you take out another 1000 records and build a second model<em>, f<sub>2<\/sub>(x)<\/em>. The difference between these two models is what is known as variance.<\/p>\n<p>You can think of variance in this case as:<\/p>\n<h5 style=\"text-align: center;\"><em><strong> variance =\u00a0 f<sub>1<\/sub>(x) &#8211; f<sub>2<\/sub>(x)<\/strong><\/em><\/h5>\n<p>Normally, the higher the variance, the more flexible the model. The\u00a0 more complex the model as well.<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>19. What is Mean-Squared Error(MSE)<\/strong><\/h5>\n<p>The Mean-Squared-Error is a measure of the the quality of a model. When a model makes a prediction, the MSE provide\u00a0 a way to know ow well the prediction match the real data.<\/p>\n<p>For example if we have a data set <em>X = {x<sub>1<\/sub>, x<sub>2<\/sub>, &#8230;, x<sub>n<\/sub>}.<\/em><\/p>\n<p>Each observation has a corresponding y given by <em>Y = {y<sub>1<\/sub>, y<sub>2<\/sub>, &#8230;, y<sub>n<\/sub>}<\/em><\/p>\n<p>So we develop a model that maps the Y values to the X values and our model is in form a function f(x). In ideal case, f(xi) should equal yi. But that is not the case in real scenario. There is always a difference between f(x<sub>i<\/sub>) and y<sub>i<\/sub>. This difference is the error.<\/p>\n<p>The Mean-Square-Error defines this difference using the formula:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-879 aligncenter\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2020\/09\/Mean-Squared-Error-300x94.jpg\" alt=\"Mean Squared Error\" width=\"300\" height=\"94\" \/><\/p>\n<p>The MSE is computed using the training dataset. Therefore it also called training MSE.<\/p>\n<p>&nbsp;<\/p>\n<h5><strong>20. Explain the concept of Bias\/Variance Trade-off<\/strong><\/h5>\n<p>Remember that the more the variance, the more complex the model. Similarly, the more the bias, the less complex the model. Therefore bias and variance has in inversely proportional relationship.<\/p>\n<p>We don&#8217;t want a model that is too complex(much variance) such that it causes overfitting. On the other hand, we don&#8217;t want a model that has very little complexity (much bias) that it leads to underfitting. So we need to find a balance between the bias and the variance. This balance is called bias\/variance trade-off. (Questions on Underfitting and overfitting are answered in Question 21 to 30)<\/p>\n<p><a href=\"https:\/\/kindsonthegenius.com\/tempsite\/machine-learning-101-bias-variance-trade-off\/\">Read more about Bias\/Variance Trade-off<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is Machine Learning Questions and Answer (11 to 20) Find Question 1 to 10 here. So let&#8217;s get started! &nbsp; 11. Explain Clustering in &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[16],"tags":[],"class_list":["post-1921","post","type-post","status-publish","format-standard","hentry","category-machine-learning"],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=1921"}],"version-history":[{"count":1,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1921\/revisions"}],"predecessor-version":[{"id":2089,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1921\/revisions\/2089"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=1921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=1921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=1921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}