To get the most out of this book
You will need a Jupyter environment with Python 3.6+. You can do either of the following:
- Install one on your machine locally via Anaconda Navigator or from scratch with pip.
- Use a cloud-based one such as Google Colaboratory, Kaggle Notebooks, Azure Notebooks, or Amazon Sagemaker.
The instructions on how to get started will vary accordingly, so we strongly suggest that you search online for the latest instructions for setting them up.
For instructions on installing the many packages employed throughout the book, please go to the Git repository, which will have the updated instructions in the readme file. We expect these to change from time to time, given how often packages change. We also tested the code with specific versions detailed in the readme, so should anything fail with later versions, please install the specific version instead.
Individual chapters begin with instructions on how to install packages in this form:
!pip install --upgrade nltk lightgbm lime
But depending on the way Jupyter was set up, installing packages might be best done through the command line or using conda, so we suggest you adapt these installation instructions to suit your needs.
If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
If you are not a machine learning practitioner or are a beginner, the advice is to read the book sequentially since many concepts are only explained in great detail in earlier chapters. The recommendation for practitioners skilled in machine learning but not acquainted with interpretability is that they can skim the first three chapters to get the ethical context and concept definitions they need to make sense of the rest, but read in the rest in order. As for advanced practitioners that have the foundations of interpretability, reading in any order should be fine.
As for the code, you can read the book without running the code simultaneously or strictly for the theory. But if you plan to run the code, it is best to do it with the book as a guide to assist with the interpretation of outcomes, and to strengthen your understanding of the theory.
While you are reading the book, think of ways in which you could use the tools learned, and by the end of it, hopefully, you will be inspired to put this newly gained knowledge into action!