#### Overview of this book

There are many algorithms for data analysis and it’s not always possible to quickly choose the best one for each case. Implementation of the algorithms takes a lot of time. With the help of Mathematica, you can quickly get a result from the use of a particular method, because this system contains almost all the known algorithms for data analysis. If you are not a programmer but you need to analyze data, this book will show you the capabilities of Mathematica when just few strings of intelligible code help to solve huge tasks from statistical issues to pattern recognition. If you're a programmer, with the help of this book, you will learn how to use the library of algorithms implemented in Mathematica in your programs, as well as how to write algorithm testing procedure. With each chapter, you'll be more immersed in the special world of Mathematica. Along with intuitive queries for data processing, we will highlight the nuances and features of this system, allowing you to build effective analysis systems. With the help of this book, you will learn how to optimize the computations by combining your libraries with the Mathematica kernel.
Mathematica Data Analysis
Credits
www.PacktPub.com
Preface
Free Chapter
First Steps in Data Analysis
Creating an Interface for an External Program
Analyzing Data with the Help of Mathematica
Discovering the Advanced Capabilities of Time Series
Statistical Hypothesis Testing in Two Clicks
Predicting the Dataset Behavior
Rock-Paper-Scissors – Intelligent Processing of Datasets
Index

## Preface

There are many algorithms for data analysis, and it's not always possible to quickly choose the best one for each case. The implementation of algorithms takes a lot of time. With the help of Mathematica, you can quickly get a result using a particular method because this system contains almost all known-algorithms for data analysis. If you are not a programmer but you need to analyze data, this book will show the capabilities of Mathematica that use just a few strings of intelligible code to solve huge tasks ranging from statistical issues to pattern recognition. If you're a programmer, with the help of this book, you will learn how to use the library of algorithms implemented in Mathematica in your programs, as well as how to write algorithm testing procedures.

With each chapter, you'll immerse yourself more into the special world of Mathematica. Along with intuitive queries for data processing, the nuances and features of this system will be highlighted allowing you to build effective analysis systems.

## What this book covers

Chapter 1, First Steps in Data Analysis, describes how to install the Wolfram Mathematica software and starts us off by giving a tour of the Mathematica language features and the basic components of the system: front end and kernel.

Chapter 2, Broad Capabilities for Data Import, examines the basic functions that are used to import data into Mathematica. You will also learn how to cast these data into a form that is convenient for analysis and check it for errors and completeness.

Chapter 3, Create an Interface for an External Program, focuses on the basic skills to transfer accumulated data-processing tools to Mathematica, as well as to use Mathematica's capabilities in computing expressions in other systems.

Chapter 4, Analyzing Data with the Help of Mathematica, covers Mathematica's functions that help to perform data classification and data clustering. You will know how to recognize faces, classify objects in a picture, and work with textual information by identifying the language of the text and recognizing it.

Chapter 5, Discovering the Advanced Capabilities of Time Series, profiles the various ways to process and generate time series. You will find out how time series processes are analyzed and become familiar with the main model type of these processes such as MA, AR, ARMA, and SARIMA. You will able to check observation data for stationary, autocorrelation, and invertibility.

Chapter 6, Statistical Hypothesis Testing in Two Clicks, deals with hypothesis testing on possible parameters. Several examples are provided, which will check the degree of dependence of data samples and test the hypothesis on true distribution of the samples.

Chapter 7, Predicting the Dataset Behavior, takes a moment to look at some useful functions that help in finding regularities and predict the behavior of numeric data. We'll take a look at the possibilities of intelligent processing of graphical information and even imitate an author's style expanding their work or restoring it. Using the methodology of probability automaton modeling, we will be able to build a model of a complex system in order to make predictions with the parameters of the system.

Chapter 8, Rock-Paper-Scissors – Intelligent Processing of the Datasets, tackles the creation of interactive forms to present research results. Also, Markov chains are considered with functions that help in finding the transition probability matrix. In the end, we will cover how to export results to a file for cross-platform presentations.

## What you need for this book

To follow the examples in this book, you will need a copy of Wolfram Mathematica 10.1 or higher. If you wish to follow one of these examples and you do not have the right edition, you can download the trial version from the Wolfram website.

For some examples, you will need to use Windows 7 as your operating system but it is not necessary.

## Who this book is for

The book is designed for those who want to learn how to use the power of Mathematica to analyze and process data. Perhaps you are already familiar with data analysis, but have never used Mathematica, or you know Mathematica, but you are new to data analysis. With the help of this book, you will be able to quickly catch the key points for a successful start. If you perform data analysis professionally and have your own algorithms written in any programming language, you will learn how to optimize computations by combining your libraries with the Mathematica kernel with the help of this book.

## Conventions

In this book, you will find a number of styles of text 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: "In order to import data into Mathematica, the `Import` function is used."

A block of code is set as follows:

```int main(int argc, char *argv[]) {
return WSMain(argc, argv);
}```

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

```checkdate[x_] :=
If[DateObject[x] == DateObject["2015JAN"], True, False]
```

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "To go to further instructions, let's click on the Continue button".

### Note

Warnings or important notes appear in a box like this.

### Tip

Tips and tricks appear like this.

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 , 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.

## Customer support

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.

### Errata

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

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.