Book Image

Machine Learning for Healthcare Analytics Projects

Book Image

Machine Learning for Healthcare Analytics Projects

Overview of this book

Machine Learning (ML) has changed the way organizations and individuals use data to improve the efficiency of a system. ML algorithms allow strategists to deal with a variety of structured, unstructured, and semi-structured data. Machine Learning for Healthcare Analytics Projects is packed with new approaches and methodologies for creating powerful solutions for healthcare analytics. This book will teach you how to implement key machine learning algorithms and walk you through their use cases by employing a range of libraries from the Python ecosystem. You will build five end-to-end projects to evaluate the efficiency of Artificial Intelligence (AI) applications for carrying out simple-to-complex healthcare analytics tasks. With each project, you will gain new insights, which will then help you handle healthcare data efficiently. As you make your way through the book, you will use ML to detect cancer in a set of patients using support vector machines (SVMs) and k-Nearest neighbors (KNN) models. In the final chapters, you will create a deep neural network in Keras to predict the onset of diabetes in a huge dataset of patients. You will also learn how to predict heart diseases using neural networks. By the end of this book, you will have learned how to address long-standing challenges, provide specialized solutions for how to deal with them, and carry out a range of cognitive tasks in the healthcare domain.
Table of Contents (7 chapters)

Detecting diabetes using a grid search

We will be predicting diabetes on a of patients by using a deep learning algorithm, which we will optimize with a grid search to find the optimal hyperparameters. We are going to be doing this project in Jupyter Notebook, as follows:

  1. Start by opening up Command Prompt in Windows or Terminal in Linux systems. We will navigate to our project directory using the cd command.
  2. Our next step is to open the Jupyter Notebook by typing the following command:
jupyter notebook
Alternatively, you can use the jupyter lab command to open an instance of Jupyter Lab, which is just a better version of Notebook.
  1. Once the Notebook is open, we will rename the unnamed file to Deep Learning Grid Search.
  2. We will then import our packages using general import statements. We will print the version numbers, as shown in the following screenshot:

Keras has two options...