Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Data Science with Anaconda
Hands-On Data Science with Anaconda

Hands-On Data Science with Anaconda: Utilize the right mix of tools to create high-performance data science applications

By Yuxing Yan , James Yan
$15.99 per month
Book May 2018 364 pages 1st Edition
eBook
$29.99 $20.98
Print
$38.99
Subscription
$15.99 Monthly
eBook
$29.99 $20.98
Print
$38.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.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 : May 31, 2018
Length 364 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781788831192
Vendor :
Anaconda
Category :
Concepts :
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Data Science with Anaconda

Ecosystem of Anaconda

In the preface, we mentioned that this book is designed for readers who are looking for tools in the area of data science. Existing data analysts and data science professionals who wish to improve the efficiency of their data science applications by using the best libraries with multiple languages will find this book quite useful. The platform discussed in detail across various chapters is Anaconda and the computational tools could be Python, R, Julia, or Octave. The beauty of using these programming languages is that they are all open source, as in free to download. In this chapter, we start from the very beginning: a simple introduction. For this book, we assume that readers have some basic knowledge related to several programming languages, such as R and Python. There are many books available, such as Python for Data Analysis by McKinney (2013) and Python for Finance by Yan (2017).

In this chapter, the following topics will be covered:

  • Introduction
  • Miniconda
  • Anaconda Cloud
  • Finding help

Introduction

Nowadays, we are overwhelmed by large amounts of information—see Shi, Zhang, and Khan (2017), or Fang and Zhang (2016)—the catchphrase being big data. However, defining it is still controversial, since many explanations are available. Davenport and Patil (2012) suggest that if your organization stores multiple petabytes of data, if the information most critical to your business resides in forms other than rows and columns of numbers, or if answering your biggest question would involve a mashup of several analytical efforts, you've got a big data opportunity.

Many users of data science or data analytics are learning several programming languages such as R and Python, but how can they use both of them at the same time? If John is using R while his teammate is using Python, how do they communicate with each other? How do team members share their packages, programs, and even their working environments? In this book, we try our best to offer a solution to all of these challenging tasks by introducing Anaconda, since it possesses several wonderful properties.

Generally speaking, R is a programming language for statistical computing and graphics that is supported by the R Foundation for statistical computing. Python is an interpreted, object-oriented programming language similar to Perl that has gained popularity because of its clear syntax and readability. Julia is for numerical computing and extensive mathematical function and is designed for parallelism and cloud computing, while Octave is for numerical computation and mathematics-oriented and batch-oriented language. All those four languages, R, Python, Julia, and Octave, are free.

Reasons for using Jupyter via Anaconda

In data science or data analytics, we usually work in a team. This means that each developer, researcher, or team member, might have his/her favorite programming language, such as Python, R, Octave, or Julia. If we could have a platform to run all of those languages, it would be great. Fortunately, Jupyter is such a platform, since this platform can accommodate over 40 languages, including Python, R, Julia, Octave, and Scala.

In Chapter 2, Anaconda Installation, we will show you how to run those four languages via Jupyter. Of course, there are other benefits of using Anaconda: we might worry less about the dependency of installed packages, manage packages more efficiently, and share our programs, projects, and working environments. In addition, Jupyter Notebooks can be shared with others using email, Dropbox, GitHub, and the Jupyter Notebook Viewer.

Using Jupyter without pre-installation

In Chapter 2, Anaconda Installation, we will discuss how to install Jupyter via Anaconda installation. However, we could launch Jupyter occasionally without pre-installation by going to the web page at https://jupyter.org/try:

  1. The welcome screen will be presented with various options for trying out different languages.
  2. For example, by clicking the Try Jupyter with Julia image, we would see the following screen:
  1. To save space, the screenshot shows only the first part of the demo. Any readers could try the previous two steps to view the whole demo. In addition, if we click the Try Jupyter with R image, the following screen would show:
  1. After selecting Try Jupyter with Python, you will be presented with the welcome screen for the same.
  1. Next, we will show you how to execute a few simple commands in R, Python, and Julia. For example, we could use R to use the platform to run a few simple command lines. In the following example, we enter pv=100, r=0.1,and n=5:
  1. After clicking the Run button on the menu bar, we assign those values to the three variables. Then we can estimate the future value of this present value, as illustrated here:
  1. Similarly, we could try to use Python, as shown here:

In the preceding example, we import the Python package called scipy and give it a short name, sp. Although other short names could be used to represent the scipy package, it is a convention to use sp. Then, we use the sqrt() function included in the Python package.

For Julia, we could try the following code (shown in the following screenshot). Again, after going to File|New on the menu, we choose Julia 0.6.0. As of May 09, 2018, 0.6.0 is the current version for Julia. Note that your current version for Julia could be different:

In the code, we define a function called sphere_vol with just one input value of r (in radians). The answer is 64.45 for an input value of 2.5.

Miniconda

Anaconda is a full distribution of Python and comes with over 1,000 open source packages after installation. Because of this, the total size is over 3 GB. Anaconda is good if we intend to have many packages downloaded and pre-installed. On the other hand, Miniconda contains only Python and other necessary libraries needed to run conda itself. The size for the Miniconda is about 400 MB, much smaller than the full version of Anaconda, so extra packages have to be downloaded and installed as requested.

There are many reasons why a new user might prefer a watered-down version of Anaconda. For example, they might not need so many packages. Another reason is that users might not have enough space. Those users could download Miniconda at https://conda.io/miniconda.html. Again, in Chapter 2, Anaconda Installation, we will discuss in detail how to install Anaconda and run programs written in different languages, such as Python, R, Julia, and Octave.

Anaconda Cloud

In Chapter 2, Anaconda Installation, we'll explain this in more detail. This function is used to collaborate with different users or group members. For example, we have a small group of ten developers working on the same project. For this reason, we have to share our programs, command datasets, and working environments, and we could use Anaconda Cloud to do so. After going to https://anaconda.org/, we will be directed to the Anaconda home page.

Note that users have to register with Anaconda before they can use this function. For example, one of the authors has the link https://anaconda.org/paulyan/dashboard. After we register, we can see the following:

Later in the book, we devote a whole chapter to this.

Finding help

There are many websites we can visit to get help. The first allows us to find the user guide, shown at the following link: https://docs.anaconda.com/anaconda/user-guide/. After we click the link, we will see four entries:

We can find lots of information by choosing one of the previous four entries. For example, after clicking Getting started with Anaconda, we will see the following information:

From the Navigator bar in the left-hand side, we could go to Tasks, and then we have the following entries:

For example, after clicking on Installing conda packages, we can see the following information (only the first part of the document is shown to save space):

For developers, we have the following links:

Summary

In this chapter, we have introduced some basic concepts, such as the reasons why we use Anaconda, and the advantages of using full-fledged Anaconda and/or its baby version, Miniconda. Then, it was shown that without installing Anaconda, we could still use it by visiting a designated website. We could also test a few simple programs there, writing in R, Python, Julia, or Octave.

In Chapter 2, Anaconda Installation, we will show you how to install Anaconda and test if the installation is successful. We will look at how to launch Jupyter, how to launch Python, Spyder, and R, and how to find related help. Most of those concepts or procedures are quite basic, so readers who are confident with those basic concepts can skip this chapter, Chapter 2, Anaconda Installation, and go to Chapter 3, Data Basics, directly.

Review questions and exercises

  1. What is Anaconda and how do we use its platform?
  2. How many open source packages are accompanied with Anaconda?
  3. What is the home page for Anaconda?
  4. How do we install Anaconda? After Anaconda is installed, should we install Python separately? What about R?
  5. What is the size of a full Anaconda installation?
  6. Why should we care about Miniconda?
  7. What is Jupyter? How do we launch it without installation?
  8. What are the advantages and disadvantages of using https://jupyter.org/try?
  9. Where could a new learner find more useful information about Anaconda?
  10. Get more information about the Julia programming language.

  1. How do we write a simple program in Julia via Jupyter?
  2. How do we write a simple program in R via Jupyter?
  3. How do we find help for Jupyter?
  4. What is the conda Cheat Sheet and where can we download it?
  5. Could we run a simple R program without installing Anaconda?
  6. Could we run Anaconda without pre-installing it?
  7. Try the following two lines of Python code:
import numpy as np
print(np.sqrt(2))
  1. Try the following simple code for R:
x<-1:500
mean(x)
sd(x)
  1. Try the following code for Julia:
x=1:500
mean(x)
  1. Try the following code for R:
dd<-Sys.Date()
dd+40

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • -Use Anaconda to find solutions for clustering, classification, and linear regression
  • -Analyze your data efficiently with the most powerful data science stack
  • -Use the Anaconda cloud to store, share, and discover projects and libraries

Description

Anaconda is an open source platform that brings together the best tools for data science professionals with more than 100 popular packages supporting Python, Scala, and R languages. Hands-On Data Science with Anaconda gets you started with Anaconda and demonstrates how you can use it to perform data science operations in the real world. The book begins with setting up the environment for Anaconda platform in order to make it accessible for tools and frameworks such as Jupyter, pandas, matplotlib, Python, R, Julia, and more. You’ll walk through package manager Conda, through which you can automatically manage all packages including cross-language dependencies, and work across Linux, macOS, and Windows. You’ll explore all the essentials of data science and linear algebra to perform data science tasks using packages such as SciPy, contrastive, scikit-learn, Rattle, and Rmixmod. Once you’re accustomed to all this, you’ll start with operations in data science such as cleaning, sorting, and data classification. You’ll move on to learning how to perform tasks such as clustering, regression, prediction, and building machine learning models and optimizing them. In addition to this, you’ll learn how to visualize data using the packages available for Julia, Python, and R.

What you will learn

•Perform cleaning, sorting, classification, clustering, regression, and dataset modeling using Anaconda •Use the package manager conda and discover, install, and use functionally efficient and scalable packages •Get comfortable with heterogeneous data exploration using multiple languages within a project •Perform distributed computing and use Anaconda Accelerate to optimize computational powers •Discover and share packages, notebooks, and environments, and use shared project drives on Anaconda Cloud •Tackle advanced data prediction problems

What do you get with a Packt Subscription?

Free for first 7 days. $15.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 : May 31, 2018
Length 364 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781788831192
Vendor :
Anaconda
Category :
Concepts :

Table of Contents

15 Chapters
Preface Chevron down icon Chevron up icon
1. Ecosystem of Anaconda Chevron down icon Chevron up icon
2. Anaconda Installation Chevron down icon Chevron up icon
3. Data Basics Chevron down icon Chevron up icon
4. Data Visualization Chevron down icon Chevron up icon
5. Statistical Modeling in Anaconda Chevron down icon Chevron up icon
6. Managing Packages Chevron down icon Chevron up icon
7. Optimization in Anaconda Chevron down icon Chevron up icon
8. Unsupervised Learning in Anaconda Chevron down icon Chevron up icon
9. Supervised Learning in Anaconda Chevron down icon Chevron up icon
10. Predictive Data Analytics – Modeling and Validation Chevron down icon Chevron up icon
11. Anaconda Cloud Chevron down icon Chevron up icon
12. Distributed Computing, Parallel Computing, and HPCC Chevron down icon Chevron up icon
13. References Chevron down icon Chevron up icon
14. Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
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.