Professional Documents
Culture Documents
Full download Developing Kaggle Notebooks Gabriel Preda file pdf all chapter on 2024
Full download Developing Kaggle Notebooks Gabriel Preda file pdf all chapter on 2024
Preda
Visit to download the full and correct content document:
https://ebookmass.com/product/developing-kaggle-notebooks-gabriel-preda/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...
https://ebookmass.com/product/the-notebooks-of-alexander-
skryabin-1st-edition-aleksandr-nikolayevich-scriabin/
https://ebookmass.com/product/john-gabriel-borkman-henrik-ibsen/
https://ebookmass.com/product/figurations-of-human-subjectivity-
gabriel-bianchi/
https://ebookmass.com/product/blood-lust-la-famiglia-de-luca-
gabriel-kristine-allen/
Cultural Literacy and Empathy in Education Practice
Gabriel García Ochoa
https://ebookmass.com/product/cultural-literacy-and-empathy-in-
education-practice-gabriel-garcia-ochoa/
https://ebookmass.com/product/gabriel-shadowridge-guardians-mc-
book-5-1st-edition-becca-jameson/
https://ebookmass.com/product/the-will-to-power-selections-from-
the-notebooks-of-the-1880s-friedrich-nietzsche/
https://ebookmass.com/product/ebook-pdf-developing-management-
skills-9th-edition/
https://ebookmass.com/product/inequality-in-the-developing-world-
carlos-gradin/
Developing Kaggle Notebooks
Gabriel Preda
BIRMINGHAM—MUMBAI
Packt and this book are not officially connected with Kaggle. This
book is an effort from the Kaggle community of experts to help
more developers.
Developing Kaggle Notebooks
Grosvenor House
11 St Paul’s Square
Birmingham
B3 1RB, UK.
ISBN 978-1-80512-851-9
www.packt.com
Forewords
When I entered the world of AI and ML over twenty years ago, it was hard
to describe to the people in my life what this field was. The ideas of finding
patterns in data made it sound like I was hunting around in the attic with a
flashlight. Telling family members about creating models that made useful
predictions seemed to bring to mind children’s toys, or maybe some sort of
fortune-telling. And the suggestion that machines might learn or be made to
act with some form of observable intelligence was seen as the sort of thing
that serious people left to the realm of science fiction.
Here we are in 2023, and the world has changed dramatically. The world of
AI and ML has made stunning advances and has become – at least in my
opinion – one of the most important technologies in existence. Predictive
models are a tightly integrated part of nearly every computational platform,
system, or application and impact business, trade, health, education,
transportation, nearly every scientific field, and creative fields from visual
art to music to writing. Indeed, AI and ML have become so important that
the topics of governance, policy, and regulation are also emerging areas of
rapid development themselves, and it seems that there is a new
development almost every week.
Much of the most recent focus of attention has been on Generative AI,
driven by LLMs and related methods, all of which draw on the last decade
of advances in scaling up deep learning methods. For these models, it can
feel like bigger is always better, and the scale of resources – computation,
data, expertise – needed to contribute to this field makes it inaccessible to
anyone outside of a small number of large players in the space. Personally, I
reject this viewpoint.
I think that what the world really needs in this moment of massive
change and development is for as many people as possible to learn how
AI and ML models and systems work. We need as many people as
possible to be able to train models, yes, but also to tweak and change them,
to evaluate them, to understand their strengths and weaknesses, and to help
identify ways that they can be more reliable, more efficient, less biased,
more useful, and more accessible to everyone across the globe. Doing this
within a broad, worldwide community helps to make sure that the things we
learn together are shared broadly but are also stress-tested and re-evaluated
by others.
This spirit of sharing is something that I think Gabriel Preda has embodied
for many years, as a leading Kaggle Grandmaster. His dedication to our
Kaggle community has been amazing, and his willingness to share his
expertise serves as an example for all of us. This is one of the reasons why I
think that this book itself is so important. Creating and sharing notebooks is
the best way to make sure that the things we think are true can be checked,
verified, and built upon by others.
So what does the world of AI and ML need right now, in this incredible
moment of possibility? It needs you.
Welcome to Kaggle!
D. Sculley
We created Kaggle with the hope that the platform would allow people like
me the opportunity to break into this powerful new field much easier than it
was for me. Perhaps the thing that makes me most proud is the extent to
which Kaggle has made data science and machine learning more accessible
for a wide audience. Kaggle has seen newcomers evolve into top machine
learners, securing positions at renowned companies like NVIDIA, Google,
Hugging Face, and OpenAI, and even launching their ventures such as
DataRobot.
Gabriel’s book will make Kaggle more accessible, especially for those
interested in learning how to create detailed data analysis notebooks, refine
their presentation skills, and create powerful narratives with data. It also
offers examples of using notebooks to iteratively build models to prepare
for competition submissions, and introduces users to the newest available
features on Kaggle, including a chapter that shows how to leverage the
power of Generative AI through Kaggle Models for prototyping
applications with large language models to generate code, create chains of
tasks, or build retrieval augmented generation systems.
So, for those of you who are reading this book and are new to Kaggle, I
hope it helps make Kaggle, and especially writing Kaggle notebooks, less
intimidating. And for those who have been on Kaggle for a while and are
looking to level up, I hope this book from one of Kaggle’s most respected
members helps you get more out of your time on the platform.
Anthony Goldbloom
Founder and former CEO of Kaggle
Contributors
Marília Prata is a retired dental doctor who worked for 28 years in her
private clinic, provided dental audit services for Petrobras (Petróleo
Brasilero S/A), and served as a public servant in the Civil Police of Rio de
Janeiro. She also completed two specializations in dental prosthesis and
occupational dentistry. She is currently a triple Kaggle Grandmaster at the
time of publishing, ranking second in Notebooks.
I’m very grateful to the Kaggle platform and its users (Kagglers)
because it’s a perfect place to start learning programming languages
hands-on. Special thanks to Gabriel Preda for trusting my ability to
review his invaluable work in this riveting field of data science.
Dr. Firat Gonen, PhD, orchestrates the Data and Analytics division at
Allianz, propelling a Fortune 50 company with pioneering machine learning
initiatives. His expertise, built on a foundation laid during his academic
tenure culminating in a PhD from the University of Houston, now guides
Allianz’s data-driven strategies. His role at Allianz was preceded by
leadership positions at Getir – Turkish Decacorn App – and Vodafone,
where he honed his prowess in managing adept data teams. Dr. Gonen’s
extensive educational background and academic diligence are reflected in
multiple peer-reviewed publications and complemented by his status as a
Kaggle Triple Grandmaster, further adorned with numerous international
data competition accolades. As the Z by HP Global Data Science
Ambassador, Dr. Gonen advocates for the transformative power of data,
underscoring the symbiotic relationship between cutting-edge technology
and industry-leading insights. He was recently awarded the title of LinkedIn
Top Data Science and Artificial Intelligence Voice. He also reviewed the
Kaggle Book.
I would like to thank Deniz for her help, guidance, love, and her
constant support along the way.
Join our book’s Discord space
Join our Discord community to meet like-minded people and learn
alongside more than 5000 members at:
https://packt.link/kaggle
Contents
Preface
Who this book is for
What this book covers
To get the most out of this book
Get in touch
1. Introducing Kaggle and Its Basic Functions
The Kaggle platform
Kaggle Competitions
Kaggle Datasets
Kaggle Code
Kaggle Discussions
Kaggle Learn
Kaggle Models
Summary
2. Getting Ready for Your Kaggle Environment
What is a Kaggle Notebook?
How to create notebooks
Exploring notebook capabilities
Basic capabilities
Advanced capabilities
Setting a notebook as a utility script or adding utility
scripts
Adding and using secrets
Using Google Cloud services in Kaggle Notebooks
Upgrading your Kaggle Notebook to Google Cloud AI
Notebooks
Using a Notebook to automatically update a Dataset
Using the Kaggle API to create, update, download, and monitor
your notebooks
Summary
3. Starting Our Travel – Surviving the Titanic Disaster
A closer look at the Titanic
Conducting data inspection
Understanding the data
Analyzing the data
Performing univariate analysis
Performing multivariate analysis
Extracting meaningful information from passenger names
Creating a dashboard showing multiple plots
Building a baseline model
Summary
References
4. Take a Break and Have a Beer or Coffee in London
Pubs in England
Data quality check
Data exploration
Starbucks around the world
Preliminary data analysis
Univariate and bivariate data analysis
Geospatial analysis
Pubs and Starbucks in London
Data preparation
Geospatial analysis
Summary
References
5. Get Back to Work and Optimize Microloans for Developing Countries
Introducing the Kiva analytics competition
More data, more insights – analyzing the Kiva data competition
Understanding the borrower demographic
Exploring MPI correlation with other factors
Radar visualization of poverty dimensions
Final remarks
Telling a different story from a different dataset
The plot
The actual history
Conclusion
Summary
References
6. Can You Predict Bee Subspecies?
Data exploration
Data quality checks
Exploring image data
Locations
Date and time
Subspecies
Health
Others
Conclusion
Subspecies classification
Splitting the data
Data augmentation
Building a baseline model
Iteratively refining the model
Summary
References
7. Text Analysis Is All You Need
What is in the data?
Target feature
Sensitive features
Analyzing the comments text
Topic modeling
Named entity recognition
POS tagging
Preparing the model
Building the vocabulary
Embedding index and embedding matrix
Checking vocabulary coverage
Iteratively improving vocabulary coverage
Transforming to lowercase
Removing contractions
Removing punctuation and special characters
Building a baseline model
Transformer-based solution
Summary
References
8. Analyzing Acoustic Signals to Predict the Next Simulated Earthquake
Introducing the LANL Earthquake Prediction competition
Formats for signal data
Exploring our competition data
Solution approach
Feature engineering
Trend feature and classic STA/LTA
FFT-derived features
Features derived from aggregate functions
Features derived using the Hilbert transform and Hann
window
Features based on moving averages
Building a baseline model
Summary
References
9. Can You Find Out Which Movie Is a Deepfake?
Introducing the competition
Introducing competition utility scripts
Video data utils
Face and body detection utils
Metadata exploration
Video data exploration
Visualizing sample files
Performing object detection
Summary
References
10. Unleash the Power of Generative AI with Kaggle Models
Introducing Kaggle Models
Prompting a foundation model
Model evaluation and testing
Model quantization
Building a multi-task application with Langchain
Code generation with Kaggle Models
Creating a RAG system
Summary
References
11. Closing Our Journey: How to Stay Relevant and on Top
Learn from the best: observe successful Grandmasters
Revisit and refine your work periodically
Recognize other’s contributions, and add your personal touch
Be quick: don’t wait for perfection
Be generous: share your knowledge
Step outside your comfort zone
Be grateful
Summary
References
Other Books You May Enjoy
Index
Preface
More than six years ago, before I first discovered Kaggle, I was searching
for a new path in my professional career. A few years later, I was firmly
entrenched in a new job, which Kaggle helped me find. Before discovering
this marvelous site, I was looking around on different sites, reading articles,
downloading and analyzing datasets, trying out pieces of code from GitHub
or other sites, doing online trainings, and reading books. With Kaggle, I
found more than a source of information; I found a community sharing the
same interest in machine learning, and, more generally, in data science,
looking to learn, share knowledge, and solve difficult challenges. I also
discovered that in this community, if you want, you can experience an
accelerated learning curve, because you can learn from the best, sometimes
competing against them, and other times collaborating with them. You can
also learn from the less experienced; after all these years on the platform, I
am still learning from both crowds.
This book is intended to introduce you to the wide world of data analysis,
with a focus on how you can use Kaggle Notebooks resources to help you
achieve mastery in this field. We will cover simple concepts to more
advanced ones. The book is also a personal journey and will take you down
a similar path to the one I took while experimenting and learning about
analyzing datasets and preparing for competitions.
Another random document with
no related content on Scribd:
And after the prayer the Archpriest openeth the book of the
apostles over the head of the reader. And the subdeacons conduct
him from the Archpriest, and place him in the middle of the church,
with his face towards the east, and give him the book of the apostles,
and he readeth thus, The reading of the message of the holy apostle
Paul to the Romans (or, to others). And he readeth the portion of the
epistle that is appointed, from the beginning to the end, and turneth
himself and boweth thrice to the Archpriest according to rite. And the
subdeacons take off from him the phelonion, and conduct him to the
Archpriest. And the Archpriest again signeth his head thrice with the
hand. And they bring the sticharion to the Archpriest, and he signeth
the sticharion with his hand over the cross. And he that hath been
appointed, having signed himself with his hand, kisseth the cross
upon the sticharion, and the hand of the Archpriest; and the
subdeacons vest him with the sticharion. And the Archpriest
addresseth him on this wise,
Child, the first degree of the priesthood is that of reader. Therefore
it becometh thee to read every day in the divine scriptures, that they
that hear, considering thee, may receive edification, and that thou, in
nowise shaming thine election, mayest prepare thyself for a more
advanced degree. For, living temperately, holily, and righteously, thou
shalt gain the mercy of the man-loving God, and make thyself worthy
of a higher ministry, in Christ Jesus our Lord, to whom be glory to
ages of ages. Amen.
Then the Archpriest saith on this wise,
Blessed be the Lord, lo, the servant of God, name, becometh
reader of the most holy church, name, in the name of the Father, and
of the Son, and of the Holy Ghost.
And the Archpriest giveth him a lamp, and he standeth before the
Archpriest with the lamp in the indicated place.
And if there be several readers to receive the laying
on of hands they receive this together,
and the prayer is said in the
plural.
THE OFFICE THAT IS USED AT THE LAYING ON
OF HANDS OF A SUBDEACON.
Now if on the same day he is to receive the laying on of hands for
the subdiaconate, after the investing with the sticharion, the
subdeacons bring a sticharion-girdle to the Archpriest. And the
Archpriest maketh the sign of the cross upon the girdle, and he that
is to receive the laying on of hands kisseth the girdle, and the hand
of the Archpriest, and they gird him. And the Archpriest signeth him
with the hand upon the head thrice. After this the protodeacon saith,
Let us pray to the Lord. And the Archpriest, having laid his hand
upon him, saith this prayer.
O Lord our God, who through one and the same holy Spirit,
distributest gifts to them whom thou hast chosen, bestowing various
orders in thy church, and appointing degrees of service therein for
the ministration of thy divine and spotless mysteries, who, in thine
unspeakable foreknowledge, dost also appoint this thy servant to be
worthy to serve in thy holy church; do thou thyself, O Master,
preserve him blameless in all things, and grant unto him to love the
beauty of thy house, to stand at the doors of thy holy temple, to
kindle the lamp of the tabernacle of thy glory; and plant him in thy
holy church as a fruitful olive-tree that beareth fruit of righteousness;
and, at the time of thine advent, declare thy servant perfected to
receive the reward of them that have been acceptable unto thee.
Exclamation.
For thine is the kingdom, and the power, and the glory, of the
Father, and of the Son, and of the Holy Ghost, now and ever, and to
ages of ages. Amen.
And after the prayer the subdeacons give a ewer to him that is
receiving the laying on of hands, and lay a towel upon his shoulder;
and the Archpriest washeth his hands. And he that is receiving the
laying on of hands for subdeacon poureth water on the hands of the
Archpriest. After this he that is receiving the laying on of hands, and
the other subdeacons, kiss the Archpriest’s hand, and betake
themselves from him to the indicated place. And he that is receiving
the laying on of hands for subdeacon standeth, holding the ewer,
and the wash-hand basin, together with the towel, until the cherubic
hymn. And he saith, Trisagion. O most holy Trinity.... Our Father....
Lord, have mercy. I believe in one God.... Forgive, remit.... and
whatever else he is minded to say secretly. And during the cherubic
hymn he is conducted before the royal doors to the Archpriest; and
the Archpriest washeth his hands according to rite, and saith the
prayer. Then he signeth the water with his hand crosswise thrice.
And the Archpriest with this sanctified water wetteth his eyes, ears,
nostrils, and lips. And at the great introit he walketh behind all the
ministers. And when the Archpriest taketh up the holy things, and all
the ministers proceed into the altar, he that is receiving the laying on
of hands for subdeacon boweth to the Archpriest, and beareth water
to the right and left choirs, and to the people, and they all splash
themselves with this water. And they conduct him back to the altar,
and they pour the water that remaineth into the piscina. And, being
conducted, he remaineth before the royal doors, and standeth in the
indicated place according to rite. And when the Archpriest hath said,
And may the mercies.... after this exclamation he is conducted into
the altar by the subdeacons according to rite, and, having received a
blessing from the Archpriest, he standeth with the subdeacons.
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.