Skip to content

dglassbrenner1/Kaggle-predicting-optimal-fertilizers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kaggle-predicting-optimal-fertilizers

This repository has my solutions to the Kaggle competition https://www.kaggle.com/competitions/playground-series-s5e6/overview

Predicting Optimal Fertilizers – Kaggle Solutions

This repository contains my work for the Kaggle competition "Predicting Optimal Fertilizers" (https://www.kaggle.com/competitions/playground-series-s5e6/overview)). It includes exploratory data analysis, feature engineering, model development, and final submissions.

🧠 Overview

The goal of this competition is to recommend three fertilizers for a given crop, soil conditions, and environmental conditions.

📁 Repository Structure

notebooks folder: contains Jupyter notebooks for EDA, modeling, and submissions scripts submissions folder: contains the csv files of predictions submitted to Kaggle

🚀 Highlights

  • Stratified validation with repeated holdouts and bootstrap resampling
  • XGBoost classifier tuned via randomized search
  • MAP@3 optimization with ensemble averaging
  • Memory-efficient feature engineering and dtype reduction

📌 Notes

  • Raw data is not included due to Kaggle’s terms of use.
  • To reproduce results, download the dataset from the competition page and place it in a data/ folder.

🏁 Final Score

My best public leaderboard score: 0.32931

🐳 Running the Notebooks with Docker

All notebooks in this repository were developed and executed inside the official Kaggle GPU Docker container:

  • Image: gcr.io/kaggle-gpu-images/python
  • Includes: Python 3.x, Jupyter, pandas, scikit-learn, XGBoost, LightGBM, and other common ML libraries

🔧 Steps to Run Locally

  1. Pull the Docker image (if you haven't already):

    docker pull gcr.io/kaggle-gpu-images/python
  2. Run the container with your project mounted:

    docker run -it --rm \
      -p 8888:8888 \
      -v /path/to/your/repo:/workspace \
      gcr.io/kaggle-gpu-images/python

    Replace /path/to/your/repo with the full path to your cloned GitHub repository.

  3. Launch Jupyter inside the container:

    jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token=''
  4. Open your browser and go to http://localhost:8888 to access the notebooks.


This setup ensures full compatibility with Kaggle’s environment, including GPU support and preinstalled libraries.


Feel free to explore the notebooks and reach out if you have questions!

About

This repository has my solution to the Kaggle competition https://www.kaggle.com/competitions/playground-series-s5e6/overview

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors