Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Statistics for Data Science: Leverage the power of statistics for Data Analysis, Classification, Regression, Machine Learning, and Neural Networks
Statistics for Data Science: Leverage the power of statistics for Data Analysis, Classification, Regression, Machine Learning, and Neural Networks
Statistics for Data Science: Leverage the power of statistics for Data Analysis, Classification, Regression, Machine Learning, and Neural Networks
Ebook519 pages3 hours

Statistics for Data Science: Leverage the power of statistics for Data Analysis, Classification, Regression, Machine Learning, and Neural Networks

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Get your statistics basics right before diving into the world of data science

About This Book
  • No need to take a degree in statistics, read this book and get a strong statistics base for data science and real-world programs;
  • Implement statistics in data science tasks such as data cleaning, mining, and analysis
  • Learn all about probability, statistics, numerical computations, and more with the help of R programs
Who This Book Is For

This book is intended for those developers who are willing to enter the field of data science and are looking for concise information of statistics with the help of insightful programs and simple explanation. Some basic hands on R will be useful.

What You Will Learn
  • Analyze the transition from a data developer to a data scientist mindset
  • Get acquainted with the R programs and the logic used for statistical computations
  • Understand mathematical concepts such as variance, standard deviation, probability, matrix calculations, and more
  • Learn to implement statistics in data science tasks such as data cleaning, mining, and analysis
  • Learn the statistical techniques required to perform tasks such as linear regression, regularization, model assessment, boosting, SVMs, and working with neural networks
  • Get comfortable with performing various statistical computations for data science programmatically
In Detail

Data science is an ever-evolving field, which is growing in popularity at an exponential rate. Data science includes techniques and theories extracted from the fields of statistics; computer science, and, most importantly, machine learning, databases, data visualization, and so on.

This book takes you through an entire journey of statistics, from knowing very little to becoming comfortable in using various statistical methods for data science tasks. It starts off with simple statistics and then move on to statistical methods that are used in data science algorithms. The R programs for statistical computation are clearly explained along with logic. You will come across various mathematical concepts, such as variance, standard deviation, probability, matrix calculations, and more. You will learn only what is required to implement statistics in data science tasks such as data cleaning, mining, and analysis. You will learn the statistical techniques required to perform tasks such as linear regression, regularization, model assessment, boosting, SVMs, and working with neural networks.

By the end of the book, you will be comfortable with performing various statistical computations for data science programmatically.

Style and approach

Step by step comprehensive guide with real world examples

LanguageEnglish
Release dateNov 17, 2017
ISBN9781788295345
Statistics for Data Science: Leverage the power of statistics for Data Analysis, Classification, Regression, Machine Learning, and Neural Networks
Author

James D. Miller

James Miller has enjoyed many accomplishments in his life. He has served as Youth Pastor, Pastor, Police Officer, Police Chaplain, and coach of several different sports and teams. But his greatest joy has been the joy of being married to Judith, and together raising 4 boys and being grandparents to 16 wonderful grand kids.

Read more from James D. Miller

Related to Statistics for Data Science

Related ebooks

Applications & Software For You

View More

Related articles

Reviews for Statistics for Data Science

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Statistics for Data Science - James D. Miller

    Statistics for Data Science

    Statistics for Data Science

    Leverage the power of statistics for Data Analysis, Classification, Regression, Machine Learning, and Neural Networks

    James D. Miller

    BIRMINGHAM - MUMBAI

    Statistics for Data Science

    Copyright © 2017 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 author, 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: November 2017

    Production reference: 1151117

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham

    B3 2PB, UK.

    ISBN 978-1-78829-067-8

    www.packtpub.com

    Credits

    About the Author

    James D. Miller, is an IBM certified expert, creative innovator and accomplished Director, Sr. Project Leader and Application/System Architect with +35 years of extensive applications and system design and development experience across multiple platforms and technologies. Experiences include introducing customers to new and sometimes disruptive technologies and platforms, integrating with IBM Watson Analytics, Cognos BI, TM1 and web architecture design, systems analysis, GUI design and testing, database modelling and systems analysis, design and development of OLAP, client/server, web and mainframe applications and systems utilizing: IBM Watson Analytics, IBM Cognos BI and TM1 (TM1 rules, TI, TM1Web and Planning Manager), Cognos Framework Manager, dynaSight-ArcPlan, ASP, DHTML, XML, IIS, MS Visual Basic and VBA, Visual Studio, PERL, SPLUNK, WebSuite, MS SQL Server, ORACLE, SYBASE Server, and so on.

    Responsibilities have also included all aspects of Windows and SQL solution development and design including analysis; GUI (and website) design; data modelling; table, screen/form and script development; SQL (and remote stored procedures and triggers) development/testing; test preparation and management and training of programming staff. Other experience includes the development of  ExtractTransform, and Load (ETL)  infrastructure such as data transfer automation between mainframe (DB2, Lawson, Great Plains, and so on.) systems and client/server SQL server and web-based applications and integration of enterprise applications and data sources.

    Mr Miller has acted as Internet Applications Development Mgr. responsible for the design, development, QA and delivery of multiple websites including online trading applications, warehouse process control and scheduling systems, administrative and control applications. Mr Miller also was responsible for the design, development and administration of a web-based financial reporting system for a 450-million-dollar organization, reporting directly to the CFO and his executive team.

    He has also been responsible for managing and directing multiple resources in various management roles including project and team leader, lead developer and applications development director.

    He has authored the following books published by Packt:

    Mastering Predictive Analytics with R – Second Edition 

    Big Data Visualization 

    Learning IBM Watson Analytics 

    Implementing Splunk – Second Edition 

    Mastering Splunk 

    IBM Cognos TM1 Developer's Certification Guide 

    He has also authored a number of whitepapers on best practices such as Establishing a Center of Excellence and continues to post blogs on a number of relevant topics based on personal experiences and industry best practices. 

    He is a perpetual learner continuing to pursue experiences and certifications, currently holding the following current technical certifications:

    IBM Certified Developer Cognos TM1

    IBM Certified Analyst Cognos TM1

    IBM Certified Administrator Cognos TM1

    IBM Cognos TM1 Master 385 Certification

    IBM Certified Advanced Solution Expert Cognos TM1

    IBM OpenPages Developer Fundamentals C2020-001-ENU

    IBM Cognos 10 BI Administrator C2020-622

    IBM Cognos 10 BI Author C2090-620-ENU

    IBM Cognos BI Professional C2090-180-ENU

    IBM Cognos 10 BI Metadata Model Developer C2090-632

    IBM Certified Solution Expert - Cognos BI

    Specialties: The evaluation and introduction of innovative and disruptive technologies, cloud migration, IBM Watson Analytics, big data, data visualizations, Cognos BI and TM1 application design and development, OLAP, Visual Basic, SQL Server, forecasting and planning; international application, and development, business intelligence, project development, and delivery and process improvement.

    To Nanette L. Miller:

    Like a river flows surely to the sea, darling so it goes, some things are meant to be.

    About the Reviewer

    James Mott, Ph.D, is a senior education consultant with extensive experience in teaching statistical analysis, modeling, data mining and predictive analytics. He has over 30 years of experience using SPSS products in his own research including IBM SPSS Statistics, IBM SPSS Modeler, and IBM SPSS Amos. He has also been actively teaching these products to IBM/SPSS customers for over 30 years. In addition, he is an experienced historian with expertise in the research and teaching of 20th Century United States political history and quantitative methods. His specialties are data mining, quantitative methods, statistical analysis, teaching, and consulting.

    www.PacktPub.com

    For support files and downloads related to your book, please visit www.PacktPub.com.

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

    At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

    https://www.packtpub.com/mapt

    Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

    Why subscribe?

    Fully searchable across every book published by Packt

    Copy and paste, print, and bookmark content

    On demand and accessible via a web browser

    Customer Feedback

    Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1788290674. If you'd like to join our team of regular reviewers, you can email us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

    Table of Contents

    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

    Downloading the color images of this book

    Errata

    Piracy

    Questions

    Transitioning from Data Developer to Data Scientist

    Data developer thinking

    Objectives of a data developer

    Querying or mining

    Data quality or data cleansing

    Data modeling

    Issue or insights

    Thought process

    Developer versus scientist

    New data, new source

    Quality questions

    Querying and mining

    Performance

    Financial reporting

    Visualizing

    Tools of the trade

    Advantages of thinking like a data scientist

    Developing a better approach to understanding data

    Using statistical thinking during program or database designing

    Adding to your personal toolbox

    Increased marketability

    Perpetual learning

    Seeing the future

    Transitioning to a data scientist

    Let's move ahead

    Summary

    Declaring the Objectives

    Key objectives of data science

    Collecting data

    Processing data

    Exploring and visualizing data

    Analyzing the data and/or applying machine learning to the data

    Deciding (or planning) based upon acquired insight

    Thinking like a data scientist

    Bringing statistics into data science

    Common terminology

    Statistical population

    Probability

    False positives

    Statistical inference

    Regression

    Fitting

    Categorical data

    Classification

    Clustering

    Statistical comparison

    Coding

    Distributions

    Data mining

    Decision trees

    Machine learning

    Munging and wrangling

    Visualization

    D3

    Regularization

    Assessment

    Cross-validation

    Neural networks

    Boosting

    Lift

    Mode

    Outlier

    Predictive modeling

    Big Data

    Confidence interval

    Writing

    Summary

    A Developer's Approach to Data Cleaning

    Understanding basic data cleaning

    Common data issues

    Contextual data issues

    Cleaning techniques

    R and common data issues

    Outliers

    Step 1 – Profiling the data

    Step 2 – Addressing the outliers

    Domain expertise

    Validity checking

    Enhancing data

    Harmonization

    Standardization

    Transformations

    Deductive correction

    Deterministic imputation

    Summary

    Data Mining and the Database Developer

    Data mining

    Common techniques

    Visualization

    Cluster analysis

    Correlation analysis

    Discriminant analysis

    Factor analysis

    Regression analysis

    Logistic analysis

    Purpose

    Mining versus querying

    Choosing R for data mining

    Visualizations

    Current smokers

    Missing values

    A cluster analysis

    Dimensional reduction

    Calculating statistical significance

    Frequent patterning

    Frequent item-setting

    Sequence mining

    Summary

    Statistical Analysis for the Database Developer

    Data analysis

    Looking closer

    Statistical analysis

    Summarization

    Comparing groups

    Samples

    Group comparison conclusions

    Summarization modeling

    Establishing the nature of data

    Successful statistical analysis

    R and statistical analysis

    Summary

    Database Progression to Database Regression

    Introducing statistical regression

    Techniques and approaches for regression

    Choosing your technique

    Does it fit?

    Identifying opportunities for statistical regression

    Summarizing data

    Exploring relationships

    Testing significance of differences

    Project profitability

    R and statistical regression

    A working example

    Establishing the data profile

    The graphical analysis

    Predicting with our linear model

    Step 1: Chunking the data

    Step 2: Creating the model on the training data

    Step 3: Predicting the projected profit on test data

    Step 4: Reviewing the model

    Step 4: Accuracy and error

    Summary

    Regularization for Database Improvement

    Statistical regularization

    Various statistical regularization methods

    Ridge

    Lasso

    Least angles

    Opportunities for regularization

    Collinearity

    Sparse solutions

    High-dimensional data

    Classification

    Using data to understand statistical regularization

    Improving data or a data model

    Simplification

    Relevance

    Speed

    Transformation

    Variation of coefficients

    Casual inference

    Back to regularization

    Reliability

    Using R for statistical regularization

    Parameter Setup

    Summary

    Database Development and Assessment

    Assessment and statistical assessment

    Objectives

    Baselines

    Planning for assessment

    Evaluation

    Development versus assessment

    Planning

    Data assessment and data quality assurance

    Categorizing quality

    Relevance

    Cross-validation

    Preparing data

    R and statistical assessment

    Questions to ask

    Learning curves

    Example of a learning curve

    Summary

    Databases and Neural Networks

    Ask any data scientist

    Defining neural network

    Nodes

    Layers

    Training

    Solution

    Understanding the concepts

    Neural network models and database models

    No single or main node

    Not serial

    No memory address to store results

    R-based neural networks

    References

    Data prep and preprocessing

    Data splitting

    Model parameters

    Cross-validation

    R packages for ANN development

    ANN

    ANN2

    NNET

    Black boxes

    A use case

    Popular use cases

    Character recognition

    Image compression

    Stock market prediction

    Fraud detection

    Neuroscience

    Summary

    Boosting your Database

    Definition and purpose

    Bias

    Categorizing bias

    Causes of bias

    Bias data collection

    Bias sample selection

    Variance

    ANOVA

    Noise

    Noisy data

    Weak and strong learners

    Weak to strong

    Model bias

    Training and prediction time

    Complexity

    Which way?

    Back to boosting

    How it started

    AdaBoost

    What you can learn from boosting (to help) your database

    Using R to illustrate boosting methods

    Prepping the data

    Training

    Ready for boosting

    Example results

    Summary

    Database Classification using Support Vector Machines

    Database classification

    Data classification in statistics

    Guidelines for classifying data

    Common guidelines

    Definitions

    Definition and purpose of an SVM

    The trick

    Feature space and cheap computations

    Drawing the line

    More than classification

    Downside

    Reference resources

    Predicting credit scores

    Using R and an SVM to classify data in a database

    Moving on

    Summary

    Database Structures and Machine Learning

    Data structures and data models

    Data structures

    Data models

    What's the difference?

    Relationships

    Machine learning

    Overview of machine learning concepts

    Key elements of machine learning

    Representation

    Evaluation

    Optimization

    Types of machine learning

    Supervised learning

    Unsupervised learning

    Semi-supervised learning

    Reinforcement learning

    Most popular

    Applications of machine learning

    Machine learning in practice

    Understanding

    Preparation

    Learning

    Interpretation

    Deployment

    Iteration

    Using R to apply machine learning techniques to a database

    Understanding the data

    Preparing

    Data developer

    Understanding the challenge

    Cross-tabbing and plotting

    Summary

    Preface

    Statistics are an absolute must prerequisite for any task in the area of data science but may also be the most feared deterrent for developers entering into the field of data science. This book will take you on a statistical journey from knowing very little to becoming comfortable using various statistical methods for typical data science tasks.

    What this book covers

    Chapter 1: Transitioning from Data Developer to Data Scientist, sets the stage for the transition from data developer to data scientist. You will understand the difference between a developer mindset versus a data scientist mindset, the important difference between the two, and how to transition into thinking like a data scientist.

    Chapter 2: Declaring the Objectives, introduces and explains (from a developer’s perspective) the basic objectives behind statistics for data science and introduces you to the important terms and keys that are used in the field of data science.

    Chapter 3: A Developer's  Approach to Data Cleaning, discusses how a developer might understand and approach the topic of data cleaning using common statistical methods.

    Chapter 4: Data Mining and the Database Developer, introduces the developer to mining data using R. You will understand what data mining is, why it is important, and feel comfortable using R for the most common statistical data mining methods: dimensional reduction, frequent patterns, and sequences.

    Chapter 5: Statistical Analysis for the Database Developer, discusses the difference between data analysis or summarization and statistical data analysis and will follow the steps for successful statistical analysis of data, describe the nature of data, explore the relationships presented in data, create a summarization model from data, prove the validity of a model, and employ predictive analytics on a developed model.

    Chapter 6: Database Progression to Database Regression, sets out to define statistical regression concepts and outline how a developer might use regression for simple forecasting and prediction within a typical data development project.

    Chapter 7: Regularization for Database Improvement, introduces the developer to the idea of statistical regularization to improve data models. You will review what statistical regularization is, why it is important, and various statistical regularization methods.

    Chapter 8: Data Development and Assessment, covers the idea of data model assessment and using statistics for assessment. You will understand what statistical assessment is, why it is important, and use R for statistical assessment.

    Chapter 9: Databases and Neural Networks, defines the neural network model and draws from a developer’s knowledge of data models to help understand the purpose and use of neural networks in data science.

    Chapter 10: Boosting and your Database, introduces the idea of using statistical boosting to better understand data in a database.

    Chapter 11: Database Classification using Support Vector Machines, uses developer terminologies to define an SVM, identify various applications for its use and walks through an example of using a simple SVM to classify data in a database

    Chapter 12: Database Structures and Machine Learning, aims to provide an explanation of the types of machine learning and shows the developer how to use machine learning processes to understand database mappings and identify patterns within the data.

    What you need for this book

    This book is intended for those with a data development background who are interested in possibly entering the field of data science and are looking for concise information on the topic of statistics with the help of insightful programs and simple explanation. Just bring your data development experience and an open mind!

    Who this book is for

    This book is intended for those developers who are interested in entering the field of data science and are looking for concise information on the topic of statistics with the help of insightful programs and simple explanation.

    Conventions

    In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

    Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: In statistics, a boxplot is a simple way to gain information regarding the shape, variability, and center (or median) of a statistical data set, so we'll use the boxplot with our data to see if we can identify both the median Coin-in and if there are any outliers.

    A block of code is set as follows:

    MyFile <-C:/GammingData/SlotsResults.csv

    MyData <- read.csv(file=MyFile, header=TRUE, sep=,)

    New terms and important words are shown in bold. 

    Warnings or important notes appear like this.

    Tips and tricks appear like this.

    Reader feedback

    Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply email [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

    Customer support

    Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

    Downloading the example code

    You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you. You can download the code files by following these steps:

    Log in or register to our website using your email address and password.

    Hover the mouse pointer on the SUPPORT tab at the top.

    Click on Code Downloads & Errata.

    Enter the name of the book in the Search box.

    Select the book for which you're looking to download the code files.

    Choose from the drop-down menu where you purchased this book from.

    Click on Code Download.

    Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

    WinRAR / 7-Zip for Windows

    Zipeg / iZip / UnRarX for Mac

    7-Zip / PeaZip for Linux

    The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Statistics-for-Data-Science. We also have other code bundles from our rich catalogue of books and videos available at https://github.com/PacktPublishing/. Check them out!

    Downloading the color images of this book

    We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/StatisticsforDataScience_ColorImages.pdf.

    Errata

    Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title. To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

    Piracy

    Piracy of copyrighted material on the internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the internet, please provide us with the location address or website name immediately so that we can pursue a remedy. Please

    Enjoying the preview?
    Page 1 of 1