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 now! 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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Kaggle Book

You're reading from   The Kaggle Book Data analysis and machine learning for competitive data science

Arrow left icon
Product type Paperback
Published in Apr 2022
Publisher Packt
ISBN-13 9781801817479
Length 534 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Luca Massaron Luca Massaron
Author Profile Icon Luca Massaron
Luca Massaron
Konrad Banachewicz Konrad Banachewicz
Author Profile Icon Konrad Banachewicz
Konrad Banachewicz
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface
1. Part I: Introduction to Competitions
2. Introducing Kaggle and Other Data Science Competitions FREE CHAPTER 3. Organizing Data with Datasets 4. Working and Learning with Kaggle Notebooks 5. Leveraging Discussion Forums 6. Part II: Sharpening Your Skills for Competitions
7. Competition Tasks and Metrics 8. Designing Good Validation 9. Modeling for Tabular Competitions 10. Hyperparameter Optimization 11. Ensembling with Blending and Stacking Solutions 12. Modeling for Computer Vision 13. Modeling for NLP 14. Simulation and Optimization Competitions 15. Part III: Leveraging Competitions for Your Career
16. Creating Your Portfolio of Projects and Ideas 17. Finding New Professional Opportunities 18. Other Books You May Enjoy
19. Index

Classification

In this section, we will demonstrate an end-to-end pipeline that can be used as a template for handling image classification problems. We will walk through the necessary steps, from data preparation, to model setup and estimation, to results visualization. Apart from being informative (and cool), this last step can also be very useful if you need to examine your code in-depth to get a better understanding of the performance.

We will continue using the data from the Cassava Leaf Disease Classification contest (https://www.kaggle.com/c/cassava-leaf-disease-classification).

As usual, we begin by loading the necessary libraries:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import datetime
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import tensorflow as tf
from tensorflow.keras import models, layers
from tensorflow.keras.preprocessing import image
from tensorflow.keras.preprocessing...
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 €18.99/month. Cancel anytime