Table Of ContentMachine Learning
and AI for Healthcare
Big Data for
Improved Health Outcomes
Arjun Panesar
Machine Learning and AI for Healthcare
Arjun Panesar
Coventry, UK
ISBN-13 (pbk): 978-1-4842-3798-4 ISBN-13 (electronic): 978-1-4842-3799-1
https://doi.org/10.1007/978-1-4842-3799-1
Library of Congress Control Number: 2018967454
Copyright © 2019 by Arjun Panesar
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book’s product page, located at www.apress.com/
978-1-4842-3798-4 For more detailed information, please visit http://www.apress.com/
source-code.
Contents
Introduction� �������������������������������������������������������������������������������������xxv
Chapter 1: What Is Artificial Intelligence? ��������������������������������������������1
A Multifaceted Discipline ��������������������������������������������������������������������������������������1
Examining Artificial Intelligence ����������������������������������������������������������������������������4
Reactive Machines ������������������������������������������������������������������������������������������6
Limited Memory—Systems That Think and Act Rationally �����������������������������6
Theory of Mind—Systems That Think Like Humans ���������������������������������������6
Self-Aware AI—Systems That Are Humans �����������������������������������������������������7
What Is Machine Learning?�����������������������������������������������������������������������������������8
What Is Data Science? ������������������������������������������������������������������������������������������9
Learning from Real-Time, Big Data ���������������������������������������������������������������������10
Applications of AI in Healthcare ��������������������������������������������������������������������������12
Prediction ������������������������������������������������������������������������������������������������������13
Diagnosis �������������������������������������������������������������������������������������������������������13
Personalized Treatment and Behavior Modification ��������������������������������������13
Drug Discovery ����������������������������������������������������������������������������������������������14
Follow-Up Care ����������������������������������������������������������������������������������������������14
Realizing the Potential of AI in Healthcare ����������������������������������������������������������15
Understanding Gap ����������������������������������������������������������������������������������������15
Fragmented Data �������������������������������������������������������������������������������������������15
Appropriate Security ��������������������������������������������������������������������������������������16
Data Governance �������������������������������������������������������������������������������������������16
Bias ����������������������������������������������������������������������������������������������������������������17
Software ��������������������������������������������������������������������������������������������������������������17
Conclusion ����������������������������������������������������������������������������������������������������������18
Chapter 2: Data �����������������������������������������������������������������������������������21
What Is Data? ������������������������������������������������������������������������������������������������������21
Types of Data ������������������������������������������������������������������������������������������������������23
Big Data ��������������������������������������������������������������������������������������������������������������26
Volume �����������������������������������������������������������������������������������������������������������28
Variety �����������������������������������������������������������������������������������������������������������31
Velocity ����������������������������������������������������������������������������������������������������������34
Value ��������������������������������������������������������������������������������������������������������������37
Veracity ����������������������������������������������������������������������������������������������������������39
Validity �����������������������������������������������������������������������������������������������������������41
Variability �������������������������������������������������������������������������������������������������������41
Visualization ��������������������������������������������������������������������������������������������������42
Small Data �����������������������������������������������������������������������������������������������������������42
Metadata �������������������������������������������������������������������������������������������������������������43
Healthcare Data—Little and Big Use Cases ��������������������������������������������������������44
Predicting Waiting Times �������������������������������������������������������������������������������44
Reducing Readmissions ��������������������������������������������������������������������������������44
Predictive Analytics ���������������������������������������������������������������������������������������45
Electronic Health Records �����������������������������������������������������������������������������45
Value-Based Care/Engagement ���������������������������������������������������������������������46
Healthcare IoT—Real-Time Notifications, Alerts, Automation �����������������������47
Movement Toward Evidence-Based Medicine �����������������������������������������������49
Public Health �������������������������������������������������������������������������������������������������50
Evolution of Data and Its Analytics ����������������������������������������������������������������������51
Turning Data into Information: Using Big Data ����������������������������������������������������53
Descriptive Analytics �������������������������������������������������������������������������������������54
Diagnostic Analytics ��������������������������������������������������������������������������������������55
Predictive Analytics ���������������������������������������������������������������������������������������55
Prescriptive Analytics ������������������������������������������������������������������������������������58
Reasoning �����������������������������������������������������������������������������������������������������������59
Deduction ������������������������������������������������������������������������������������������������������60
Induction ��������������������������������������������������������������������������������������������������������60
Abduction ������������������������������������������������������������������������������������������������������61
How Much Data Do I Need for My Project? ���������������������������������������������������������61
Challenges of Big Data ����������������������������������������������������������������������������������������62
Data Growth ���������������������������������������������������������������������������������������������������62
Infrastructure �������������������������������������������������������������������������������������������������62
Expertise ��������������������������������������������������������������������������������������������������������63
Data Sources �������������������������������������������������������������������������������������������������63
Quality of Data �����������������������������������������������������������������������������������������������63
Security ���������������������������������������������������������������������������������������������������������63
Resistance ����������������������������������������������������������������������������������������������������������64
Policies and Governance �������������������������������������������������������������������������������������65
Fragmentation �����������������������������������������������������������������������������������������������������65
Lack of Data Strategy ������������������������������������������������������������������������������������������65
Visualization ��������������������������������������������������������������������������������������������������������66
Timeliness of Analysis �����������������������������������������������������������������������������������������66
Ethics ������������������������������������������������������������������������������������������������������������������66
Data and Information Governance ����������������������������������������������������������������������66
Data Stewardship ������������������������������������������������������������������������������������������67
Data Quality ���������������������������������������������������������������������������������������������������68
Data Security �������������������������������������������������������������������������������������������������68
Data Availability ���������������������������������������������������������������������������������������������68
Data Content ��������������������������������������������������������������������������������������������������69
Master Data Management (MDM)������������������������������������������������������������������69
Use Cases ������������������������������������������������������������������������������������������������������69
Deploying a Big Data Project�������������������������������������������������������������������������������71
Big Data Tools �����������������������������������������������������������������������������������������������������72
Conclusion ����������������������������������������������������������������������������������������������������������73
Chapter 3: What Is Machine Learning? �����������������������������������������������75
Basics �����������������������������������������������������������������������������������������������������������������77
Agent �������������������������������������������������������������������������������������������������������������77
Autonomy ������������������������������������������������������������������������������������������������������78
Interface ��������������������������������������������������������������������������������������������������������78
Performance ��������������������������������������������������������������������������������������������������79
Goals ��������������������������������������������������������������������������������������������������������������79
Utility �������������������������������������������������������������������������������������������������������������79
Knowledge �����������������������������������������������������������������������������������������������������80
Environment ��������������������������������������������������������������������������������������������������80
Training Data �������������������������������������������������������������������������������������������������81
Target Function ����������������������������������������������������������������������������������������������82
Hypothesis �����������������������������������������������������������������������������������������������������82
Learner ����������������������������������������������������������������������������������������������������������82
Hypothesis �����������������������������������������������������������������������������������������������������82
Validation �������������������������������������������������������������������������������������������������������82
Dataset ����������������������������������������������������������������������������������������������������������82
Feature ����������������������������������������������������������������������������������������������������������82
Feature Selection ������������������������������������������������������������������������������������������83
What Is Machine Learning?���������������������������������������������������������������������������������83
How Is Machine Learning Different from Traditional Software Engineering? �����84
Machine Learning Basics ������������������������������������������������������������������������������������85
Supervised Learning ��������������������������������������������������������������������������������������86
How Machine Learning Algorithms Work ������������������������������������������������������������95
How to Perform Machine Learning ���������������������������������������������������������������������96
Specifying the Problem ���������������������������������������������������������������������������������97
Preparing the Data �����������������������������������������������������������������������������������������99
Choosing the Learning Method ��������������������������������������������������������������������102
Applying the Learning Methods �������������������������������������������������������������������103
Assessing the Method and Results �������������������������������������������������������������107
Optimization ������������������������������������������������������������������������������������������������113
Reporting the Results ����������������������������������������������������������������������������������116
Chapter 4: Machine Learning Algorithms �����������������������������������������119
Defining Your Machine Learning Project �����������������������������������������������������������120
Task (T) ��������������������������������������������������������������������������������������������������������120
Performance (P) �������������������������������������������������������������������������������������������121
Experience (E) ����������������������������������������������������������������������������������������������121
Common Libraries for Machine Learning ����������������������������������������������������������123
Supervised Learning Algorithms �����������������������������������������������������������������������125
Classification �����������������������������������������������������������������������������������������������127
Regression ���������������������������������������������������������������������������������������������������128
Decision trees ���������������������������������������������������������������������������������������������������129
Iterative Dichotomizer 3 (ID3) ����������������������������������������������������������������������133
C4�5 �������������������������������������������������������������������������������������������������������������134
CART ������������������������������������������������������������������������������������������������������������134
Ensembles���������������������������������������������������������������������������������������������������������135
Bagging �������������������������������������������������������������������������������������������������������135
Boosting ������������������������������������������������������������������������������������������������������137
Linear Regression ���������������������������������������������������������������������������������������������139
Logistic Regression �������������������������������������������������������������������������������������������141
SVM �������������������������������������������������������������������������������������������������������������������143
Naive Bayes ������������������������������������������������������������������������������������������������������145
kNN: k-nearest neighbor �����������������������������������������������������������������������������������147
Neural Networks �����������������������������������������������������������������������������������������������148
Perceptron ���������������������������������������������������������������������������������������������������149
Artificial Neural Networks ���������������������������������������������������������������������������151
Deep Learning ���������������������������������������������������������������������������������������������������152
Feedforward Neural Network ����������������������������������������������������������������������154
Recurrent Neural Network (RNN)—Long Short- Term Memory��������������������154
Convolutional Neural Network ���������������������������������������������������������������������155
Modular Neural Network �����������������������������������������������������������������������������155
Radial Basis Neural Network �����������������������������������������������������������������������156
Unsupervised Learning �������������������������������������������������������������������������������������157
Clustering ����������������������������������������������������������������������������������������������������158
K-Means ������������������������������������������������������������������������������������������������������158
Association ��������������������������������������������������������������������������������������������������160
Apriori ����������������������������������������������������������������������������������������������������������161
Dimensionality Reduction Algorithms ���������������������������������������������������������������162
Dimension Reduction Techniques ���������������������������������������������������������������������165
Missing/Null Values �������������������������������������������������������������������������������������165
Low Variance �����������������������������������������������������������������������������������������������165
High Correlation �������������������������������������������������������������������������������������������165
Random Forest Decision Trees ��������������������������������������������������������������������166
Backward Feature Elimination���������������������������������������������������������������������166
Forward Feature Construction ���������������������������������������������������������������������166
Principal Component Analysis (PCA) ������������������������������������������������������������166
Natural Language Processing (NLP) ������������������������������������������������������������������167
Getting Started with NLP �����������������������������������������������������������������������������������170
Preprocessing: Lexical Analysis ������������������������������������������������������������������������170
Noise Removal ���������������������������������������������������������������������������������������������171
Lexicon Normalization ���������������������������������������������������������������������������������171
Porter Stemmer �������������������������������������������������������������������������������������������171
Object Standardization ��������������������������������������������������������������������������������172
Syntactic Analysis ���������������������������������������������������������������������������������������������172
Dependency Parsing ������������������������������������������������������������������������������������173
Part of Speech Tagging ��������������������������������������������������������������������������������173
Semantic analysis ���������������������������������������������������������������������������������������������175
Techniques Used Within NLP �����������������������������������������������������������������������������175
N-grams ������������������������������������������������������������������������������������������������������175
TF IDF Vectors ����������������������������������������������������������������������������������������������176
Latent Semantic Analysis ����������������������������������������������������������������������������177
Cosine Similarity ������������������������������������������������������������������������������������������177
Naïve Bayesian Classifier ����������������������������������������������������������������������������178
Genetic Algorithms ��������������������������������������������������������������������������������������������179
Best Practices and Considerations �������������������������������������������������������������������180
Good Data Management ������������������������������������������������������������������������������180
Establish a Performance Baseline ���������������������������������������������������������������181
Spend Time Cleaning Your Data �������������������������������������������������������������������181
Training Time �����������������������������������������������������������������������������������������������182
Choosing an Appropriate Model ������������������������������������������������������������������182
Choosing Appropriate Variables �������������������������������������������������������������������182
Redundancy �������������������������������������������������������������������������������������������������183
Overfitting ����������������������������������������������������������������������������������������������������183
Productivity ��������������������������������������������������������������������������������������������������183
Understandability ����������������������������������������������������������������������������������������184
Accuracy ������������������������������������������������������������������������������������������������������184
Impact of False Negatives ���������������������������������������������������������������������������184
Linearity �������������������������������������������������������������������������������������������������������185
Parameters ��������������������������������������������������������������������������������������������������185
Ensembles ���������������������������������������������������������������������������������������������������186
Use Case: Type 2 Diabetes ��������������������������������������������������������������������������������186
Chapter 5: Evaluating Learning for Intelligence �������������������������������189
Model Development and Workflow �������������������������������������������������������������������190
Why Are There Two Approaches to Evaluating a Model? �����������������������������191
Evaluation Metrics ���������������������������������������������������������������������������������������192
Skewed Datasets, Anomalies, and Rare Data ���������������������������������������������������199
Parameters and Hyperparameters ��������������������������������������������������������������������199
Tuning Hyperparameters �����������������������������������������������������������������������������������200
Hyperparameter Tuning Algorithms�������������������������������������������������������������������200
Grid Search ��������������������������������������������������������������������������������������������������201
Random Search �������������������������������������������������������������������������������������������201