Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying R Machine Learning Essentials
  • Table Of Contents Toc
R Machine Learning Essentials

R Machine Learning Essentials

By : Usuelli
5 (1)
close
close
R Machine Learning Essentials

R Machine Learning Essentials

5 (1)
By: Usuelli

Overview of this book

If your company is like most, the number one reason that projects have failed over the years don’t have to do with technology.  They have to do with people.  People didn’t like the new technology.  People weren’t trained properly on the change.  People hadn’t received adequate communications and didn’t understand the change.  Sound familiar?
Table of Contents (10 chapters)
close
close
9
Index

Tuning the parameters


This section shows you how to improve the performance of KNN by tuning its parameters. We are dealing with the k parameter that defines the number of neighbors. Use these steps to identify the k parameter performing best:

  1. Define which values of k we will test. The KNN works locally, in the sense that given a new country flag it identifies just a few similar flags. How many of them should we use at most? Since there are less than 200 flags in total, we don't want to use more than 50 flags. Then, we should test each k between 1 and 50 and we can define arrayK containing the options:

    # define the k to test
    arrayK <- 1:50
  2. Define the number of iterations. For each k in arrayK, we need to build and validate the KNN a sufficiently high amount of times defined by nIterations. In the previous chapter, we learned that we need at least 100 iterations to have a meaningful KNN accuracy:

    nIterations <- 100
  3. Evaluate the accuracy for each k.

  4. Choose the k that maximizes the accuracy...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
R Machine Learning Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon