Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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 Automation with TPOT

You're reading from   Machine Learning Automation with TPOT Build, validate, and deploy fully automated machine learning models with Python

Arrow left icon
Product type Paperback
Published in May 2021
Publisher Packt
ISBN-13 9781800567887
Length 270 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dario Radečić Dario Radečić
Author Profile Icon Dario Radečić
Dario Radečić
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Section 1: Introducing Machine Learning and the Idea of Automation
2. Chapter 1: Machine Learning and the Idea of Automation FREE CHAPTER 3. Section 2: TPOT – Practical Classification and Regression
4. Chapter 2: Deep Dive into TPOT 5. Chapter 3: Exploring Regression with TPOT 6. Chapter 4: Exploring Classification with TPOT 7. Chapter 5: Parallel Training with TPOT and Dask 8. Section 3: Advanced Examples and Neural Networks in TPOT
9. Chapter 6: Getting Started with Deep Learning: Crash Course in Neural Networks 10. Chapter 7: Neural Network Classifier with TPOT 11. Chapter 8: TPOT Model Deployment 12. Chapter 9: Using the Deployed TPOT Model in Production 13. Other Books You May Enjoy

Training a neural network classifier

Up to this point, we've loaded in the dataset and undertaken a basic exploratory data analysis. This section of the chapter will focus on training models through different configurations:

  1. Before we can move on to model training, we need to split our dataset into training and testing subsets. Doing so will allow us to have a sample of the data never seen by the model, and which can later be used for evaluation.

    The following code snippet will split the data in a 75:25 ratio:

    from sklearn.model_selection import train_test_split
    X = df.drop('target', axis=1)
    y = df['target']
    X_train, X_test, y_train, y_test =train_test_split(\
    X, y, test_size=0.25, random_state=42)

    We can begin with training next.

  2. As always, let's start simply by training a baseline model. This will serve as a minimum viable performance that the neural network classifier has to outperform.

    The simplest binary classification algorithm is logistic...

lock icon The rest of the chapter is locked
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