For humans, learning from mistakes is a fundamental rule. Why should it not be the same for machines? Machine learning algorithms will do just that: learn from experience. Machine learning gives computers the ability to learn without being explicitly programmed. It starts with real examples, extracts the models (that is, the rules that govern their operation), and uses them to make predictions about new examples.

MATLAB provides essential tools for understanding the amazing world of machine learning. Solving machine learning problems becomes extremely easy with the use of the tools available in the MATLAB environment. This is because MATLAB is a strong environment for interactive exploration.

For each topic, after a concise theoretical basis, you will be involved in real-life solutions. By the end of the book, you will be able to apply machine learning techniques and leverage the full capabilities of the MATLAB platform through real-world examples.

Chapter 1, *Getting Started with MATLAB Machine Learning*, introduces the basic concepts of machine learning, and then we take a tour of the different types of algorithms. In addition, some introduction, background information, and basic knowledge of the MATLAB environment will be covered. Finally, we explore the essential tools that MATLAB provides for understanding the amazing world of machine learning.

Chapter 2, *Importing and Organizing Data in MATLAB*, teaches us how to import and organize our data in MATLAB. Then we analyze the different formats available for the data collected and see how to move data in and out of MATLAB. Finally, we learn how to organize the data in the correct format for the next phase of data analysis.

Chapter 3, *From Data to Knowledge Discovery*, is where we begin to analyze data to extract useful information. We start from an analysis of the basic types of variable and the degree of cleaning the data. We analyze the techniques available for the preparation of the most suitable data for analysis and modeling. Then we go to data visualization, which plays a key role in understanding the data.

Chapter 4, *Finding Relationships between Variables - Regression Techniques*, shows how to perform accurate regression analysis in the MATLAB environment. We explore the amazing MATLAB interface for regression analysis, including fitting, prediction, and plotting.

Chapter 5, *Pattern Recognition through Classification Algorithms*, covers classification and much more. You’ll learn how to classify an object using nearest neighbors. You'll understand how to use the principles of probability for classification. We'll also cover classification techniques using decision trees and rules.

Chapter 6, *Identifying Groups of Data Using Clustering Methods*, shows you how to divide the data into clusters, or groupings of similar items. You'll learn how to find groups of data with k-means and k-medoids. We'll also cover grouping techniques using hierarchical clustering.

Chapter 7, *Simulation of Human Thinking - Artificial Neural Networks*, teaches you how to use a neural network to fit data, classify patterns, and do clustering. You’ll learn preprocessing, postprocessing, and network visualization for improving training efficiency and assessing network performance.

Chapter 8, *Improves the Performance of the Machine Learning Model - Dimensionality Reduction*, shows you how to select a feature that best represents the set of data. You will learn feature extraction techniques for dimensionality reduction when the transformation of variables is possible.

*Chapter 9*, *Machine Learning in Practice*, starts with a real-world fitting problem. Then you’ll learn how to use a neural network to classify patterns. Finally, we perform clustering analysis. In this way, we’ll analyze supervised and unsupervised learning algorithms.

In this book, machine learning algorithms are implemented in the MATLAB environment. So, to reproduce the many examples in this book, you need a new version of MATLAB (R2017a recommended) and the following toolboxes: statistics and machine learning toolbox, neural network toolbox, and fuzzy logic toolbox.

This book is for data analysts, data scientists, students, or anyone who is looking to get started with machine learning and wants to build efficient data-processing and predicting applications. A mathematical and statistical background will really help in following this book well.

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: "MATLAB performs the math task and assigns the result to the `ans`

variable."

A block of code is set as follows:

PC1 = 0.8852* Area + 0.3958 * Perimeter + 0.0043 * Compactness + 0.1286 * LengthK + 0.1110 * WidthK - 0.1195 * AsymCoef + 0.1290 * LengthKG

Any command-line input or output is written as follows:

>>10+90ans =100

**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: "A reference page in the ** Help** browser."

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 for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you. You can download the code files by following these steps:

- Log in or register to our website using your email address and password.
- Hover the mouse pointer on the
tab at the top.`SUPPORT`

- Click on
.`Code Downloads & Errata`

- Enter the name of the book in the
box.`Search`

- Select the book for which you're looking to download the code files.
- Choose from the drop-down menu where you purchased this book from.
- Click on
.`Code Download`

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

- WinRAR / 7-Zip for Windows
- Zipeg / iZip / UnRarX for Mac
- 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/MATLAB-for-Machine-Learning. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

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.