Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Amazon ML Challenge 2025 - Smart Product Pricing

Project Overview

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.

The Problem

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.

Repository Structure

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 predictions
  • solution_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.

Approach

Data Processing

  • 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

Feature Engineering

  • 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

Modeling

  • 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

Results

  • Validation SMAPE: 63.92%
  • Validation MAE: $13.87
  • Predictions ranged from $4.82 to $9,402.11, with most in the $10-$50 range

How to Run

  1. Install required packages:

    pip install pandas numpy scikit-learn torch torchvision requests pillow
  2. Place the dataset files in the dataset/ folder

  3. Open priceOptimization.ipynb and run the cells in order

  4. The main function main_solution() will:

    • Load and clean the data
    • Extract features
    • Train the ensemble model
    • Generate predictions in test_out.csv

Key Learnings

  • 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

Author

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages