>> In this video, we will take a quick look at ML.Net.
ML.Net is an open source and
cross-platform machine learning framework.
It has the following key highlights.
It is built for Dr. developers.
So as a Dr. developer,
you can use your existing C-sharp and F-sharp skills
and use ML.Net in any.Net application.
It allows custom machine learning models
to be made easily with tools such as ModelBuilder,
CLI, and it uses automated machine learning as
a way to increase the performance of the models that users get.
The framework and the ecosystem is very extensible.
So you can bring in other popular libraries such as
TensorFlow and other popular model formats such as ONNX.
So you can build
machine learning models for the variety of different scenarios.
Lastly, the framework is trusted,
privacy, and proven at scale.
That means that the framework runs locally within your app.
So all the trading happens within your app.
Then the framework has been
used heavily for the last 10 plus years,
both internally at Microsoft and now externally by customers.
So it's hard-earned quite a lot.
Let's take a quick look at the ML.Net
website and HelloWorld tutorial for ML.Net.
This is how you can learn more about ML.Net.
It's custom machine learning framework for.Net developers.
Here, this piece of code is showing you how you can use
your C-sharp libraries to build custom machine learning model.
You can do the following scenarios with ML.Net.
So you can build models for
sentiment analysis, product recommendation,
price prediction, image classification,
sales forecasting, and a lot more.
You can check out these samples that we have on GitHub to
learn more about this other scenarios possible with ML.Net.
ML.Net also uses automated machine learning under
the covers with tools like the ModelBuilder and the CLI,
which allows you to build custom machine learning models
without any configuration required.
So as a developer, you don't have to know
the intrinsics of all machine learning models and settings,
and you can quickly build custom models using these tools.
You can easily bring in the ecosystem for
more other scenarios such as
image classification, object detection,
Natural Language Processing, or building
models on sound and audio-based data,
by using TensorFlow and
other popular libraries from the ecosystem.
ML.Net performs really well.
It has got high performance and accuracy.
This was a result of performance paper which
shows how ML.Net pipelines compared to scikit-learn and H2O.
You can read more using
this link about the performance characteristics.
So here are some of the customers using ML.Net today.
So let's take a quick overview of
getting started with the machine
learning.Net in your.Net application.
So what I have over here is a blazer application,
and you can think about
this application as an e-commerce site where
customers can go and leave you reviews.
In this case, I can come over here as a customer and I can say,
ML is hard but as an e-commerce site owner,
it's very hard for me to understand
what was the sentiment of this customer.
Was this customer happy or was this customer sad?
Now, as a web developer,
I would like to use machine learning to build
a custom model for doing
sentiment analysis so I can
better understand this customer behavior.
So let's go back to Visual Studio
and build this custom machine learning model.
I can right-click on my project and I have
a new options saying, right add machine-learning.
This option is available if you download
the model builder tool for Visual Studio.
If I launch this extension,
I'm presented with an option of choosing a scenario.
Now, as a developer,
I'm more likely to understand what scenarios are
possible with machine learning
rather than the actual machine learning tasks.
So in this case, since I want to
build a model for sentiment analysis,
I'm going to choose that template.
The next step in the machine learning journey
is around connecting to your data.
Since most of the developers have the data in SQL,
I can choose to either upload a flat file which is a CSP or TSP,
or I can directly connect to
SQL Server where my application specific data is.
Let's go ahead and quickly connect to SQL Server.
In this case, I'm going to connect to
a SQL Server instance which is locally running on my box.
I'm going to use Windows Authentication,
and I'm going to load up my table of
customer reviews which has
all the reviews of the customer comments.
I'm going to select the table column, table review,
and I can get a quick overview of what my data looks like.
So I have three columns and the appropriate sentiment and
the actual sentiment text
which was the common text that the user entered.
In this case, I want to predict
the sentiment of the particular text.
So I would choose sentiment from this drop-down,
which is the output of the machine learning model,
which is what column are you predicting.
The next step in this process is
around training the machine learning model.
In this case, Modelbuilder uses
automated machine learning which
explores different models with various settings,
and it's going to come back with the best model it found so far.
The longer I train for,
the better model I'll get.
In this case, ModelBuilder chooses some defaults based
on how large my dataset was.
So in this case, it looks like the training completed and I can
evaluate this training process
to see what was the accuracy of the models.
In this case, I got
SDCA logistic regression with an 81 percent accuracy,
and this tool is telling me that it
tried two other different models in this time-frame.
The last step in this process is code.
Since I'm running my web application,
I can easily add code for how
the model was trained and
code to consume this model in my application.
So when I hit "Add projects",
it added these two projects to my solution.
One is a project for how the model was
trained and it actually has the training code.
The other one is around how
the model can be consumed in my blazer app.
So I'm going to right-click and add
a reference through this generated class library.
Then I'm going to go back to my blazer app,
and I'm going to consume this model in my application.
So here the code I'm
uncommenting is the code to consume the model,
and the predict function is the function I could call to
predict the sentiment of a text.
I'll go back to my razor view,
and I will include a view which is
going to give me a happiness scale
and it's going to give me emojis for a happy face or a sad face.
Lastly, I'm going to call
into this predict function which are going to
pass in the common text
and it's going to give me a sentiment back.
So let's start this application again and see what was
the impact of building a custom machine learning model.
So if I could now go to review screen,
you will see that the emoji cons
that appeared because of the changes to the view,
and if I say ML is hard,
now I can see what's the sentiment of my customer is.
If I change it to ML is fun with ML.Net,
you can see it's about a 99 percent accuracy.
So just to summarize very quickly,
I started with an app which had no Machine Learning and I
quickly launched ModelBuilder using
right-click add Machine Learning,
which allowed me to build
a custom model for doing sentiment analysis,
which I was easily able to include in my application,
and then I'm better able to understand
customer's sentiments on my e-commerce website.
So this was a quick overview
of how to get started with the ML.Net.
What ML.Net also provides,
it's got a very strong momentum in the open source community.
This is the URL for our GitHub location.
We have 250k plus downloads, 1,800 commits,
1,500 PRs, a 100 plus people contributing on the open source repo.
The framework is used both internally for
the last five plus years at different products at Microsoft,
and it's been also been used externally quite heavily.
Here are few case studies from
customers using ML.Net in production.
BRENMOR uses ML.Net to
classify free-form comments from patient surveys.
So they get lot of surveys and they want to classify
those surveys into different categories in their departments.
So they've built a custom machine learning model for it.
Evolution software is using
ML.Net to predict hazelnut moisture levels.
So the challenge that they have over here
is hazelnut drying is a very complicated process,
and it takes a lot of manual labor to figure out
what's the right humidity level for the hazelnuts to dry.
So they built a custom machine model which takes
different inputs and then predicts the moisture content.
They end up building a website and
a Cloud tablet app as well to
figure out the hazelnut drying levels.
In this video, we took
a quick overview Introduction to Machine Learning.Net.
In the next video, we'll be looking
at how to get started with ML.Net.