Skip to content

pydevkrishna/Amazon-Sales-Predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Amazon Sales Predictor

This is a small learning project where I train a PyTorch model to estimate a fair Amazon product price in rupees.

The model uses:

  • rating
  • discount percentage
  • category id

Then it predicts a price. ChatGPT Image Feb 25, 2026, 05_56_09 AM

Data

The notebook downloads this Kaggle dataset with kagglehub: karkavelrajaj/amazon-sales-dataset

Notebook Content

  1. Load and clean the data (discounted_price, discount_percentage, rating).
  2. Convert category text to a numeric category_id.
  3. Apply log + min-max normalization on price.
  4. Build tensors and split into train/test (80/20).
  5. Train a neural network (2 hidden layers, ReLU, MSELoss, Adam).
  6. Check test loss and plot predicted vs actual.
  7. Enter new values and get a predicted fair price.

How to run

  1. Install packages:
pip install kagglehub pandas numpy matplotlib torch
  1. Open sales_predictor.ipynb.
  2. Run cells from top to bottom.
  3. In the last cell, enter:
  • rating (1 to 5)
  • discount percentage (0 to 100)
  • category id (shown range in notebook)

About

This is a small learning project where I train a PyTorch model to estimate a fair Amazon product price in rupees.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors