Book Image

Healthcare Analytics Made Simple

By : Vikas (Vik) Kumar, Shameer Khader
Book Image

Healthcare Analytics Made Simple

By: Vikas (Vik) Kumar, Shameer Khader

Overview of this book

In recent years, machine learning technologies and analytics have been widely utilized across the healthcare sector. Healthcare Analytics Made Simple bridges the gap between practising doctors and data scientists. It equips the data scientists’ work with healthcare data and allows them to gain better insight from this data in order to improve healthcare outcomes. This book is a complete overview of machine learning for healthcare analytics, briefly describing the current healthcare landscape, machine learning algorithms, and Python and SQL programming languages. The step-by-step instructions teach you how to obtain real healthcare data and perform descriptive, predictive, and prescriptive analytics using popular Python packages such as pandas and scikit-learn. The latest research results in disease detection and healthcare image analysis are reviewed. By the end of this book, you will understand how to use Python for healthcare data analysis, how to import, collect, clean, and refine data from electronic health record (EHR) surveys, and how to make predictive models with this data through real-world algorithms and code examples.
Table of Contents (11 chapters)

Splitting the data into train and test sets

Now that we have our response variable, the next step is to split the dataset into train and test sets. In data science, the training set is the data that is used to determine the model coefficients. In the training phase, the model takes into account the predictor variable values together with the response value to "discover" the rules and the weights that will guide the prediction of new data. The testing set is then used to measure our model performance, as we discussed in Chapter 3, Machine Learning Foundations. Typical splits use 70-80% for the training data and 20-30% for the testing data (unless the dataset is very large, in which case a smaller percentage can be allotted toward the testing set).

Some practitioners also have a validation set that is used to train model parameters, such as the tree size in the random...