Predicting Prices Based on Descriptions
notebook https://www.kaggle.com/jayspeidell/predictions-as-features?scriptVersionId=2500768
This project was completed for Kaggle’s Mercari Price Suggestion Challenge. Mercari allows users to list items for sale, but it can be difficult to guess a realistic price in the situation. The objective of this challenge was to build a model that can suggest realistic prices for listed items based on their descriptions.
This competition also feature a new challenge for Kaggle, a time and hardware restriction. Notebooks generating submissions had to be run on Kaggle servers in under an hour with limited resources, including no GPU.
Tools Used
- Python
- Jupyter Notebooks
- Unit Testing with PyTest
- Git & GitHub
My Contributions
I made the following contributions to the project:
Improved The Plotter Module
Bug fix: Added ‘z-axis’ to formatters/Designer attribute ‘labels’ to prevent index out of range error when plotting in 3D. Also added a third dimension to ‘limits’ for the same reason.
New feature: I added a colormaps property to the Designer class in formatters.py to allow the user to choose whichever one they want. It uses the same style as other properties of the class, and the module imports matplotlib.cm to validate both types of colormaps in matplotlib. I edited plotters/plot_countour to initialize a Designer object with a default colormap if none is provided. I’ve tested with every category of colormap as well as custom colormaps and verified that it is working as intended.
Default parameter change: Mesher.delta from 0.001 to 0.1. This makes it safe to run many of the functions on an average computer. With 0.001, the mesher object grows very quickly.
Added Objective Functions
View Objective Function Commit on GitHub.
I cleaned up and fixed existing functions with TODO tags and implemented Cross-in-Tray, Easom, Eggholder, Himmelblau’s, Holder Table, and Three Hump Camel functions. The file was getting long so I also alphabetized the functions and made a simple table of contents. I also added unit tests for the new objective functions.