Currently, the amount of information we are able to produce is increasing exponentially. In the past, data storage was very expensive. However, today, new technologies make it cheaper to store this information. So we are able to generate massive amounts of data, which it is also feasible to store. This means that we are immersed in a universe of data, of which we are not able to exploit the vast majority.
Among these large deposits of data storage there is valuable knowledge, but it is hidden and difficult to identify using traditional methods.
Fortunately, new technologies such as artificial intelligence, machine learning, and the management of databases converge with other disciplines that are more traditional such as statistics or mathematics to create the means to locate, extract, or even construct this valuable information from raw data.
This convergence of knowledge areas gives rise to, for example, very important subfields such as supervised learning and unsupervised learning, both derived from machine learning.
Both subfields contain a large quantity of tools to enhance the use of stored data so that it is possible to generate knowledge about the data and extract it in a human-interpretable way.
In this book, you will learn how to implement some of the most important concepts of unsupervised learning directly in the R console, one of the best tools for a data scientist, through practical examples using more than 40 R packages and a lot of useful functions.
Considering the wide range of techniques and knowledge related to unsupervised learning, this book is not intended to be in any way exhaustive. However, it contains some valuable knowledge and main techniques to introduce the reader to the study and implementation of this important sub field of machine learning.
Chapter 1, Welcome to the Age of Information Technology, aims at introducing the reader to the unsupervised learning context and explains the relation between unsupervised and supervised learning in the context of data mining. It also provides the reader with an introduction to the key concepts of information theory.
Chapter 2, Working with Data – Exploratory Data Analysis, is about some techniques for exploratory data analysis such as summarization, manipulation, correlation, and data visualization. An adequate knowledge of data, by exploration, is essential in order to apply unsupervised learning algorithms correctly. This assertion is true for any effort in data mining, not just for unsupervised learning.
Chapter 3, Identifying and Understanding Groups – Clustering Algorithms, teaches the readers about one of the most used techniques in unsupervised learning, clustering. Identifying groups can help discover and explain some patterns hidden in data. It is frequently the answer for multiple problems in many industries or contexts. Finding clusters can help uncover relationships in data, which can in turn be used to support future decisions.
Chapter 4, Association Rules, covers another grouping technique, the association rules. The association process makes groups of observations and attempts to discover links or associations between different attributes of groups. This association becomes rules, which can in turn be used to support future decisions.
Chapter 5, Dimensionality Reduction, aims to explain some dimensionality reduction techniques. In machine learning, this concept is the process of reducing the number of random variables considered, and it can be subdivided into feature selection and extraction. The key is to reduce the number of dimensions, but preserve most parts of the information.
Chapter 6, Feature Selection Methods, explains some techniques for feature selection, also known as variable selection or attribute selection. The key point is to choose a subset of relevant features of variables for modeling and not to use features that seem to be redundant, considering correlation to simplify model construction.
Appendix, References, provides a list of links referenced in the book, which are sorted chapter-wise. Given the amount of package and functions used in this book, it is very difficult to cite references and authors within the text of each chapter, as it would appear intermittent for the reader.
You need to download R to follow the examples. You can download and install R using the CRAN website available at http://cran.r-project.org/. All the code was written using RStudio. RStudio is an integrated development environment (IDE) for R and can be downloaded from http://www.rstudio.com/products/rstudio/. Many of the examples are created using R packages, and they are discussed in their respective sections.
This book is intended for professionals who are interested in data analysis using unsupervised learning techniques, as well as data analysts, statisticians, and data scientists seeking to learn to use R to apply data mining techniques. Knowledge of R, machine learning, and mathematics would help, but are not a strict requirement.
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
A block of code is set as follows:
# Clean the Work Space rm(list = ls(all = TRUE)) # Read the iris.csv file Iris <- read.table("iris.csv", header = TRUE, sep = ",",dec = ".", row.names = 1)
In R it is a general practice to use <- for assignment instead of the = sign.
New terms and important words are shown in bold. Words that you see on the screen, for example in menus or dialog boxes, appear in the text like this: "We can also use the Summary of dataset option for exploratory data analysis:"
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <[email protected]>
, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/1234OT_ColorImages.pdf.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at <[email protected]>
, and we will do our best to address the problem.