Book Image

R Machine Learning Essentials

By : Michele Usuelli
Book Image

R Machine Learning Essentials

By: Michele Usuelli

Overview of this book

Table of Contents (15 chapters)
R Machine Learning Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. Step 3 – Validating the Results

In the previous chapter, we estimated the language of new countries starting from their flag. For this purpose, we used KNN algorithm that is a supervised learning algorithm. We built KNN and measured its accuracy cross validating the estimated language. In this chapter, we will see how to measure the accuracy in a more reliable way and we will tune the KNN parameters to improve its performance. To be able to do the tasks in this chapter, it's not necessary for you to have read the previous chapter, although it is recommended so that you can order to understand how the KNN algorithm works.

In this chapter, you will learn how to:

  • Validate the accuracy of an algorithm

  • Tune the algorithm parameters

  • Select the most relevant data features

  • Optimize the parameters and the features together