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
The notebook downloads this Kaggle dataset with kagglehub:
karkavelrajaj/amazon-sales-dataset
- Load and clean the data (
discounted_price,discount_percentage,rating). - Convert category text to a numeric
category_id. - Apply log + min-max normalization on price.
- Build tensors and split into train/test (80/20).
- Train a neural network (2 hidden layers, ReLU, MSELoss, Adam).
- Check test loss and plot predicted vs actual.
- Enter new values and get a predicted fair price.
- Install packages:
pip install kagglehub pandas numpy matplotlib torch- Open
sales_predictor.ipynb. - Run cells from top to bottom.
- In the last cell, enter:
- rating (1 to 5)
- discount percentage (0 to 100)
- category id (shown range in notebook)
