{"id":3416,"date":"2024-09-01T13:49:44","date_gmt":"2024-09-01T13:49:44","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=3416"},"modified":"2024-09-01T13:49:45","modified_gmt":"2024-09-01T13:49:45","slug":"the-machine-learning-process","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/01\/the-machine-learning-process\/","title":{"rendered":"The Machine Learning Process"},"content":{"rendered":"\n<p id=\"Par87\">To be successful with applying&nbsp;machine&nbsp;learning to a problem, it\u2019s important to take a systematic approach. If not, the results could be way off base.<\/p>\n\n\n\n<p id=\"Par88\">First of all, you need to go through a data process, which we covered in the prior chapter. When this is finished, it\u2019s a good idea to do a visualization of the data. Is it mostly scattered? Or are there some patterns? If the answer is yes, then the data could be a good candidate for machine learning.<\/p>\n\n\n\n<p id=\"Par89\">The goal of the machine learning process is to create a model, which is based on one or more algorithms. We develop this by training it. The goal is that the model should provide a high-degree of predictability.<\/p>\n\n\n\n<p id=\"Par90\">Now let\u2019s take a closer look at this (by the way, this will also be applicable for deep learning, which we\u2019ll cover in the next&nbsp;chapter):<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #1\u2014Data Order<\/h3>\n\n\n\n<p id=\"Par91\">If your data is sorted, then this could skew the results. That is, the machine learning&nbsp;algorithm&nbsp;may detect this as a pattern! This is why it\u2019s a good idea to randomize the order of the data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #2\u2014Choose a Model<\/h3>\n\n\n\n<p id=\"Par92\">You will need to select an algorithm. This will be an educated guess, which will involve a process of trial and error. In this chapter, we\u2019ll look at the various algorithms available.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #3\u2014Train the Model<\/h3>\n\n\n\n<p id=\"Par93\">The&nbsp;training data, which will be about 70% of the complete dataset, will be used to create the relationships in the algorithm. For example, suppose you are building a machine learning system to find the value of a used car. Some of the features will include the year manufactured, make, model, mileage, and condition. By processing this training data, the algorithm will calculate the weights for each of these factors.<\/p>\n\n\n\n<p id=\"Par94\">Example: Suppose we are using a&nbsp;linear regression&nbsp;algorithm, which has the following format:<\/p>\n\n\n\n<p id=\"Par95\">y = m * x + b<\/p>\n\n\n\n<p id=\"Par96\">In the training phase, the system will come up with the values for m (which is the slope on a graph) and b (which is the y-intercept).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #4\u2014Evaluate the Model<\/h3>\n\n\n\n<p id=\"Par97\">You will put together&nbsp;test data, which is the remaining 30% of the dataset. It should be representative of the&nbsp;ranges&nbsp;and type of information in the&nbsp;training data.<\/p>\n\n\n\n<p id=\"Par98\">With the test data, you can see if the algorithm is accurate. In our used car example, are the market values consistent with what\u2019s happening in the real world?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Note<\/h3>\n\n\n\n<p id=\"Par99\">With the training and test data, there must not be any intermingling. This can easily lead to distorted results. Interestingly enough, this is a common mistake.<\/p>\n\n\n\n<p id=\"Par100\">Now&nbsp;accuracy&nbsp;is one measure of the success of the algorithm. But this can, in some cases, be misleading. Consider the situation with fraud deduction. There are usually a small number of features when compared to a dataset. But missing one could be devastating, costing a company millions of dollars in losses.<\/p>\n\n\n\n<p id=\"Par101\">This is why you might want to use other approaches like Bayes\u2019 theorem.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #5\u2014Fine-Tune the Model<\/h3>\n\n\n\n<p id=\"Par102\">In this step, we can adjust the values of the parameters in the algorithm. This is to see if we can get better&nbsp;results.<\/p>\n\n\n\n<p id=\"Par103\">When fine-tuning the model, there may also be&nbsp;hyperparameters. These are parameters that cannot be learned directly from the training process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To be successful with applying&nbsp;machine&nbsp;learning to a problem, it\u2019s important to take a systematic approach. If not, the results could be way off base. First of all, you need to go through a data process, which we covered in the prior chapter. When this is finished, it\u2019s a good idea to do a visualization of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3326,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[317],"tags":[],"class_list":["post-3416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-tools"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/08\/images-41-1.jpeg","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=3416"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3416\/revisions"}],"predecessor-version":[{"id":3417,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3416\/revisions\/3417"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/3326"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=3416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=3416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=3416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}