Appendix

About

This section is included to assist the students to perform the activities present in the book. It includes detailed steps that are to be performed by the students to complete and achieve the objectives of the book.

Chapter 1: Introduction to scikit-learn

Activity 1: Selecting a Target Feature and Creating a Target Matrix

  1. Load the titanic dataset using the seaborn library. First, import the seaborn library, and then use the load_dataset("titanic") function:

    import seaborn as sns

    titanic = sns.load_dataset('titanic')

    titanic.head(10)

    Next, print out the top 10 instances; this should match the below screenshot:

    Figure 1.23: An image showing the first 10 instances of the titanic dataset
    Figure 1.23: An ...

Get Machine Learning Fundamentals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.