{"id":68,"date":"2024-02-09T13:21:28","date_gmt":"2024-02-09T13:21:28","guid":{"rendered":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/chapter\/ai-speak-machine-learning\/"},"modified":"2025-05-14T06:30:17","modified_gmt":"2025-05-14T06:30:17","slug":"ai-speak-machine-learning","status":"publish","type":"chapter","link":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/chapter\/ai-speak-machine-learning\/","title":{"raw":"AI Speak: Machine Learning","rendered":"AI Speak: Machine Learning"},"content":{"raw":"<div class=\"textbox shaded\">We are updating the chapter soon in Telugu ...please revisit in Jun 2025! Thank you!<\/div>\r\n&nbsp;\r\n<p class=\"no-indent\">An <strong>algorithm<\/strong> is a fixed sequence of instructions for carrying out a task. It breaks down the task into easy, confusion-free steps, like a well written recipe.<\/p>\r\n<p class=\"indent\">Programming languages are languages that a computer can follow and execute. They act as a bridge between what we and a machine can understand. Ultimately, these are switches that go on and off. For a computer\u00a0, images, videos, instructions are all 1s (switch is on) and 0s (switch is off).<\/p>\r\n<p class=\"indent\">When written in a programming language, an algorithm becomes a <strong>program<\/strong>. <strong>Applications<\/strong> are programs written for an end user.<\/p>\r\n<p class=\"indent\">Conventional programs take in data and follow the instructions to give an output. Many early AI programs were conventional. Since the instructions cannot adapt to the data, these programs were not very good at things like predicting based on incomplete information and natural language processing (NLP).<\/p>\r\n<p class=\"indent\"><a class=\"inline wrap\" href=\"https:\/\/scalar.usc.edu\/works\/artificial-intelligence-for-teachers\/media\/Green%20Illustrated%20Modern%20Social%20Media%20Marketing%20Report%20Presentation%20(1).jpg\" name=\"scalar-inline-media\" data-align=\"left\" data-annotations=\"\" data-size=\"medium\" data-caption=\"none\" data-cke-saved-name=\"scalar-inline-media\" data-cke-saved-href=\"https:\/\/scalar.usc.edu\/works\/artificial-intelligence-for-teachers\/media\/Green%20Illustrated%20Modern%20Social%20Media%20Marketing%20Report%20Presentation%20(1).jpg\"><\/a><img class=\" wp-image-167 alignleft\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/EN-9.1.png\" alt=\"\" width=\"458\" height=\"258\" \/>A search engine is powered by both conventional and <strong>Machine learning<\/strong> algorithms. As opposed to conventional programs, ML algorithms analyse data for patterns and use these patterns or rules to make future decisions or predictions. So, based on data, good and bad examples, they find their own recipe.<\/p>\r\n<p class=\"indent\">These algorithms are well suited for situations with a lot of complexity and missing data. They can also monitor their own performance and use this feedback to become better.<\/p>\r\n<p class=\"indent\">This is not too different from humans, especially when we see babies learning skills outside the conventional educational system. Babies observe, repeat, learn, test their learning and improve. Where necessary, they improvise.<\/p>\r\n<p class=\"indent\">But the similarity between machines and humans is shallow. \u201cLearning\u201d from a human perspective is different, and way more nuanced and complex than \u201clearning\u201d for the machine.<\/p>\r\n&nbsp;\r\n\r\nhttps:\/\/youtu.be\/e4w0sEjfxxs?list=PLkm8ZqYSzE3d6lEWsWz0fWhtSAbjwR8Z7\r\n<h3 style=\"text-align: left;\">A classification problem<\/h3>\r\n[caption id=\"attachment_66\" align=\"alignright\" width=\"430\"]<img class=\"wp-image-166\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card1.jpg\" alt=\"\" width=\"430\" height=\"242\" \/> \"Playing Card\" par aquarianinsight.com\/free-readings\/ est sous licence CC BY-SA 2.0. Pour une copie de la licence, visitez <a href=\"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse\">https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse<\/a>.[\/caption]\r\n<p class=\"no-indent\">One common task a ML application is used to perform is classification \u2013 is this a photo of a dog or a cat? Is this student struggling or will they pass the exam? There are two or more groups, and the application has to classify new data into one of them.<\/p>\r\n<p class=\"indent\">Let us take the example of a pack of playing cards \u2013 group A and group B \u2013 divided into two piles and following some pattern. We need to classify a new card, the ace of diamonds, as belonging to either group A or group B.<\/p>\r\n<p class=\"indent\">First, we need to understand how the groups are split \u2013 we need examples. Let us draw four cards from group A and four from group B. These eight example cases form our <strong>training set<\/strong> \u2013 data which helps us see the pattern \u2013 \u201ctraining\u201d us to see the result.<\/p>\r\n<p class=\"indent\">As soon as we are shown the arrangement to the right, most of us would guess that the ace of diamonds belongs to Group B. We do not need instructions, because the human brain is a pattern-finding marvel. How would a machine do this?<\/p>\r\n<p class=\"indent\">ML algorithms are built on powerful statistical theories. Different algorithms are based on different mathematical equations that have to be chosen carefully to fit the task at hand. It is the job of the programmer to choose the data, analyse what features of the data are relevant to the particular problem and choose the correct ML algorithm.<\/p>\r\n\r\n<h3 style=\"text-align: left;\">The importance of data<\/h3>\r\n[caption id=\"attachment_66\" align=\"alignright\" width=\"442\"]<img class=\"wp-image-65 \" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-300x169.jpg\" alt=\"\" width=\"442\" height=\"249\" \/> \"Playing Card\" by aquarianinsight.com\/free-readings\/ is licenced under CC BY-SA 2.0. To view a copy of this licence, visit <a href=\"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse.\">https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse.<\/a>[\/caption]\r\n<p class=\"no-indent\">The card-draw above could have gone wrong in a number of ways. Please refer to the image. 1 has too few cards, no guess would be possible. 2 has more cards but all of the same suit - no way to know where diamonds would go. If the groups were not of the same size, 3 could very well mean that number cards are in group A and picture cards in group B.<\/p>\r\n<p class=\"indent\">Usually machine learning problems are more open ended and involve data sets much bigger than a pack of cards. Training sets have to be chosen with the help of statistical analysis, or else errors creep in. Good data selection is crucial to a good ML application, more so than other types of programs. Machine learning needs a great number of relevant data. At an absolute minimum, a basic machine-learning model should contain ten times as many data points as the total number of features<sup>1<\/sup>. That said, ML is also particularly equipped to handle noisy, messy and contradictory data.<\/p>\r\n\r\n<h3 style=\"text-align: left;\">Feature Extraction<\/h3>\r\n<p class=\"no-indent\">When shown Group A and Group B examples above, the first thing you might have noticed could be the colour of the cards. Then the number or letter and the suit. For an algorithm, all these features have to be entered specifically.\u00a0It cannot automatically know what is important to the problem.<\/p>\r\n<img class=\"aligncenter wp-image-66 \" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-300x183.png\" alt=\"\" width=\"452\" height=\"276\" \/>\r\n<p class=\"no-indent\">While selecting the features of interest, programmers have to ask themselves many questions. <em>How many features are too few to be useful? How many features are too many? Which features are relevant for the task? What is the relationship between the chosen features - is one feature dependent on the other? With the chosen features, is it possible for the output to be accurate?<\/em><\/p>\r\nhttps:\/\/youtu.be\/r7uotL8oLiI?list=PLkm8ZqYSzE3d6lEWsWz0fWhtSAbjwR8Z7\r\n<h3 style=\"text-align: left;\">The process<\/h3>\r\n<div class=\"textbox textbox--sidebar textbox--examples\"><header class=\"textbox__header\">\r\n<h4><strong>Does Data always have to be labelled?<\/strong><\/h4>\r\n<\/header>\r\n<div class=\"textbox__content\" style=\"text-align: center;\">Read <a href=\"https:\/\/pressbooks.pub\/aiforteachers\/chapter\/does-data-always-have-to-be-labeled\/\" target=\"_blank\" rel=\"noopener\">here<\/a><\/div>\r\n<\/div>\r\n<p class=\"no-indent\">WhenWhen the programmer is creating the application, they take data, extract features from it, choose an appropriate machine-learning algorithm (mathematical function which defines the process), and train it using labelled data (in the case where the output is known \u2013 like group A or group B) so that the machine <em>understands <\/em>the pattern behind the problem.<\/p>\r\n<p class=\"indent\">For a machine, <em>understanding <\/em>takes the form of a set of numbers \u2013 weights \u2013 that it assigns to each feature. With the correct assignment of weights, it can calculate the probability of a new card being in group A or group B. Typically, during the training stage, the programmer helps the machine by manually changing some values. This is called <strong>tuning<\/strong> the application.<\/p>\r\n<p class=\"indent\">Once this is done, the program has to be tested before being put to use. For this, the labelled data that was not used for training would be given to the program. This is called the <strong>test data<\/strong>. The machine\u2019s performance in predicting the output would then be gauged. Once determined to be satisfactory, the program can be put to use \u2013 it is ready to take new data and make a decision or prediction based on this data.<\/p>\r\n<p class=\"no-indent\"><img class=\"aligncenter wp-image-163 \" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page3-traintestuse-e1697823763965.png\" alt=\"\" width=\"469\" height=\"223\" \/>Can a model function differently on training and test datasets? How does the number of features affect performance on both? <a href=\"https:\/\/pressbooks.pub\/aiforteachers\/chapter\/how-many-features-are-too-many\/\" target=\"_blank\" rel=\"noopener\">Watch this video to find out.<\/a><\/p>\r\n<p class=\"indent\">The real-time performance is then continuously monitored and improved (feature weights are adjusted to get better output). Often, real-time performance gives different results than when ML is tested with already available data. Since experimenting with real users is expensive, takes a lot of effort, and is often risky, algorithms are always tested using historic user data, which may not be able to assess impact on user behaviour<sup>1<\/sup>. This is why it is important to do a comprehensive evaluation of machine learning applications, once in use:<\/p>\r\nhttps:\/\/youtu.be\/hdaXUk5gDT0?list=PLkm8ZqYSzE3d6lEWsWz0fWhtSAbjwR8Z7\r\n<p class=\"indent no-indent\">Feel like doing some hands on Machine Learning? <a href=\"hands-on-machine-learning\" target=\"_blank\" rel=\"noopener\" data-cke-saved-href=\"hands-on-machine-learning\">Try this activity.<\/a><\/p>\r\n\r\n\r\n<hr \/>\r\n<p class=\"hanging-indent\" style=\"text-align: left;\"><sup>1 <\/sup>Theobald, O. <em>Machine Learning For Absolute Beginners: A Plain English Introduction<\/em> (Second Edition) (Machine Learning From Scratch Book 1) (p. 24). Scatterplot Press. Kindle Edition.<\/p>\r\n<p class=\"hanging-indent\" style=\"text-align: left;\"><sup>2\u00a0<\/sup>Konstan, J., Terveen, L., <em>Human-centered recommender systems: Origins, advances, challenges, and opportunities<\/em>, AI Magazine, 42(3), 31-42, 2021.<\/p>","rendered":"<div class=\"textbox shaded\">We are updating the chapter soon in Telugu &#8230;please revisit in Jun 2025! Thank you!<\/div>\n<p>&nbsp;<\/p>\n<p class=\"no-indent\">An <strong>algorithm<\/strong> is a fixed sequence of instructions for carrying out a task. It breaks down the task into easy, confusion-free steps, like a well written recipe.<\/p>\n<p class=\"indent\">Programming languages are languages that a computer can follow and execute. They act as a bridge between what we and a machine can understand. Ultimately, these are switches that go on and off. For a computer\u00a0, images, videos, instructions are all 1s (switch is on) and 0s (switch is off).<\/p>\n<p class=\"indent\">When written in a programming language, an algorithm becomes a <strong>program<\/strong>. <strong>Applications<\/strong> are programs written for an end user.<\/p>\n<p class=\"indent\">Conventional programs take in data and follow the instructions to give an output. Many early AI programs were conventional. Since the instructions cannot adapt to the data, these programs were not very good at things like predicting based on incomplete information and natural language processing (NLP).<\/p>\n<p class=\"indent\"><a class=\"inline wrap\" href=\"https:\/\/scalar.usc.edu\/works\/artificial-intelligence-for-teachers\/media\/Green%20Illustrated%20Modern%20Social%20Media%20Marketing%20Report%20Presentation%20(1).jpg\" name=\"scalar-inline-media\" data-align=\"left\" data-annotations=\"\" data-size=\"medium\" data-caption=\"none\" data-cke-saved-name=\"scalar-inline-media\" data-cke-saved-href=\"https:\/\/scalar.usc.edu\/works\/artificial-intelligence-for-teachers\/media\/Green%20Illustrated%20Modern%20Social%20Media%20Marketing%20Report%20Presentation%20(1).jpg\"><\/a><img decoding=\"async\" class=\"wp-image-167 alignleft\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/EN-9.1.png\" alt=\"\" width=\"458\" height=\"258\" \/>A search engine is powered by both conventional and <strong>Machine learning<\/strong> algorithms. As opposed to conventional programs, ML algorithms analyse data for patterns and use these patterns or rules to make future decisions or predictions. So, based on data, good and bad examples, they find their own recipe.<\/p>\n<p class=\"indent\">These algorithms are well suited for situations with a lot of complexity and missing data. They can also monitor their own performance and use this feedback to become better.<\/p>\n<p class=\"indent\">This is not too different from humans, especially when we see babies learning skills outside the conventional educational system. Babies observe, repeat, learn, test their learning and improve. Where necessary, they improvise.<\/p>\n<p class=\"indent\">But the similarity between machines and humans is shallow. \u201cLearning\u201d from a human perspective is different, and way more nuanced and complex than \u201clearning\u201d for the machine.<\/p>\n<p>&nbsp;<\/p>\n<p><iframe id=\"oembed-1\" title=\"Machine Learning\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/e4w0sEjfxxs?list=PLkm8ZqYSzE3d6lEWsWz0fWhtSAbjwR8Z7\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3 style=\"text-align: left;\">A classification problem<\/h3>\n<figure id=\"attachment_66\" aria-describedby=\"caption-attachment-66\" style=\"width: 430px\" class=\"wp-caption alignright\"><img decoding=\"async\" class=\"wp-image-166\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card1.jpg\" alt=\"\" width=\"430\" height=\"242\" \/><figcaption id=\"caption-attachment-66\" class=\"wp-caption-text\">&#8220;Playing Card&#8221; par aquarianinsight.com\/free-readings\/ est sous licence CC BY-SA 2.0. Pour une copie de la licence, visitez <a href=\"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse\">https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse<\/a>.<\/figcaption><\/figure>\n<p class=\"no-indent\">One common task a ML application is used to perform is classification \u2013 is this a photo of a dog or a cat? Is this student struggling or will they pass the exam? There are two or more groups, and the application has to classify new data into one of them.<\/p>\n<p class=\"indent\">Let us take the example of a pack of playing cards \u2013 group A and group B \u2013 divided into two piles and following some pattern. We need to classify a new card, the ace of diamonds, as belonging to either group A or group B.<\/p>\n<p class=\"indent\">First, we need to understand how the groups are split \u2013 we need examples. Let us draw four cards from group A and four from group B. These eight example cases form our <strong>training set<\/strong> \u2013 data which helps us see the pattern \u2013 \u201ctraining\u201d us to see the result.<\/p>\n<p class=\"indent\">As soon as we are shown the arrangement to the right, most of us would guess that the ace of diamonds belongs to Group B. We do not need instructions, because the human brain is a pattern-finding marvel. How would a machine do this?<\/p>\n<p class=\"indent\">ML algorithms are built on powerful statistical theories. Different algorithms are based on different mathematical equations that have to be chosen carefully to fit the task at hand. It is the job of the programmer to choose the data, analyse what features of the data are relevant to the particular problem and choose the correct ML algorithm.<\/p>\n<h3 style=\"text-align: left;\">The importance of data<\/h3>\n<figure id=\"attachment_66\" aria-describedby=\"caption-attachment-66\" style=\"width: 442px\" class=\"wp-caption alignright\"><img decoding=\"async\" class=\"wp-image-65\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-300x169.jpg\" alt=\"\" width=\"442\" height=\"249\" srcset=\"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-300x169.jpg 300w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-1024x576.jpg 1024w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-768x432.jpg 768w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-1536x864.jpg 1536w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-65x37.jpg 65w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-225x127.jpg 225w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2-350x197.jpg 350w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-card2.jpg 1920w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><figcaption id=\"caption-attachment-66\" class=\"wp-caption-text\">&#8220;Playing Card&#8221; by aquarianinsight.com\/free-readings\/ is licenced under CC BY-SA 2.0. To view a copy of this licence, visit <a href=\"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse.\">https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/?ref=openverse.<\/a><\/figcaption><\/figure>\n<p class=\"no-indent\">The card-draw above could have gone wrong in a number of ways. Please refer to the image. 1 has too few cards, no guess would be possible. 2 has more cards but all of the same suit &#8211; no way to know where diamonds would go. If the groups were not of the same size, 3 could very well mean that number cards are in group A and picture cards in group B.<\/p>\n<p class=\"indent\">Usually machine learning problems are more open ended and involve data sets much bigger than a pack of cards. Training sets have to be chosen with the help of statistical analysis, or else errors creep in. Good data selection is crucial to a good ML application, more so than other types of programs. Machine learning needs a great number of relevant data. At an absolute minimum, a basic machine-learning model should contain ten times as many data points as the total number of features<sup>1<\/sup>. That said, ML is also particularly equipped to handle noisy, messy and contradictory data.<\/p>\n<h3 style=\"text-align: left;\">Feature Extraction<\/h3>\n<p class=\"no-indent\">When shown Group A and Group B examples above, the first thing you might have noticed could be the colour of the cards. Then the number or letter and the suit. For an algorithm, all these features have to be entered specifically.\u00a0It cannot automatically know what is important to the problem.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-66\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-300x183.png\" alt=\"\" width=\"452\" height=\"276\" srcset=\"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-300x183.png 300w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-768x469.png 768w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-65x40.png 65w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-225x137.png 225w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868-350x214.png 350w, https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page-3-Machine-learns-e1697825030868.png 940w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/p>\n<p class=\"no-indent\">While selecting the features of interest, programmers have to ask themselves many questions. <em>How many features are too few to be useful? How many features are too many? Which features are relevant for the task? What is the relationship between the chosen features &#8211; is one feature dependent on the other? With the chosen features, is it possible for the output to be accurate?<\/em><\/p>\n<p><iframe id=\"oembed-2\" title=\"What is the role of features?\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/r7uotL8oLiI?list=PLkm8ZqYSzE3d6lEWsWz0fWhtSAbjwR8Z7\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3 style=\"text-align: left;\">The process<\/h3>\n<div class=\"textbox textbox--sidebar textbox--examples\">\n<header class=\"textbox__header\">\n<h4><strong>Does Data always have to be labelled?<\/strong><\/h4>\n<\/header>\n<div class=\"textbox__content\" style=\"text-align: center;\">Read <a href=\"https:\/\/pressbooks.pub\/aiforteachers\/chapter\/does-data-always-have-to-be-labeled\/\" target=\"_blank\" rel=\"noopener\">here<\/a><\/div>\n<\/div>\n<p class=\"no-indent\">WhenWhen the programmer is creating the application, they take data, extract features from it, choose an appropriate machine-learning algorithm (mathematical function which defines the process), and train it using labelled data (in the case where the output is known \u2013 like group A or group B) so that the machine <em>understands <\/em>the pattern behind the problem.<\/p>\n<p class=\"indent\">For a machine, <em>understanding <\/em>takes the form of a set of numbers \u2013 weights \u2013 that it assigns to each feature. With the correct assignment of weights, it can calculate the probability of a new card being in group A or group B. Typically, during the training stage, the programmer helps the machine by manually changing some values. This is called <strong>tuning<\/strong> the application.<\/p>\n<p class=\"indent\">Once this is done, the program has to be tested before being put to use. For this, the labelled data that was not used for training would be given to the program. This is called the <strong>test data<\/strong>. The machine\u2019s performance in predicting the output would then be gauged. Once determined to be satisfactory, the program can be put to use \u2013 it is ready to take new data and make a decision or prediction based on this data.<\/p>\n<p class=\"no-indent\"><img decoding=\"async\" class=\"aligncenter wp-image-163\" src=\"http:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-content\/uploads\/sites\/30\/2024\/02\/ch2-page3-traintestuse-e1697823763965.png\" alt=\"\" width=\"469\" height=\"223\" \/>Can a model function differently on training and test datasets? How does the number of features affect performance on both? <a href=\"https:\/\/pressbooks.pub\/aiforteachers\/chapter\/how-many-features-are-too-many\/\" target=\"_blank\" rel=\"noopener\">Watch this video to find out.<\/a><\/p>\n<p class=\"indent\">The real-time performance is then continuously monitored and improved (feature weights are adjusted to get better output). Often, real-time performance gives different results than when ML is tested with already available data. Since experimenting with real users is expensive, takes a lot of effort, and is often risky, algorithms are always tested using historic user data, which may not be able to assess impact on user behaviour<sup>1<\/sup>. This is why it is important to do a comprehensive evaluation of machine learning applications, once in use:<\/p>\n<p><iframe id=\"oembed-3\" title=\"Evaluating\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/hdaXUk5gDT0?list=PLkm8ZqYSzE3d6lEWsWz0fWhtSAbjwR8Z7\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p class=\"indent no-indent\">Feel like doing some hands on Machine Learning? <a href=\"hands-on-machine-learning\" target=\"_blank\" rel=\"noopener\" data-cke-saved-href=\"hands-on-machine-learning\">Try this activity.<\/a><\/p>\n<hr \/>\n<p class=\"hanging-indent\" style=\"text-align: left;\"><sup>1 <\/sup>Theobald, O. <em>Machine Learning For Absolute Beginners: A Plain English Introduction<\/em> (Second Edition) (Machine Learning From Scratch Book 1) (p. 24). Scatterplot Press. Kindle Edition.<\/p>\n<p class=\"hanging-indent\" style=\"text-align: left;\"><sup>2\u00a0<\/sup>Konstan, J., Terveen, L., <em>Human-centered recommender systems: Origins, advances, challenges, and opportunities<\/em>, AI Magazine, 42(3), 31-42, 2021.<\/p>\n","protected":false},"author":1,"menu_order":3,"template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["pavankpammi","admin"],"pb_section_license":""},"chapter-type":[],"contributor":[82,60],"license":[],"class_list":["post-68","chapter","type-chapter","status-publish","hentry","contributor-pavankpammi","contributor-admin"],"aioseo_notices":[],"part":56,"_links":{"self":[{"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/chapters\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/chapters\/68\/revisions"}],"predecessor-version":[{"id":251,"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/chapters\/68\/revisions\/251"}],"part":[{"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/parts\/56"}],"metadata":[{"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/chapters\/68\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/pressbooks\/v2\/chapter-type?post=68"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/wp\/v2\/contributor?post=68"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.justwrite.in\/aiforteacherstelugu\/wp-json\/wp\/v2\/license?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}