How I won my 49th bronze medal on a Kaggle competition using a classifier chain

Tracyrenee
2 min readMar 10, 2024

I like to work on Kaggle competitions to help me to improve my skill in this technology. The last Kaggle competition that I entered was a problem where I had to predict the probability that steel would become defective, and I used sklearn’s MultiOutputClassifier to make the predictions. The blog post for this competition question can be found here:- https://medium.com/@tracyrenee61/how-i-won-my-48th-bronze-medal-by-using-keras-bilstm-model-on-kaggles-disaster-tweets-c5f341953968

I wanted to see if a classifier chain would improve the accuracy of my predictions, so I created a second program and replaced sklearn’s MultiOutputClassifier with a ClassifierChain.

Classifier chains is a machine learning method for problem transformation in multi-label classification. It combines the computational efficiency of the binary relevance method while still being able to take the label dependencies into account for classification.

The only difference between my first program and the second is the model used sklearn’s ClassifierChain. The code in Python can be seen below.

Imagine my surprise when I woke up this morning to find that I had received a bronze medal on the second program that I had written!

Although the score of my model was not at the top of the leaderboard, I suspect I received a bronze medal because I endeavoured to use different methodologies to solve the problem.

--

--

Tracyrenee

I have five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.