Python Data Science Essentials Table of Contents

Python Data Science Essentials Table of Contents

Python Data Science Essentials Table of Contents Python Data Science Essentials Credits About the Authors About the Reviewers www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 1. First Steps Introducing data science and Python Installing Python Python 2 or Python 3? Step-by-step installation A glance at the essential Python packages NumPy SciPy pandas Scikit-learn IPython Matplotlib Statsmodels Beautiful Soup NetworkX NLTK Gensim PyPy The installation of packages Package upgrades Scientific distributions Anaconda Enthought Canopy PythonXY WinPython Introducing IPython The IPython Notebook Datasets and code used in the book Scikit-learn toy datasets The MLdata.org public repository LIBSVM data examples Loading data directly from CSV or text files Scikit-learn sample generators Summary 2. Data Munging The data science process Data loading and preprocessing with pandas Fast and easy data loading Dealing with problematic data Dealing with big datasets Accessing other data formats Data preprocessing Data selection Working with categorical and textual data A special type of data – text Data processing with NumPy NumPy's n-dimensional array The basics of NumPy ndarray objects Creating NumPy arrays From lists to unidimensional arrays Controlling the memory size Heterogeneous lists From lists to multidimensional arrays Resizing arrays Arrays derived from NumPy functions Getting an array directly from a file Extracting data from pandas NumPy fast operation and computations Matrix operations Slicing and indexing with NumPy arrays Stacking NumPy arrays Summary 3. The Data Science Pipeline Introducing EDA Feature creation Dimensionality reduction The covariance matrix Principal Component Analysis (PCA) A variation of PCA for big data – RandomizedPCA Latent Factor Analysis (LFA) Linear Discriminant Analysis (LDA) Latent Semantical Analysis (LSA) Independent Component Analysis (ICA) Kernel PCA Restricted Boltzmann Machine (RBM) The detection and treatment of outliers Univariate outlier detection EllipticEnvelope OneClassSVM Scoring functions Multilabel classification Binary classification Regression Testing and validating Cross-validation Using cross-validation iterators Sampling and bootstrapping Hyper-parameters' optimization Building custom scoring functions Reducing the grid search runtime Feature selection Univariate selection Recursive elimination Stability and L1-based selection Summary 4. Machine Learning Linear and logistic regression Naive Bayes The k-Nearest Neighbors Advanced nonlinear algorithms SVM for classification SVM for regression Tuning SVM Ensemble strategies Pasting by random samples Bagging with weak ensembles Random Subspaces and Random Patches Sequences of models – AdaBoost Gradient tree boosting (GTB) Dealing with big data Creating some big datasets as examples Scalability with volume Keeping up with velocity Dealing with variety A quick overview of Stochastic Gradient Descent (SGD) A peek into Natural Language Processing (NLP) Word tokenization Stemming Word Tagging Named Entity Recognition (NER) Stopwords A complete data science example – text classification An overview of unsupervised learning Summary 5. Social Network Analysis Introduction to graph theory Graph algorithms Graph loading, dumping, and sampling Summary 6. Visualization Introducing the basics of matplotlib Curve plotting Using panels Scatterplots Histograms Bar graphs Image visualization Selected graphical examples with pandas Boxplots and histograms Scatterplots Parallel coordinates Advanced data learning representation Learning curves Validation curves Feature importance GBT partial dependence plot Summary Index Python Data Science Essentials Python Data Science Essentials Copyright © 2015 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: April 2015 Production reference: 1240415 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78528-042-9 www.packtpub.com Credits Authors Alberto Boschetti Luca Massaron Reviewers Robert Dempsey Daniel Frimer Kevin Markham Alberto Gonzalez Paje Bastiaan Sjardin Michele Usuelli Zacharias Voulgaris, PhD Commissioning Editor Julian Ursell Acquisition Editor Subho Gupta Content Development Editor Merwyn D'souza Technical Editor Namrata Patil Copy Editor Vedangi Narvekar Project Coordinator Neha Bhatnagar Proofreaders Simran Bhogal Faye Coulman Safis Editing Dan McMahon Indexer Priya Sane Production Coordinator Komal Ramchandani Cover Work Komal Ramchandani About the Authors Alberto Boschetti is a data scientist with expertise in signal processing and statistics. He holds a PhD in telecommunication engineering and currently lives and works in London. In his work projects, he faces challenges involving natural language processing (NLP), machine learning, and probabilistic graph models everyday. He is very passionate about his job and he always tries to stay updated on the latest developments in data science technologies by attending meetups, conferences, and other events. I would like to thank my family, my friends, and my colleagues. Also, a big thanks to the open source community. Luca Massaron is a data scientist and marketing research director who specializes in multivariate statistical analysis, machine learning, and customer insight, with over a decade of experience in solving real-world problems and generating value for stakeholders by applying reasoning, statistics, data mining, and algorithms. From being a pioneer of web audience analysis in Italy to achieving the rank of a top 10 Kaggler, he has always been passionate about everything regarding data and analysis and about demonstrating the potentiality of data-driven knowledge discovery to both experts and nonexperts. Favoring simplicity over unnecessary sophistication, he believes that a lot can be achieved in data science by understanding its essentials. To Yukiko and Amelia, for their loving patience. "Roads go ever ever on, under cloud and under star, yet feet that wandering have gone turn at last to home afar". About the Reviewers Robert Dempsey is an experienced leader and technology professional specializing in delivering solutions and products to solve tough business challenges. His experience in forming and leading agile teams, combined with more than 14 years of experience in the field of technology, enables him to solve complex problems while always keeping the bottom line in mind. Robert has founded and built three start-ups in technology and marketing, developed and sold two online applications, consulted Fortune 500 and Inc. 500 companies, and spoken nationally and internationally on software development and agile project management. He is currently the head of data operations at ARPC, an econometrics firm based in Washington, DC. In addition, he's the founder of Data Wranglers DC, a group dedicated to improving the craft of data wrangling, as well as a board member of Data Community DC. In addition to spending time with his growing family, Robert geeks out on Raspberry Pis and Arduinos and automates most of his life with the help of hardware and software. Daniel Frimer has been an advocate for the Python language for 2 years now. With a degree in applied and computational math sciences from the University of Washington, he has spearheaded various automation projects in the Python language involving natural language processing, data munging, and web scraping. In his side projects, he has dived into a deep analysis of NFL and NBA player statistics for his fantasy sports teams. Daniel has recently started working in SaaS at a private company for online health insurance shopping called Array Health, in support of day-to-day data analysis and the perfection of the integration between consumers, employers, and insurers. He has also worked with data-centric teams at Amazon, Starbucks, and Atlas International. Kevin Markham is a computer engineer, a data science instructor for General Assembly in Washington, DC, and the cofounder of Causetown, an online cause marketing platform for small businesses. He is passionate about teaching data science and machine learning and enjoys both Python and R. He founded Data School (http://dataschool.io) in order to provide in-depth educational resources that are accessible to data science novices. He has an active YouTube channel (http://youtube.com/dataschool) and can also be found on Twitter (@justmarkham). Alberto Gonzalez Paje is an economist specializing

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    342 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us