<p><b>Create, train, and evaluate various machine learning models such as regression, classification, and clustering using ML.NET, Entity Framework, and ASP.NET Core</b></p> <h4>Key Features</h4> <ul><li>Get well-versed with the ML.NET framework and its components and APIs using practical examples <
Hands-On Machine Learning with ML.NET: Getting started with Microsoft ML.NET to implement popular machine learning algorithms in C#
β Scribed by Jarred Capellman
- Publisher
- Packt Publishing
- Year
- 2020
- Tongue
- English
- Leaves
- 287
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Create, train, and evaluate various machine learning models such as regression, classification, and clustering using ML.NET, Entity Framework, and ASP.NET Core
Key Features
- Get well-versed with the ML.NET framework and its components and APIs using practical examples
- Learn how to build, train, and evaluate popular machine learning algorithms with ML.NET offerings
- Extend your existing machine learning models by integrating with TensorFlow and other libraries
Book Description
Machine learning (ML) is widely used in many industries such as science, healthcare, and research and its popularity is only growing. In March 2018, Microsoft introduced ML.NET to help .NET enthusiasts in working with ML. With this book, you'll explore how to build ML.NET applications with the various ML models available using C# code.
The book starts by giving you an overview of ML and the types of ML algorithms used, along with covering what ML.NET is and why you need it to build ML apps. You'll then explore the ML.NET framework, its components, and APIs. The book will serve as a practical guide to helping you build smart apps using the ML.NET library. You'll gradually become well versed in how to implement ML algorithms such as regression, classification, and clustering with real-world examples and datasets. Each chapter will cover the practical implementation, showing you how to implement ML within .NET applications. You'll also learn to integrate TensorFlow in ML.NET applications. Later you'll discover how to store the regression model housing price prediction result to the database and display the real-time predicted results from the database on your web application using ASP.NET Core Blazor and SignalR.
By the end of this book, you'll have learned how to confidently perform basic to advanced-level machine learning tasks in ML.NET.
What you will learn
- Understand the framework, components, and APIs of ML.NET using C#
- Develop regression models using ML.NET for employee attrition and file classification
- Evaluate classification models for sentiment prediction of restaurant reviews
- Work with clustering models for file type classifications
- Use anomaly detection to find anomalies in both network traffic and login history
- Work with ASP.NET Core Blazor to create an ML.NET enabled web application
- Integrate pre-trained TensorFlow and ONNX models in a WPF ML.NET application for image classification and object detection
Who this book is for
If you are a .NET developer who wants to implement machine learning models using ML.NET, then this book is for you. This book will also be beneficial for data scientists and machine learning developers who are looking for effective tools to implement various machine learning algorithms. A basic understanding of C# or .NET is mandatory to grasp the concepts covered in this book effectively.
Table of Contents
- Getting started with Machine Learning and ML.NET
- Setting up the ML.NET environment
- Regression Model
- Classification Model
- Clustering Model
- Anomaly Detection Model
- Matrix Factorization Model
- Using ML.NET with .NET Core and Forecasting
- Using ML.NET with ASP.NET
- Using ML.NET with UWP
- Training and Building Production Models
- Using Tensorflow with ML.NET
- Using ONNX with ML.NET
β¦ Table of Contents
Cover
Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Table of Contents
Preface
Section 1: Fundamentals of Machine Learning and ML.NET
Chapter 1: Getting Started with Machine Learning and ML.NET
The importance of learning about machine learning today
The model building process
Defining your problem statement
Defining your features
Obtaining a dataset
Feature extraction and pipeline
Model training
Model evaluation
Exploring types of learning
Supervised learning
Unsupervised learning
Exploring various machine learning algorithms
Binary classification
Regression
Anomaly detection
Clustering
Matrix factorization
What is ML.NET?
Technical details of ML.NET
Components of ML.NET
Extensibility of ML.NET
Summary
Chapter 2: Setting Up the ML.NET Environment
Setting up your development environment
Installing Visual Studio
Installing .NET Core 3
Creating a process
Creating your first ML.NET application
Creating the project in Visual Studio
Project architecture
Running the code
The RestaurantFeedback class
The RestaurantPrediction class
The Trainer class
The Predictor class
The BaseML class
The Program class
Running the example
Evaluating the model
Summary
Section 2: ML.NET Models
Chapter 3: Regression Model
Breaking down regression models
Choosing the type of regression model
Choosing a linear regression trainer
Choosing a logistic regression trainer
Creating the linear regression application
Diving into the trainer
Exploring the project architecture
Diving into the code
The ExtensionMethods class
The EmploymentHistory class
The EmploymentHistoryPrediction class
The Predictor class
The Trainer class
The Program class
Running the application
Creating the logistic regression application
Exploring the project architecture
Diving into the code
The FeatureExtractor class
The FileInput class
The FilePrediction class
The BaseML class
The Predictor class
The Trainer class
The Program class
Running the application
Evaluating a regression model
Loss function
Mean squared error
Mean absolute error
R-squared
Root mean squared error
Summary
Chapter 4: Classification Model
Breaking down classification models
Choosing a classification trainer
Creating a binary classification application
Diving into the trainer
Exploring the project architecture
Diving into the code
The CarInventory class
The CarInventoryPrediction class
The Predictor class
The Trainer class
The Program class
Running the application
Creating a multi-class classification application
Diving into the trainer
Exploring the project architecture
Diving into the code
The Email class
The EmailPrediction class
The Predictor class
The Trainer class
Running the application
Evaluating a classification model
Accuracy
Area Under ROC Curve
F1 Score
Area Under Precision-Recall Curve
Micro Accuracy
Macro Accuracy
Log Loss
Log-Loss Reduction
Summary
Chapter 5: Clustering Model
Breaking down the k-means algorithm
Use cases for clustering
Diving into the k-means trainer
Creating the clustering application
Exploring the project architecture
Diving into the code
The Constants class
The BaseML class
The FileTypes enumeration
The FileData class
The FileTypePrediction class
The FeatureExtractor class
The Predictor class
The Trainer class
The Program class
Running the application
Evaluating a k-means model
Average distance
The Davies-Bouldin Index
Normalized mutual information
Summary
Chapter 6: Anomaly Detection Model
Breaking down anomaly detection
Use cases for anomaly detection
Diving into the randomized PCA trainer
Diving into time series transforms
Creating a time series application
Exploring the project architecture
Diving into the code
The NetworkTrafficHistory class
The NetworkTrafficPrediction class
The Predictor class
The Trainer class
The Program class
Running the application
Creating an anomaly detection application
Exploring the project architecture
Diving into the code
The Constants class
The LoginHistory class
The LoginPrediction class
The Predictor class
The Trainer class
Running the application
Evaluating a randomized PCA model
Area under the ROC curve
Detection rate at false positive count
Summary
Chapter 7: Matrix Factorization Model
Breaking down matrix factorizations
Use cases for matrix factorizations
Diving into the matrix factorization trainer
Creating a matrix factorization application
Exploring the project architecture
Diving into the code
The MusicRating class
The MusicPrediction class
The Predictor class
The Trainer class
The Constants class
Running the application
Evaluating a matrix factorization model
Loss function
MSE
MAE
R-squaredΒ
RMSE
Summary
Section 3: Real-World Integrations with ML.NET
Chapter 8: Using ML.NET with .NET Core and Forecasting
Breaking down the .NET Core application architecture
.NET Core architecture
.NET Core targets
.NET Core future
Creating the stock price estimator application
Exploring the project architecture
Diving into the code
The ProgramActions enumeration
The CommandLineParser class
The BaseML class
The StockPrediction class
The StockPrices class
The Predictor class
The Trainer class
The ProgramArguments class
The Program class
Running the application
Exploring additional production application enhancements
Logging
Utilizing Reflection further
Utilizing a database
Summary
Chapter 9: Using ML.NET with ASP.NET Core
Breaking down ASP.NET Core
Understanding the ASP.NET Core architecture
Controllers
Models
Views
Blazor
Creating the file classification web application
Exploring the project architecture
Diving into the library
The FileClassificationResponseItem class
The FileData class
The FileDataPrediction class
The Converters class
The ExtensionMethods class
The HashingExtensionsΒ class
The FileClassificationFeatureExtractor class
The FileClassificationPredictor class
The FileClassificationTrainer class
Diving into the web application
The UploadController class
The Startup class
The Index.razor file
Diving into the trainer application
The ProgramArguments class
The ProgramActions enumeration
The Program class
Running the trainer application
Running the web application
Exploring additional ideas for improvements
Logging
Utilizing a caching layer
Utilizing a database
Summary
Chapter 10: Using ML.NET with UWP
Breaking down the UWP architecture
Views
Models
View Models
Creating the web browser classification application
Exploring the project architecture
Diving into the library
The Constants class
The WebPageResponseItem class
The Converters class
The ExtensionMethods class
The WebPageInputItem class
The WebPagePredictionItem class
The WebContentFeatureExtractor class
The WebContentPredictor class
The WebContentTrainer class
Diving into the UWP browser application
The MainPageViewModel class
MainPage.xaml
MainPage.xaml.cs
Diving into the trainer application
The ProgramArguments class
The Program class
Running the trainer application
Running the browser application
Additional ideas for improvements
Single-download optimization
Logging
Utilizing a database
Summary
Section 4: Extending ML.NET
Chapter 11: Training and Building Production Models
Investigating feature engineering
PNG image files with embedded executables
Creating a PNG parser
Obtaining training and testing datasets
Creating your model-building pipeline
Discussing attributes to consider in a pipeline platform
Exploring machine learning platforms
Azure Machine Learning
Apache Airflow
Apache Spark
Summary
Chapter 12: Using TensorFlow with ML.NET
Breaking down Google's Inception model
Creating the WPF image classification application
Exploring the project architecture
Diving into the WPF image classification application
The MainWindowViewModel class
The MainWindow.xaml class
The MainWindow.xaml.cs file
The BaseML class
The ImageDataInputItem class
The ImageDataPredictionItem class
The ImageClassificationPredictor class
Running the image classification application
Additional ideas for improvements
Self-training based on the end user's input
Logging
Utilizing a database
Summary
Chapter 13: Using ONNX with ML.NET
Breaking down ONNX and YOLO
Introducing ONNX
The YOLO ONNX model
Creating the ONNX object detection application
Exploring the project architecture
Diving into the code
The DimensionsBase class
The YoloBoundingBox class
The MainWindow.xaml file
The ImageClassificationPredictor class
The MainWindowViewModel class
Running the application
Exploring additional production application enhancements
Logging
Image scaling
Utilizing the full YOLO model
Summary
Other Books You May Enjoy
Index
π SIMILAR VOLUMES
βEmpower Your .NET Journey with Machine LearningβBook DescriptionDive into the world of machine learning for data-driven insights and seamless integration in .NET applications with the Ultimate Machine Learning with ML.NET.The book begins with foundations of ML.NET and seamlessly transitions into pr
Leverage the power of Apple's Core ML to create smart iOS apps Key Features Explore the concepts of machine learning and Apple's Core ML APIs Use Core ML to understand and transform images and videos Exploit the power of using CNN and RNN in iOS applications Book Description Core ML is a popular fra
<p><b>Master expert techniques for building automated and highly scalable end-to-end machine learning models and pipelines in Azure using TensorFlow, Spark, and Kubernetes</b></p> <h4>Key Features</h4> <ul><li>Make sense of data on the cloud by implementing advanced analytics </li> <li>Train and opt
<p><b>Master expert techniques for building automated and highly scalable end-to-end machine learning models and pipelines in Azure using TensorFlow, Spark, and Kubernetes</b></p> <h4>Key Features</h4> <ul><li>Make sense of data on the cloud by implementing advanced analytics </li> <li>Train and opt