
This video will give you an overview about the course.
Machine Learning is a vast subject. Get an overview of what it is and how we will use it for our price prediction regression model.
• What is the problem
• What is our goal application
• What is Machine Learning
What is a Machine Learning model? Visual Studio has a feature to help you find the best performing model for your problem – the Model Builder. Learn how to install it.
• You learn what a Machine Learning model is
• You learn how to install the model as a preview feature of Visual Studio
• You learn how to install the model as a Visual Studio Extension
The number of Machine Learning algorithms and models are overwhelming. Learn how to use the Model Builder for selecting the best performing model for you – and generate the code for it.
• You learn how to configure the model builder for your scenario and dataset
• You let the Model builder evaluate different models
• You generate the code for training and using the final model
Learn how to use the trained model in your .NET applications.
• You learn about the code that was generated by the Model Builder
• You incorporate the model in the WPF Desktop application
• You run the final application to see the model in action
The Model Builder requires Visual Studio and Windows. Learn how to generate models with AutoML, using the cross-platform ML.NET CLI tool instead.
• Learn what the ML.NET CLI tool is
• Install the ML.NET CLI tool
• Use the ML.NET CLI tool to generate the model for the Laptop price prediction task
An overview of our section goal – the sentiment analysis aggression scorer API – and the dataset.
• Learn about the section goal – sentiment analysis
• See the goal application API and frontend
• Get an overview of the data set
Data needs to be processed and used by a training algorithm to train a model. Learn how to set up the pipeline to train a Machine Learning model.
• What is a pipeline
• What is data processing
• Learn how a training pipeline looks like in C# and ML.NET
Implement a pipeline and train a model for the aggression scorer sentiment analysis, using C# and ML.NET.
• Create a training pipeline for the aggression scorer model
• Use the pipeline and input data to train and save a model
• Test that the model can score aggression
A Machine Learning model is of no bigger use of its own; here we will deploy the model and use it in an ASP.NET core Web API.
• Finalize the model project
• Write helper code to use the model
• Use the model in the Web API using a PredictionEnginePool
How do we know that the model is good? Learn how to evaluate the model using standard evaluation metrics and how to improve the accuracy using normalization.
• Evaluate the model with ML.NET evaluation method
• Learn about evaluation metrics
• Use normalization to improve the model accuracy
A model is only useful if it is good at predicting on data it has not seen before. Split the data into training and testing sets to assess the model generalization.
• Learn about model generalization
• Split the data into a training and a testing set
• Evaluate the model on the unseen data
As we get access to more data, we need a way to improve the model with the new knowledge. In this video we retrain the aggression scorer model with more data and see the result.
• Retrain the model with more data
• Deploy the retrained model into the Web API
• Verify that the aggression scorer now works better
A model is only as good as it can generalize to unseen data. When selecting models and training algorithms, evaluate them with K-Fold Cross-validation to assess which performs best on unseen data.
• Learn about cross-validation
• Learn how pre-processing affects cross-validation
• Evaluate two different trainers with cross-validation
Categorization requires the model to be able to classify the input into multiple categories. This requires training of a multi class classification model.
• Learn about multi class classification
• Learn about the “One versus all” special case
• Get an introduction to AutoML
There are many algorithms and models for multi-class classification. Use the AutoML feature of ML.NET to find the best model for your data, using C# code.
• Learn about AutoML
• Learn how to set up AutoML experiments
• Use AutoML to find the best multi-class classification model
Multi-class classification models are evaluated on different metrics than binary classification models. Learn about multi-class classification metrics, implement the model that AutoML found, and evaluate it.
• Learn about multi-class classification evaluation metrics
• Implement the best model found by AutoML
• Evaluate the model on the multi-class classification metrics
The quality of the training data has a big effect on the usefulness of the model. For multi-class classification problems – unbalanced data can make the model useless. Counteract this by balancing your training data.
• Learn about imbalanced data
• Remove data from your training set
• See how this affects the evaluation metrics
Product recommendation is standard features of any e-commerce site today. Learn about recommender systems, using collaborative filtering.
• Learn what a recommender system is
• Learn about collaborative filtering and Matrix factorization
• Learn about the restaurant ratings data set
Build a recommender engine, based on similar user’s ratings to recommend restaurants.
• Preprocess the input data
• Train a collaborative filtering model using Matrix Factorization
• Get restaurant recommendations using the prediction engine
Training algorithms, such as matrix factorization needs to be configured. Explore the hyper parameter space to find the best options for the trainer.
• Learn about multi-dimensional optimization problems
• Explore hyper parameters for the recommender modfel
• Retrain the model with the new hyper parameters
Improvements in image classification has been one of the biggest advances in Machine Learning in the latest years. Learn how image classification models work in.
• Learn about the goal application of this section
• Learn about image classification
• Familiarize yourself with the training images data set
Training deep learning models for image classification takes more time and resources than most people have access to. Shortcut this using transfer learnings from pre-trained TensorFlow models.
• Learn about deep learning
• Learn how transfer learning and TensorFlow works
• Learn how to train custom image classification models
Traditionally, a language like Python was needed to use TensorFlow. Now it is possible to integrate TensorFlow in a .NET application. Train a custom ML.NET image classification model, based on a pre-trained TensorFlow model using transfer learning.
• Build a preprocessing pipeline
• Set up an image classification trainer
• Evaluate the model on the test images set
Having trained a custom image classification model with a pre-trained TensorFlow model as base – deploy it into the goal application and use it.
• Deploy the custom image classification model
• Write the code to use the model
• Run the model within the WinForms application
Training image classification models takes a lot of time. Decrease the training time by training on the GPU instead of the CPU.
• Learn what a GPU is
• Install the pre-requisites
• Train the image classification model on the GPU
Machine Learning models have traditionally been locked in into the language or framework they were trained in. The ONNX format was invented to make models portable.
• Learn what ONNX is
• Find pre-trained ONNX models
• See the goal application of the section
To be able to use an ONNX model, you must first know how to pre-process the input data and how to post process the output result. Learn how to do this for the FER+ model used in this section.
• Inspect the model file with Neutron
• Write a config struct in C#
• Get a tour of the Visual Studio solution
Each ONNX model is different. Implement the C# code to use the FER+ model in our application.
• Load the ONNX model file
• Create the preprocessing pipeline
• Extract the output values from the ONNX model
Extract images from files and the webcam in the goal dotnet core console application and dotnet core WinForms application and detect emotions from facial expressions.
• Go through the application structure
• Use the ONNX model on image files
• Use the ONNX model on webcam input
If you need to use your ML.NET models in other languages, frameworks or operating systems – such as Python on Linux, you need to convert the models into the ONNX format
• Install the ONNX.convert NuGet
• Convert the section 1 model into ONNX
• View the ONNX file in Neutron
ML.NET enables developers utilize their .NET skills to easily integrate machine learning into virtually any .NET application. This course will teach you how to implement machine learning and build models using Microsoft's new Machine Learning library, ML.NET. You will learn how to leverage the library effectively to build and integrate machine learning into your .NET applications.
By taking this course, you will learn how to implement various machine learning tasks and algorithms using the ML.NET library, and use the Model Builder and CLI to build custom models using AutoML.
You will load and prepare data to train and evaluate a model; make predictions with a trained model; and, crucially, retrain it. You will cover image classification, sentiment analysis, recommendation engines, and more! You'll also work through techniques to improve model performance and accuracy, and extend ML.NET by leveraging pre-trained TensorFlow models using transfer learning in your ML.NET application and some advanced techniques.
By the end of the course, even if you previously lacked existing machine learning knowledge, you will be confident enough to perform machine learning tasks and build custom ML models using the ML.NET library.
About the Author
Karl Tillström has been passionate about making computers do amazing things ever since childhood and is strongly driven by the magic possibilities you can create using programming. This makes advances in machine learning and AI his holy grail; since he took his first class in artificial neural networks in 2007, he has experimented with machine learning by building all sorts of things, ranging from Bitcoin price prediction to self-learning Gomoku playing AI.
Karl is a software engineer and systems architect with over 15 years' professional experience in .Net, building a wide variety of systems ranging from airline mobile check-ins to online payment systems.
Driven by his passion, he took a Master's degree in Computer Science and Engineering at the Chalmers University of Technology, a top university in Sweden.