Search icon CANCEL
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

Handling never-before-seen metrics

Before proceeding, we have to consider that the top 20 table doesn’t cover all the metrics used in competitions. We should be aware that there are metrics that have only been used once in recent years.

Let’s keep on using the results from the previous code to find out what they are:

counts = (df[time_select&competition_type_select]
          .groupby('EvaluationAlgorithmAbbreviation'))
total_comps_per_year = (df[time_select&competition_type_select]
                        .groupby('year').sum())
single_metrics_per_year = (counts.sum()[counts.sum().comps==1]
                           .groupby('year').sum())
single_metrics_per_year
table = (total_comps_per_year.rename(columns={'comps': 'n_comps'})
         .join(single_metrics_per_year / total_comps_per_year)
         .rename(columns={'comps': 'pct_comps'}))
print(table)

As a result, we get the...

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