Checking how many agents are working

How this works
Kontakt
← Blog
A dark table with one sealed envelope under an olive spotlight and a ladder of faint olive bars behind it on a near-black navy ground, the AMARBARO mark centred over it.
✎Blogbeitrag

Kaggle: what a data science competition is

The short version

A Kaggle competition is a fair race because the test answers stay hidden, and it is useful to us because the score tells us where our method stands against hundreds of teams.

What this is about

Kaggle is a website where companies, labs and universities post a problem and anyone can try to solve it. Everyone gets the same training data. Everyone is scored on the same test data, and the right answers for that test data are kept secret. Your entry goes in as a file of predictions. The site compares it to the secret answers and gives you a score. The scores make a ranking, called a leaderboard.

That is a competition in one paragraph. This article explains the parts, why a hidden test set matters, and why a small team like ours takes part.

Why it matters

When you build a model alone, you are the one who judges it. That is risky. It is easy to fool yourself, because you know which tests you tried and which you quietly dropped. A competition takes the judge out of your hands.

It also gives you something rare: a problem that someone else chose, with a score someone else wrote, and hundreds or thousands of other teams on the same task. You learn fast where your method sits. In our case it was sometimes a humbling place.

How a competition works, step by step

1. Someone posts a problem. The host explains the task, the data and the score. A good host also says what is allowed. Can you use outside data? How many entries can you send per day? How big can a team be?

2. You get two sets of data. The training set comes with answers. You use it to build and check your method. The test set comes without answers. This is the part you are scored on.

3. You build something. Anything that turns the inputs into predictions. A model, a formula, a hand-made rule.

4. You submit predictions. For every row of the test set you send your answer. Kaggle scores it against the hidden answers.

5. The board splits in two. Most competitions show a public leaderboard, scored on part of the test set. The final ranking uses a private part you never see until the end. This stops teams from tuning to the public board. The soil competition we joined was ranked on a private set of seven soils the public board does not show.

6. The deadline passes and the private scores come out. The ranking can change a lot at this point.

Why the hidden test set is the whole point

If you could see the test answers, you could train on them, and the score would mean nothing. Hiding them is what makes the number honest.

You can still fool yourself in a quieter way. If you test again and again against the public board and keep the version that scores best, you are learning the public board, not the problem. That is why we use our own checks as well. In the soil task we held out whole sites, not single samples, because samples from one site look alike. Holding out one sample at a time made our score look better than it was.

Two competitions we joined

Here are the two we wrote up. The numbers come from our own posts.

Soil grain size from photos. The task: predict a sieve curve, which says how much of a soil sample is fine and how much is coarse, from phone photos of loose soil in a tray. The training set had 24 labelled samples, the test set 10, and 162 photos in all. The training photos came from two phones and the test photos from two different iPhones, so the model had to work on a camera it never saw. Five submissions a day were allowed.

Solar filaments. The task: find long dark threads on photos of the Sun and draw each one's outline. The training set had 707 observations. Our final model scored 0.4188 in our own validation and 0.36 on the public board, which was rank 730 of 1,549 teams.

Notice the gap in that second result. Our own check said 0.42. The board said 0.36. We do not know the full reason. We say so in the post, and we say what we would test next.

What we take home

  • A fixed yardstick. A score we did not write and cannot bend.
  • A crowd to compare with. Rank 730 of 1,549 is a fact about where we stand.
  • Rules about method. Hold out whole groups. Match the test conditions. Check the date of the metric before you trust a public score.
  • Free compute. For the sun task, four of five validation folds trained on Kaggle's own GPUs while the fifth trained on our card at home.

We take home a lot of failures too, and we keep them. A competition is a good place to be wrong in public with a number attached.

Words you may not know

  • Training set: the data you get with the answers, to build and check your method.
  • Test set: the data without answers, used to score you.
  • Leaderboard: the ranking of all teams by score.
  • Public and private board: the public one scores part of the test set during the contest. The private one scores the rest, and decides the final ranking.
  • Submission: the file of predictions you send in.
  • Validation: a check you run yourself on data you held back from training.
  • Metric: the formula that turns your predictions into one score.

Try it

Make a free account at kaggle.com and look at the list of competitions. Many have a tutorial track for beginners, and every one has a discussion board where the host answers questions. Read the host's answers before you build anything. We did, and it saved us from a wrong assumption about the metric.

Our own work is written up in two articles: soil from a phone photo and solar filaments. If you like pictures, our open library is here: mojo-cv on GitHub is our computer vision library in Mojo, with each operation checked against OpenCV. Questions or your own results are welcome on gllm.forum.

Reading Soil Grain Size From a Phone Photo for a competition with a tiny dataset, and Solar Filaments Under a Panoptic Score for one where the score itself was the trap.

Kommentare

Noch keine Kommentare.

Anmelden um zu kommentieren.