Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Mathematica Data Analysis
Mathematica Data Analysis

Mathematica Data Analysis: Learn and explore the fundamentals of data analysis with power of Mathematica

Arrow left icon
Profile Icon Sergiy Suchok
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Dec 2015 164 pages 1st Edition
eBook
NZ$14.99 NZ$45.99
Paperback
NZ$56.99
Subscription
Free Trial
Arrow left icon
Profile Icon Sergiy Suchok
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Dec 2015 164 pages 1st Edition
eBook
NZ$14.99 NZ$45.99
Paperback
NZ$56.99
Subscription
Free Trial
eBook
NZ$14.99 NZ$45.99
Paperback
NZ$56.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mathematica Data Analysis

Chapter 1. First Steps in Data Analysis

Wolfram Mathematica is not just a system that can solve almost any mathematical task. It is a Swiss army knife, which allows you to process images, audio, and written text to perform classification and identification of objects, as well as to manage files. It also provides other tremendous capabilities. In Mathematica, you can call functions, as well as receive a call from modules that are written using different programming languages and technologies, such as C, .NET, Java, and others. The system can generate code and compile files. Mathematica includes over 4,500 functions, which go beyond mathematical calculations. Wolfram Mathematica is constantly changing while still maintaining full compatibility with previous versions.

In this chapter, you will learn the following:

  • How to install the Wolfram Mathematica system
  • How to configure it to fit your needs
  • What the Wolfram language kernel is and how to run it
  • Wolfram Mathematica features to write expressions

System installation

Depending on your needs, you can work with Mathematica both online and offline. For a deeper understanding of the system and its settings and capabilities, we will use the offline version. In this book, we'll deal with examples of Mathematica, version 10.2 (the current version at the time of writing this book), which are fully compatible with all future versions.

You can install Mathematica on the major operating systems: Windows, Linux, and Mac OS X.

To download a trial version of Mathematica, use this link: https://www.wolfram.com/mathematica/trial. You will be prompted to create a new Wolfram Mathematica ID or sign in with your already registered ID:

System installation

After registration, you will receive an e-mail containing the link to activate your Wolfram ID, as well as the link to access Mathematica Online. Activate your account and log in using https://user.wolfram.com/portal/login.html.

System installation

On this page, you can choose and download the Mathematica installer for your operating system.

Note

Copy the code in the Activation Key field. You will need it later to activate the product.

Let's download the Windows version of the program (by clicking on the Download for Windows button) and go through the main stages of system installation on a computer. The size of the downloaded file will be slightly larger than 2 GB, so make sure you have enough free space on your computer, both for the installer and for the installation of Mathematica.

Once the Mathematica_10.2.0_WIN.zip file is downloaded to your computer, extract it into a separate directory and run setup.exe:

System installation

At this point, the installer will inform us that the installation process of Mathematica 10.2 is about to start. In order to proceed, click on Next in the preceding screenshot.

System installation

Note that the system installation requires 6.2 GB of free disk space. In the preceding screenshot, select the directory where you want to install Mathematica and click on Next.

System installation

In the next dialog window, as shown in the preceding screenshot, you should choose the components of Mathematica you want to install. The Wolfram Extras package includes plugins for browsers that allow you to preview the Mathematica files embedded in web pages.

To continue the installation, click on the Next button.

System installation

As shown in the previous screenshot, you need to select a folder in the Start Menu to place the program's shortcuts. Then click on Next.

System installation

After that, we will see the summary of the previously selected options as shown in the preceding screenshot. Click on the Install button to start copying the files. After all files are copied, you will be notified that the installation is finished. You can check off the Launch Wolfram Mathematica checkbox to start learning the system immediately:

System installation

Once the system launches, you need to enter the activation key that we copied from the Wolfram website earlier:

System installation

Now, click on the Activate button. You will be redirected to the following page:

System installation

Read the license agreement and check the I accept the terms of this agreement box. Then click on OK.

Now, the Mathematica system is ready for the first use:

System installation

Setting up the system

To access the Preferences dialog, you need to select Edit | Preferences… in the application menu.

Note

On Mac OS X, the Preferences menu is located in the Mathematica application menu.

Let's review the most interesting settings of the system, which will be useful for our further work:

Setting up the system

In the Appearance | Number | Formatting tab, you can select various numeric formatting options. Will there be a space separator between the digit blocks? What should be the decimal point character? How many digits will be displayed by default in the output?

In the next Multiplication tab, you can select the appearance of the multiplication:

Setting up the system

Note

In Mathematica, the space between two expressions means multiplying those expressions.

In this tab, you can choose whether the multiplication symbol between the multiplied numbers appears automatically, as well as choose the symbol type: space, center dot, *, or x.

The Mathematica front end and kernel

The Wolfram system has a modular structure and consists of two main parts. The one that directly performs all computations is called the kernel; the other part that interacts with the user is called the front end.

The kernel can be installed on the server, and it processes requests from multiple user interfaces. However, the single user interface can use several connected kernels for its computations.

In order to connect multiple kernels, navigate to Evaluation | Kernel Configuration Options… and click on the Add button.

The Mathematica front end and kernel

In the dialog window that opens, you can select whether the kernel will be located on a local computer or on a remote computer in the network. You can also enter the parameters in order to connect to this computer. There is a capability to be always aware of which kernel was used for computations.

The front end has the following interfaces:

  • Notebook: It is the document in which the user enters all the necessary expressions and algorithms.
  • Text-based interface: It is a command-line interface. It is used in text operating systems and not in the graphics operating systems.
  • Wolfram Symbolic Transfer Protocol (WSTP): It is the interface that enables interaction with other programs and modules.

Main features for writing expressions

At the beginning, it should be mentioned that Wolfram Mathematica has a very extensive reference system. You can access it by selecting in this menu: Support | Wolfram Documentation:

Main features for writing expressions

Let's get acquainted with some distinctions of Mathematica that will help us to understand the source code in the following chapters.

Let's create our first notebook. When Mathematica starts, you should choose New Document and then Notebook.

In order to compute any expression, press Shift + Enter after entering it. The input expression will be denoted by In and the output by Out:

In[1]:= 1 + 4
Out[1]= 5

Note

In this and other samples, all the formulas will start with In[Number]; you shouldn't type this because it is the number of the input that Mathematica calculates automatically.

All built-in functions always start with a capital letter, as shown here:

Main features for writing expressions

No variables should start with a number, since it will automatically be treated as a multiplication operation. They cannot end with a $ symbol.

If the variable ends with _, then it is a template expression and it can be substituted with anything, for example:

Main features for writing expressions

In Mathematica, there are four types of brackets:

  • Square []: These are used to describe the function parameters
  • Round (): These are used to group expressions and logical elements
  • Curly {}: These are used to describe the elements of arrays, vectors, and data lists
  • Double Square [[ ]]: These are used to allocate a specific item in a data list

In Mathematica, there are two types of assignments: absolute (=) and delayed (:=).

The difference is that in a delayed assignment, the right-hand side of the expression is always recomputed if the function is called. In an absolute assignment, the value that was in place during the assignment is stored.

Main features for writing expressions

In this example, we see that at the time of the second call of variables, x2 adopted the current time value. At the same time, x1 remained unchanged.

In order to use the result of the preceding expression, one can use the % symbol:

Main features for writing expressions

The basis of the Mathematica language is the functional form of all the expressions. In order to see a complete expression, the FullForm function should be used:

Main features for writing expressions

The variables that are not used should be cleared by the Clear function. Otherwise, computation errors will occur:

Main features for writing expressions

Summary

In this chapter, we learned how to install the Wolfram Mathematica software and reviewed the basic components of the system: front end and kernel. We also gained a knowledge of the Mathematica language features.

In the next chapters, we will review additional features and techniques that facilitate work in Mathematica.

Left arrow icon Right arrow icon

Key benefits

  • Use the power of Mathematica to analyze data in your applications
  • Discover the capabilities of data classification and pattern recognition offered by Mathematica
  • Use hundreds of algorithms for time series analysis to predict the future

Description

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.

Who is this book for?

The book is for those who want to learn 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 up on the key points for a successful start.

What you will learn

  • Import data from different sources to Mathematica
  • Link external libraries with programs written in Mathematica
  • Classify data and partition them into clusters
  • Recognize faces, objects, text, and barcodes
  • Use Mathematica functions for time series analysis
  • Use algorithms for statistical data processing
  • Predict the result based on the observations

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 24, 2015
Length: 164 pages
Edition : 1st
Language : English
ISBN-13 : 9781785884931
Category :
Concepts :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Dec 24, 2015
Length: 164 pages
Edition : 1st
Language : English
ISBN-13 : 9781785884931
Category :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total NZ$ 194.97
Mathematica data visualization
NZ$56.99
Mathematica Data Analysis
NZ$56.99
OpenCV with Python By Example
NZ$80.99
Total NZ$ 194.97 Stars icon
Banner background image

Table of Contents

9 Chapters
1. First Steps in Data Analysis Chevron down icon Chevron up icon
2. Broad Capabilities for Data Import Chevron down icon Chevron up icon
3. Creating an Interface for an External Program Chevron down icon Chevron up icon
4. Analyzing Data with the Help of Mathematica Chevron down icon Chevron up icon
5. Discovering the Advanced Capabilities of Time Series Chevron down icon Chevron up icon
6. Statistical Hypothesis Testing in Two Clicks Chevron down icon Chevron up icon
7. Predicting the Dataset Behavior Chevron down icon Chevron up icon
8. Rock-Paper-Scissors – Intelligent Processing of Datasets Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(1 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
SeVlad Mar 04, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very helpful book with interesting examples.For novice in Mathematica.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.