Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Statistical Application Development with R and Python

You're reading from   Statistical Application Development with R and Python Develop applications using data processing, statistical models, and CART

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher
ISBN-13 9781788621199
Length 432 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Prabhanjan Narayanachar Tattar Prabhanjan Narayanachar Tattar
Author Profile Icon Prabhanjan Narayanachar Tattar
Prabhanjan Narayanachar Tattar
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Data Characteristics FREE CHAPTER 2. Import/Export Data 3. Data Visualization 4. Exploratory Analysis 5. Statistical Inference 6. Linear Regression Analysis 7. Logistic Regression Model 8. Regression Models with Regularization 9. Classification and Regression Trees 10. CART and Beyond Index

Python installation and setup

The major change in the second edition is augmenting the book with parallel Python programs. The reader might ask the all-important one word question Why? A simple reason, among others, is this: R has an impressive 11,212 packages, and the quantum of impressiveness for Python’s 11,4368 is left to the reader.

Of course, it is true that not all of these Python packages are related to data analytics. The number of packages is as of the date August 11, 2017. Importantly, the purpose of this book is to help the R user learn Python easily and vice versa. The main source of Python would be its website: https://www.python.org/:

  • Version- A famous argument debated among Python users is related to the choice of version 2.7 or 3.4+. Though the 3.0 version has been available since a decade earlier from 2008, the 2.7 version is still too popular and shows no signs of fading away. We will not get into the pros and cons of using the versions and will simply use the 3.4+ version. The author has run the programs in 3.4 version Ubuntu and 3.6 version in Windows and the code ran without any problems. The users of the 2.7 version might be disappointed, though we are sure that they can easily adapt it to their machines. Thus, we are providing the code for the 3.4+ version of Python.

Ubuntu OS already has Python installed and the version that comes along with it is 2.7.13-2. The two lines of code can be run in the gnome-terminal to update Python to the 3.6 version:

sudo apt-get update
sudo apt-get install python3.6

The Windows version can be easily downloaded from https://www.python.org/downloads/ and for making good use of the book code, the user is recommended to use the current version 3.6. The exe files don’t need an explanation. The snippets of Python software after they are started in Ubuntu and Windows are given next:

Python installation and setup

Simple arithmetic operations are easily carried out in Python. The user can key-in 2+7 at the prompt. Important programming will be taken up soon and the user can learn them from scratch from the next chapter.

Using pip for packages

Additional packages as required need to be installed separetely. pip is the package manager for Python. If any software is required, we can run the following line as the Python prompt:

pip install package

The table of packages required according to the chapters is given in the following table:

Chapter number

Python Packages

2

os, numpy, pandas, pymysql, pickle

3

os, numpy, pandas, matplotlib

4

os, numpy, pandas, matplotlib

5

os, numpy, pandas, matplotlib, scipy

6

os, numpy, pandas, matplotlib, scipy

7

os, numpy, pandas, matplotlib, sklearn pylab, pysal, statsmodels

8

os, numpy, pandas, matplotlib, sklearn, pylab, statsmodels

9

os, numpy, pandas, matplotlib, sklearn

10

os, numpy, pandas, matplotlib, sklearn

You have been reading a chapter from
Statistical Application Development with R and Python - Second Edition
Published in: Aug 2017
Publisher:
ISBN-13: 9781788621199
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image