{"id":17885,"date":"2018-06-05T21:36:25","date_gmt":"2018-06-06T04:36:25","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=17885"},"modified":"2021-09-29T16:25:18","modified_gmt":"2021-09-29T23:25:18","slug":"announcing-ml-net-0-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-ml-net-0-2\/","title":{"rendered":"Announcing ML.NET 0.2"},"content":{"rendered":"<p>Last month at \/\/Build 2018, we released <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-ml-net-cross-platform-proven-and-open-source-machine-learning-framework\/\">ML.NET 0.1, a cross-platform, open source machine learning framework<\/a>. We would like to thank the community for the engagement so far in helping us shape ML.NET.<\/p>\n<p>Today we are releasing ML.NET 0.2. This release focuses on adding new ML tasks like clustering, making it easier to validate models, adding a brand-new repo for ML.NET samples and addressing a variety of issues and feedback we received in the <a href=\"https:\/\/github.com\/dotnet\/machinelearning\">GitHub repo<\/a>.<\/p>\n<p>Some of the highlights with ML.NET 0.2 release are mentioned below.<\/p>\n<h3>New Machine Learning Tasks: Clustering<\/h3>\n<p>Clustering is an unsupervised learning task that groups sets of items based on their features. It identifies which items are more similar to each other than other items.<\/p>\n<p>This might be useful in scenarios such as organizing news articles into groups based on their topics, segmenting users based on their shopping habits, and grouping viewers based on their taste in movies.<\/p>\n<p>The <a href=\"https:\/\/github.com\/dotnet\/machinelearning\/\">Iris Flower sample<\/a> illustrates how you can use Clustering with ML.NET 0.2<\/p>\n<h3>Easier model validation with cross-validation and train-test<\/h3>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Cross-validation_(statistics)\">Cross-validation<\/a> is an approach to validating how well your model statistically performs. It does not require a separate test dataset, but rather uses your training data to test your model (it partitions the data so different data is used for training and testing, and it does this multiple times).With ML.NET 0.2 you can now use cross-validation and here is a <a href=\"https:\/\/github.com\/dotnet\/machinelearning\/blob\/78810563616f3fcb0b63eb8a50b8b2e62d9d65fc\/test\/Microsoft.ML.Tests\/Scenarios\/SentimentPredictionTests.cs#L51\">good example<\/a>.<\/p>\n<p><strong>Train-test<\/strong> is a shortcut to testing your model on a separate dataset. See example usage <span><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/blob\/78810563616f3fcb0b63eb8a50b8b2e62d9d65fc\/test\/Microsoft.ML.Tests\/Scenarios\/SentimentPredictionTests.cs#L36\">here.<\/a><\/span><\/p>\n<h3>Train using data objects with CollectionDataSource<\/h3>\n<p>ML.NET 0.1 enabled loading data from a delimited text file.\u00a0CollectionDataSource\u00a0in ML.NET 0.2 adds the ability to use a collection of objects as the input to a\u00a0LearningPipeline.\n<strong>\n<\/strong>The code-snippet below shows how you can use CollectionDataSource with ML.NET 0.2.<\/p>\n<pre><code>var pipeline = new LearningPipeline();\r\nvar data = new List() {\r\n           new IrisData { SepalLength = 1f, SepalWidth = 1f \r\n                         ,PetalLength=0.3f, PetalWidth=5.1f, Label=1},\r\n           new IrisData { SepalLength = 1f, SepalWidth = 1f \r\n                         ,PetalLength=0.3f, PetalWidth=5.1f, Label=1},\r\n           new IrisData { SepalLength = 1.2f, SepalWidth = 0.5f \r\n                         ,PetalLength=0.3f, PetalWidth=5.1f, Label=0}\r\n           };\r\nvar collection = CollectionDataSource.Create(data);\r\npipeline.Add(collection); <\/code><\/pre>\n<p>Full code snippet for CollectionDataSource can be found <a href=\"https:\/\/github.com\/dotnet\/machinelearning\/blob\/78810563616f3fcb0b63eb8a50b8b2e62d9d65fc\/test\/Microsoft.ML.Tests\/CollectionDataSourceTests.cs#L133\">here<\/a>.<\/p>\n<h3>New ML.NET samples repo<\/h3>\n<p>We have created a new repo <a href=\"https:\/\/github.com\/dotnet\/machinelearning-samples\">https:\/\/github.com\/dotnet\/machinelearning-samples<\/a> and added a few getting started and end-end app samples.<\/p>\n<ul>\n<li><span><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/\">Sentiment Analysis<\/a><\/span> (Binary Classification)\nThis sample demonstrates how ML.NET can be used to analyze sentiment for customer reviews (positive or negative). The sample uses IMDB and Yelp reviews.<\/li>\n<li><span><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/\">Classification of Iris Flowers<\/a><\/span> (Multi-class Classification)\nThis sample is centered around predicting the type of an iris flower (setosa, versicolor, or virginica) based on the flower&#8217;s parameters such as petal length, petal width, etc.<\/li>\n<li><span><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/\">Taxi-Fare prediction<\/a><\/span> (Regression)\nTaxi-Fare prediction sample demonstrates how to build a ML.NET model for predicting New York City taxi fares. A regression model is used in this sample which takes into account features like number of passengers, type of credit and distance traveled.<\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/\">Cluster analysis on Iris Dataset<\/a> (Clustering)\nThe sample demonstrates how to build a clustering model with ML.NET by performing a cluster analysis on the Iris Dataset.<\/li>\n<li><span><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/\">GitHub Issue Classification<\/a><\/span> (Multi-class classification)\nThis is an E2E sample which shows how to use ML.NET to build a GitHub issue classifier.<\/li>\n<\/ul>\n<p>This blog post only goes over a few top announcements with ML.NET 0.2 release, the complete release notes for ML.NET 0.2 can be found\u00a0\u00a0<span><a href=\"https:\/\/github.com\/GalOshri\/machinelearning\/blob\/f026db2cdba1858b0e8bea2ddf2a4092a61bd708\/docs\/release-notes\/0.2\/release-0.2.md\">here<\/a><\/span>.<\/p>\n<h3>Help shape ML.NET for your needs<\/h3>\n<p>If you haven\u2019t already, try out ML.NET you can <a href=\"https:\/\/www.microsoft.com\/net\/learn\/apps\/machine-learning-and-ai\/ml-dotnet\/get-started\/windows\">get started here<\/a>. \u00a0We look forward to your feedback and welcome you to file file issues with any suggestions or enhancements in the GitHub repo.<\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/machinelearning\">https:\/\/github.com\/dotnet\/machinelearning<\/a><\/p>\n<p><em>This blog was co-authored by Gal Oshri and Ankit Asthana <\/em><\/p>\n<p>Thanks,\nML.NET Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month at \/\/Build 2018, we released ML.NET 0.1, a cross-platform, open source machine learning framework. We would like to thank the community for the engagement so far in helping us shape ML.NET. Today we are releasing ML.NET 0.2. This release focuses on adding new ML tasks like clustering, making it easier to validate models, [&hellip;]<\/p>\n","protected":false},"author":362,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685],"tags":[],"class_list":["post-17885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet"],"acf":[],"blog_post_summary":"<p>Last month at \/\/Build 2018, we released ML.NET 0.1, a cross-platform, open source machine learning framework. We would like to thank the community for the engagement so far in helping us shape ML.NET. Today we are releasing ML.NET 0.2. This release focuses on adding new ML tasks like clustering, making it easier to validate models, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/17885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=17885"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/17885\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=17885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=17885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=17885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}