I participated in the Amazon ML Challenge to build a system that predicts product prices from e-commerce listings. The challenge was to extract meaningful pricing signals from product descriptions and create a model that could estimate reasonable prices for new items.
E-commerce platforms need to set appropriate prices for millions of products. Given a product's text description (like "Pack of 6 organic green tea bags, 2oz each"), the goal was to predict its market price. This required understanding how textual attributes like quantity, brand, and product characteristics correlate with pricing.
AmazonMLChallenge25 :
── priceOptimization.ipynb # Complete solution notebook
── solution_documentation.md # Technical documentation
Key Files:
priceOptimization.ipynb: The main notebook with everything from data cleaning to final predictionssolution_documentation.md: Detailed technical documentation for those who want to dive deeper
Dataset:
- The dataset used in this project is not included in this repository.
- It was provided as part of the Amazon ML Challenge and cannot be shared publicly.
- Cleaned messy text data by removing special characters and standardizing format
- Extracted numerical attributes from descriptions (pack sizes, weights, dimensions)
- Handled invalid price entries and ensured data quality
- Used TF-IDF vectorization to convert text descriptions into numerical features (1,000 dimensions)
- Applied regex patterns to pull out specific numerical values like "pack of 6" or "2oz"
- Combined text and numerical features into a 1,011-dimensional feature vector
- Built an ensemble of three models:
- Random Forest (40% weight)
- Gradient Boosting (40% weight)
- Ridge Regression (20% weight)
- Trained on 75,000 products with prices ranging from $0.13 to $2,796
- Validation SMAPE: 63.92%
- Validation MAE: $13.87
- Predictions ranged from $4.82 to $9,402.11, with most in the $10-$50 range
-
Install required packages:
pip install pandas numpy scikit-learn torch torchvision requests pillow
-
Place the dataset files in the
dataset/folder -
Open
priceOptimization.ipynband run the cells in order -
The main function
main_solution()will:- Load and clean the data
- Extract features
- Train the ensemble model
- Generate predictions in
test_out.csv
- Text preprocessing matters: Clean, consistent text significantly improved model performance
- Numerical extraction was crucial: Quantities and measurements were strong pricing indicators
- Ensemble methods provided stability: Combining models reduced variance in predictions
- Feature engineering beats complex models: Simple features with ensemble learning worked well
Built by Madhuri Perumalla for the Amazon ML Challenge 2025. This was a great opportunity to work with real-world e-commerce data and practice end-to-end machine learning pipeline development.