Book Image

Mathematica Data Analysis

By : Sergiy Suchok
Book Image

Mathematica Data Analysis

By: Sergiy Suchok

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.
Table of Contents (15 chapters)
Mathematica Data Analysis
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Recognizing faces


When a photo is added to a social networking website, there is an option to tag friends who are depicted in it. This is done with the help of a face detection function. Using the FindFaces Mathematica function, you can implement a similar feature in your applications. The input parameter of the function is the image and the output parameters are the coordinates of all the rectangles that show the people's faces:

Note

Pay attention to the /@ record, which refers to a short form of the Map[f,expr] function that applies f to each element in the first level of expr. For example, the f /@ {a, b, c, d, e} result is a list of f function applications for each of these parameters: {f[a], f[b], f[c], f[d], f[e]}.

In this example, the FindFaces function has detected multiple faces in a photo and the HighlightImage function made it possible to highlight these faces directly in the photo.

Note

Take into account the Rectangle @@@ FindFaces[fam] record—it is a shortened version of the Apply...