In traditional applications developer designs and implement functionality for a specific requirement.The application which provides this functionality is supposed to give same result with the same set of input values and this is defined by how the application is implemented.In contrast in machine learning the out of application can vary with the same set of input values.This is because in Machine Learning ,application can learn and correct itself based on the accuracy of the outcome.
As the application learns from experience over time so it is called Machine Learning application.We use Machine learning for developing applications where we have the inputs and outputs but don’t have algorithm to give you expected output.Machine learning application identifies a function f(x) which helps generate output “y” from input “x“.This function is called model in machine learning.
The predictions or outcomes provided by Machine Learning application are normally unpredictable using conventional applications.
ML.NET is used for creating and training the Model and using the Model for making predictions.Azure Cognitive services uses prebuilt Models unlike ML.NET which is used for creating custom Models.
there are different types of problems which could be solved by machine learning and there are different categories of Machine Learning for solving those problems:
- Supervised learning Input consists of both the input values and the expected outcomes for those input values.
- Unsupervised learning Input consists of only input values and not the desired outcomes.
Classification and Regression are types of Supervised Machine learning.
- classification algorithm is used in classifying the data into different groups or labels e.g A,B.
- regression algorithm is used in finding values in a range of values such as the price of an item.
Some of the examples of unsupervised learning are:
- Clustering algorithm is used in finding groups in the data with similar data in each group.
ML.NET is a framework for building custom Machine learning models.It provides set of APIs for building models.Azure cognitive services provides pre trained machine learning models
ml.net while ml.net allows building custom models.
Though Python has been the preferred choice for developing Machine learning applications,ML.NET is used for developing Machine learning applications for the .NET platform.So if you are a .NET developer and have experience with languages such as C# then ML.NET is your best option.
We can have labelled data representing input and output but don’t have the application to generate output from input.
Datasets defines inputs and outputs to consumed in the application. Datasets have labels or classifier for each item in the Dataset. Machine learning application accepts input Dataset and identifies the function f(x) that relates the input to the output.
Libraries such as Tensorflow are complex to use while ML.NET API’s are relatively developer friendly.Also components in ML.NET are extensible .In fact functionalities such as loading data,transform data and deployment are easy to implement and are extensible.
For developing Machine Learning applications using ML.NET you first need to install .NET SDK. This can be installed from the following URL:
Once you have .NET SDK installed you are ready to create ML.NET application.You can use either Visual Studio or Visual Studio Code for developing Machine Learning Applications.To implement Machine Learning application you can create any .NET application such as a console application.You just need to add a Nuget for ML.NET to this application.Following the URL for ML.NET Nuget Microsoft.ML.
In machine learning application Model is responsible for the prediction of outcome and returns Labelled data as output.Features are characteristic of input which are used for the creating Model.If we are creating a Model related to Geography of a country we will need appropriate features to represent a Country.Such features could be Plains,Deserts,Mountains,Islands.
After we create a Model based on features appropriate to the problem we evaluate the Model to verify the correctness of Model.
Following are the general steps used in machine learning:
- Load data
- Transform data before generating model
- Generate Model.This is the most important component of any Machine learning application.
- Train model
- Evaluate model
ML.NET also follows the same approach and following steps are used when developing application using ML.NET
- create data(training and evaluation data) in any valid format such as CSVformat. Learning
- pipelines are used in ML.NET for creating model
- create class corresponding to this data
- train model
- Verify model In ML.NET there is an evaluate() method for this.
Following are the main components used in ML.NET application:
- IDataReader Uses for getting data.TextLoader is an example.
- Data is rerpresented using IDataView
- Transformer takes data and returns data after transforming it.
- Estimator This is the main component in ML.NET.It produces model.It is represented using
We can use ML.NET for classification and regression tasks.We need to train and generate model (saved as zip file).To do this we call the predictionModel method and pass the main class and class and get the model.
Leave a Reply