Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Machine Learning with ML.NET

You're reading from   Hands-On Machine Learning with ML.NET Getting started with Microsoft ML.NET to implement popular machine learning algorithms in C#

Arrow left icon
Product type Paperback
Published in Mar 2020
Publisher Packt
ISBN-13 9781789801781
Length 296 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jarred Capellman Jarred Capellman
Author Profile Icon Jarred Capellman
Jarred Capellman
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Fundamentals of Machine Learning and ML.NET
2. Getting Started with Machine Learning and ML.NET FREE CHAPTER 3. Setting Up the ML.NET Environment 4. Section 2: ML.NET Models
5. Regression Model 6. Classification Model 7. Clustering Model 8. Anomaly Detection Model 9. Matrix Factorization Model 10. Section 3: Real-World Integrations with ML.NET
11. Using ML.NET with .NET Core and Forecasting 12. Using ML.NET with ASP.NET Core 13. Using ML.NET with UWP 14. Section 4: Extending ML.NET
15. Training and Building Production Models 16. Using TensorFlow with ML.NET 17. Using ONNX with ML.NET 18. Other Books You May Enjoy

Evaluating a k-means model

As discussed in previous chapters, evaluating a model is a critical part of the overall model-building process. A poorly trained model will only provide inaccurate predictions. Fortunately, ML.NET provides many popular attributes to calculate model accuracy based on a test set at the time of training to give you an idea of how well your model will perform in a production environment.

In ML.NET, as noted in the example application, there are three properties that comprise the ClusteringMetrics class object. Let's dive into the properties exposed in the ClusteringMetrics object:

  • Average distance
  • The Davies-Bouldin index
  • Normalized mutual information

In the next sections, we will break down how these values are calculated and the ideal values to look for.

Average distance

Also referred to as the average score is the distance from the center of a cluster to the test data. The value, of type double, will decrease as the number of clusters increases, effectively...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime