{"id":414,"date":"2015-05-07T09:00:00","date_gmt":"2015-05-07T09:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/2015\/05\/07\/azure-ml-ncaa-bracket-prediction-a-competitor-perspective\/"},"modified":"2019-03-07T13:47:59","modified_gmt":"2019-03-07T20:47:59","slug":"azure-ml-ncaa-bracket-prediction-a-competitor-perspective","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/azure-ml-ncaa-bracket-prediction-a-competitor-perspective\/","title":{"rendered":"Azure ML: NCAA Bracket Prediction \u2013 A competitor perspective"},"content":{"rendered":"<p><strong>Chandra Sekar<\/strong><strong>, Senior Application Development Manager,<\/strong> shares how his simple exploration into Azure Machine Learning quickly produced an accurate predication of March Madness.<\/p>\n<hr style=\"width: 100%;\" width=\"100%\" \/>\n<p>If you watched the Day 2 <a href=\"https:\/\/channel9.msdn.com\/Events\/Build\/2015\/KEY02\">BUILD keynote<\/a> you might have noticed Joseph Sirosh, CVP-Machine Learning, talking about an internal hackathon where competitors used Azure ML to predict the <a href=\"https:\/\/marchmadness2015.azurewebsites.net\/\">2015 March Madness bracket<\/a>. So how hard was it to develop an algorithm and generate a bracket which got me onto the leaderboard? I am not a data scientist but I have passion for machine learning and Azure ML have peaked my interest. I entered the contest just for a learning experience.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35976\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm1.png\" alt=\"\" width=\"693\" height=\"440\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm1.png 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm1-300x190.png 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Azure ML allows users to publish trained Machine Learning models as web services to quickly operationalize their experiments. The first step in the process is creating a Training experiment to train a model. The trained model is then published as a web service using a Scoring experiment. The end-result of this process is a \u201cdefault endpoint\u201d.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35978\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm2.jpg\" alt=\"\" width=\"693\" height=\"149\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm2.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm2-300x65.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>To begin, Sign <a href=\"https:\/\/studio.azureml.net\/\">into ML studio<\/a> and watch the get started videos and you will be on the way to creating your own first machine learning experiment.<\/p>\n<p>To get the NCAA Bracket prediction I used a standard classification algorithm \u201cTwo-Class Boosted Decision tree\u201d and fed the historical NCAA tournament data.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35979\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm3.jpg\" alt=\"\" width=\"693\" height=\"466\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm3.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm3-300x202.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>When I scored this simple model and evaluated the results, I wasn\u2019t satisfied since it pretty much picked as per the rankings and predicted all higher seeds to win every game. So I wanted to train it with a higher accuracy model and looked into R programming and standard R packages in the field. I used the infamous <a href=\"http:\/\/cran.r-project.org\/web\/packages\/rpart\/index.html\">rpart<\/a> to solve this classification problem and created another training experiment.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35980\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm4.jpg\" alt=\"\" width=\"693\" height=\"222\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm4.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm4-300x96.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Creating an R model was quite easy in ML studio, all I have to do was include the following training script so <a href=\"http:\/\/cran.r-project.org\/web\/packages\/rpart\/index.html\">that rpart package<\/a> is included and trains for Team1Wins or not over the mentioned features in my dataset.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35982\" style=\"box-sizing: inherit; color: #52595e; font-family: Arimo,Helvetica Neue,Arial,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; height: auto; letter-spacing: normal; max-width: 100%; orphans: 2; outline-color: #72777c; outline-style: solid; outline-width: 1px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: middle; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; border-style: none;\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm5.jpg\" alt=\"\" width=\"693\" height=\"271\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm5.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm5-300x117.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><b><\/b><i><\/i><u><\/u><span style=\"text-decoration: line-through;\"><\/span><\/p>\n<p>Once I ran the training experiment, I clicked on \u201cCreate Scoring Experiment\u201d and scored the model. I also included few R scripts to calculate weighted probabilities for each year\u2019s historical data.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35983\" style=\"box-sizing: inherit; color: #52595e; font-family: Arimo,Helvetica Neue,Arial,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; height: auto; letter-spacing: normal; max-width: 100%; orphans: 2; outline-color: #72777c; outline-style: solid; outline-width: 1px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: middle; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; border-style: none;\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm6.jpg\" alt=\"\" width=\"693\" height=\"302\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm6.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm6-300x131.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Once I evaluated the scored model, I looked at the probabilities of the result and to fine tune it I split the data with less accuracy and scored it with the trained model I created before with a standard \u201cTwo-class Boosted Decision tree\u201d algorithm. As you can see splitting and manipulating datasets for appropriate trained models is quite easy and doesn\u2019t need complex data transformation.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35984\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm7.jpg\" alt=\"\" width=\"693\" height=\"437\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm7.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm7-300x189.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Here is the generated bracket out of my predicted results. This was generated by a <a href=\"https:\/\/marchmadness2015.azurewebsites.net\/\">simple program<\/a> that the hackathon organizers used to call the web service provided by each participant.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35985\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm8.jpg\" alt=\"\" width=\"693\" height=\"535\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm8.jpg 693w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2015\/05\/mm8-300x232.jpg 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Isn\u2019t it amazing that with a few clicks I was able to create a web service that predicted an NCAA bracket&#8217;s <strong>final four teams accurately?<\/strong> Azure ML rocks!<\/p>\n<p>If you are interested in learning more about Azure ML, <a href=\"http:\/\/blogs.msdn.com\/b\/microsoft_press\/archive\/2015\/04\/15\/free-ebook-microsoft-azure-essentials-azure-machine-learning.aspx\">here<\/a> is our free Microsoft Press <a href=\"http:\/\/www.microsoftvirtualacademy.com\/ebooks#9780735698178\">ebook<\/a> by Jeff Barnes.<\/p>\n<hr style=\"width: 100%;\" width=\"100%\" \/>\n<h5><a href=\"https:\/\/blogs.msdn.com\/b\/premier_developer\/archive\/2014\/09\/15\/welcome.aspx\"><strong>Premier Support for Developers<\/strong><\/a> provides strategic technology guidance, critical support coverage, and a range of essential services to help teams optimize development lifecycles and improve software quality.\u00a0 Contact your Application Development Manager (ADM) or <a href=\"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/contact-us\/\">email us<\/a> to learn more about what we can do for you.<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>Chandra Sekar, Senior Application Development Manager, shares how his simple exploration into Azure Machine Learning quickly produced an accurate predication of March Madness. If you watched the Day 2 BUILD keynote you might have noticed Joseph Sirosh, CVP-Machine Learning, talking about an internal hackathon where competitors used Azure ML to predict the 2015 March Madness [&hellip;]<\/p>\n","protected":false},"author":582,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[137,24,265,3],"class_list":["post-414","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-permierdev","tag-advisory","tag-azure","tag-machine-learning","tag-team"],"acf":[],"blog_post_summary":"<p>Chandra Sekar, Senior Application Development Manager, shares how his simple exploration into Azure Machine Learning quickly produced an accurate predication of March Madness. If you watched the Day 2 BUILD keynote you might have noticed Joseph Sirosh, CVP-Machine Learning, talking about an internal hackathon where competitors used Azure ML to predict the 2015 March Madness [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=414"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/414\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}