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

Ranking the features using a filter or a dimensionality reduction


In the previous section, we defined different features. But are all of them really relevant to the problem? There are some techniques called embedded models that automatically select the most relevant features. We can also build the same machine learning model using different sets of features and pick the set whose performance is better. Both the options are good, although they require a lot of computational power.

An alternative is to use filters that are techniques that identify the most relevant features. We use filters before applying any machine learning model, and in this way, we cut a lot of the computational cost of the algorithms. Some filters take account of each feature separately and are very computationally efficient.

A simple filter is the Pearson correlation coefficient, which is a measure of the linear relationship between variables. The correlation is a number between -1 and 1, and these two extreme values express...