{"id":47,"date":"2018-09-03T21:30:00","date_gmt":"2018-09-03T19:30:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/2018\/09\/03\/ml-net-tutorial-1-introduction-to-machine-learning-in-net-beginner-to-expert\/"},"modified":"2020-08-22T14:20:31","modified_gmt":"2020-08-22T12:20:31","slug":"ml-net-tutorial-1-introduction-to-machine-learning-in-net-beginner-to-expert","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/ml-net-tutorial-1-introduction-to-machine-learning-in-net-beginner-to-expert\/","title":{"rendered":"ML.Net Tutorial 1: Introduction to Machine Learning in .Net (Beginner to Expert)"},"content":{"rendered":"<p>My name is Kindson The Genius and today, I would introduce you to Machine Learning using .Net. Yes, .net C# programmer can now develop Machine Learning models using the .net framework in visual studio.<br \/>\n<ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"4209786523\"><\/ins><\/p>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<p>In this series of tutorials, I would show you exactly how to do this. We would cover the following:<\/p>\n<ol>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/ml-net-tutorial-1-introduction-to-machine-learning-in-net-beginner-to-expert#t1\">What is Machine Learning<\/a><\/li>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/ml-net-tutorial-1-introduction-to-machine-learning-in-net-beginner-to-expert#t2\">Machine Learning in .Net<\/a><\/li>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/ml-net-tutorial-1-introduction-to-machine-learning-in-net-beginner-to-expert#t3\">How to Set up ML.Net in Visual Studio<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>You will also be happy to know that Machine Learning is a very clear and easy to follow topic very much unlike the sound of the name.<\/p>\n<p>&nbsp;<\/p>\n<h4><b id=\"t1\">1. What is Machine Learning?<\/b><\/h4>\n<p>Maching Learning is simply a situation where the computer examines a dataset and then use the information to make prediction.<br \/>\nThis is the same thing we do everyday, but this time we want the compute to do it simply because it would be faster.<\/p>\n<p><i><span style=\"color: #990000;\">Take an example<\/span><\/i><br \/>\nTake a look at the table below. The color of the fruit and the weight is provided, and then the last column contains the type of fruit.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/4.bp.blogspot.com\/-pWLyakzVMLI\/W42fONqdWvI\/AAAAAAAACHE\/sakyn60dkCkCcssXncKF0CRf3coqeVKEgCLcBGAs\/s1600\/Machine%2BLearning%2BClassification%2BImage.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/4.bp.blogspot.com\/-pWLyakzVMLI\/W42fONqdWvI\/AAAAAAAACHE\/sakyn60dkCkCcssXncKF0CRf3coqeVKEgCLcBGAs\/s400\/Machine%2BLearning%2BClassification%2BImage.jpg\" width=\"400\" height=\"185\" border=\"0\" data-original-height=\"430\" data-original-width=\"929\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p>In the last record, what do you think would be the type of fruit? You guess right! It would be Grape. The reason follows from the\u00a0 previous records.<br \/>\nSince grapes in the previous records have a weigh of about 8 to 10 and has a color of green, therefore this must be grape.<\/p>\n<p>Now the color and the weight are called features. The Fruit is called the Class in machine language terms. In this case, there are two classes: Apple and Grape and also two features: Color and Weight.<\/p>\n<p>This is what machine learning is all about: <i><b><span style=\"color: #274e13;\">examine the features and determine the class.<\/span><\/b><\/i><br \/>\n<i><\/i><b><\/b><br \/>\nThis is a typical example of <b>Classification<\/b>, a branch of machine learning. The other branches are <b>Regression<\/b> and <b>Clustering<\/b>.<\/p>\n<p><ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"4209786523\"><\/ins><br \/>\n<b><\/b><\/p>\n<h4><b id=\"t2\">2. Machine Learning in .Net<\/b><\/h4>\n<p>Microsoft have provided a package called ML.net that can be added to Visual Studio and used to solve Machine Learning Problems.<\/p>\n<p>To create machine learning problem, there are four steps to follow:<\/p>\n<p><b>Step 1<\/b>: Create a new Project<br \/>\n<b>Step 2<\/b>: Add your data into the project<br \/>\n<b>Step 3<\/b>: Train the model (the system examines your data to understand it)<br \/>\n<b>Step 4:<\/b> Make prediction on new data<\/p>\n<p>This are the basic steps we would follow in Tutorial 2 to create a model and use it to make prediction.<\/p>\n<p>&nbsp;<\/p>\n<h4><b id=\"t3\">3. How to Set up ML.Net<\/b><\/h4>\n<p><b><\/b>Before you continue to Tutorial 2, do the following:<\/p>\n<ul>\n<li>Create a new Solution in Visual Studio<\/li>\n<li>Add ML.Net Package to your Solution from the Nugget Manager<\/li>\n<li>Download the dataset to your computer from <a href=\"https:\/\/drive.google.com\/open?id=13u40alXY85O6fMC-kK9NUSkN5UFNK6FQ\" target=\"_blank\" rel=\"noopener\">this link<\/a><\/li>\n<li>Save it as flowers.txt<\/li>\n<\/ul>\n<p>Now you are all set, so we proceed to Step 2.<\/p>\n<p><ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"4209786523\"><\/ins><br \/>\n<ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"4209786523\"><\/ins><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My name is Kindson The Genius and today, I would introduce you to Machine Learning using .Net. Yes, .net C# programmer can now develop Machine &hellip; <\/p>\n","protected":false},"author":2,"featured_media":551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[11,16,585,139],"tags":[],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/47"}],"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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":7,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":1298,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/47\/revisions\/1298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media\/551"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}