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

Text augmentation strategies

We discussed augmentation strategies for computer vision problems extensively in the previous chapter. By contrast, similar approaches for textual data are a less well-explored topic (as evidenced by the fact there is no single package like albumentations). In this section, we demonstrate some of the possible approaches to addressing the problem.

Basic techniques

As usual, it is informative to examine the basic approaches first, focusing on random changes and synonym handling. A systematic study of the basic approaches is provided in Wei and Zou (2019) at https://arxiv.org/abs/1901.11196.

We begin with synonym replacement. Replacing certain words with their synonyms produces text that is close in meaning to the original, but slightly perturbed (see the project page at https://wordnet.princeton.edu/ if you are interested in more details, like where the synonyms are actually coming from):

def get_synonyms(word):
    
    synonyms = set()...
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