Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning Fundamentals

You're reading from   Machine Learning Fundamentals Use Python and scikit-learn to get up and running with the hottest developments in machine learning

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher
ISBN-13 9781789803556
Length 240 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Hyatt Saleh Hyatt Saleh
Author Profile Icon Hyatt Saleh
Hyatt Saleh
Arrow right icon
View More author details
Toc

Chapter 6: Building Your Own Program

Activity 16: Performing the Preparation and Creation Stages for the Bank Marketing Dataset

For the purpose of this demonstration, a random_state equal to 100 will be used for the following solution:

  1. Open a Jupyter Notebook to implement this activity and import pandas:
    import pandas as pd
  2. Load the previously downloaded dataset into the notebook:
    data = pd.read_csv("../datasets/bank-full.csv")

    The first 10 rows of the dataset can be seen using the statement data.head(10):

    Figure 6.6: A screenshot showing the first 10 instances of the dataset

    The missing values are shown as NaN, as explained previously.

  3. Select the metric that's the most appropriate for measuring the performance of the model, considering that the purpose of the study is to detect clients who would subscribe to the term deposit.

    The metric to evaluate the performance of the model is the precision metric, as it compares the correctly classified positive labels...

lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image