Skip to content

mikelballay/PredictPC-Price-Intelligence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 PredictPC: Intelligent Hardware Price Forecasting

Python Streamlit Machine Learning License

PredictPC is an end-to-end machine learning solution designed to solve the problem of price volatility in the PC component market. It ingests real-time data, processes historical trends, and deploys advanced forecasting models to recommend the optimal buying window for GPUs and CPUs.


🧐 The Challenge

Building a PC is an investment. Prices for components like the RTX 4060 or Ryzen 7 can fluctuate wildly due to supply chain issues, crypto-mining demand, or seasonal sales. Enthusiasts often overpay by buying at the local peak.

The Solution? An intelligent agent that monitors the market 24/7 and answers the question: "Should I buy now or wait?"

🏗️ Technical Architecture

The system is built on a modular ETL and inference pipeline:

graph LR
    A[Keepa API] -->|Raw JSON| B(Data Ingestion Layer)
    B -->|Cleaning & Validation| C[(SQLite Database)]
    C -->|Historical Data| D{ML Engine}
    D -->|Seasonality| E[Prophet Model]
    D -->|Residuals/Trend| F[Gradient Boosting]
    E & F -->|Ensemble Forecast| G[Streamlit Dashboard]
Loading

Key Components

  1. Data Ingestion (src/data):

    • Connects to the Keepa API to retrieve high-resolution price history (Amazon).
    • Handles rate limiting and data normalization (filling gaps, adjusting for used/new pricing).
    • Persists data in a local SQLAlchemy (SQLite) database to minimize API costs and latency.
  2. Machine Learning Core (src/models):

    • Facebook Prophet: Used as the baseline model to capture daily/weekly seasonality and overall market trend.
    • Gradient Boosting (GBM): Implemented (LightGBM/XGBoost) to capture non-linear patterns and short-term volatility that regression models miss.
    • Forecast Horizon: Optimized for a 7-day lookahead, balancing accuracy with utility.
  3. Visualization Layer (src/dashboard):

    • A reactive Streamlit application.
    • Uses Plotly for interactive, zoomable time-series charts.
    • Dynamic filtering by component category (GPU/CPU).

📂 Project Structure

predictpc/
├── data/                  # Local database and raw storage
├── src/
│   ├── analysis/          # EDA notebooks and feature engineering
│   ├── dashboard/         # Streamlit UI entry point
│   ├── data/              # Keepa client & database models
│   ├── models/            # Prophet & GBM model wrappers
│   └── config.py          # Central configuration (products, API keys)
├── .env                   # Environment secrets (GitIgnored)
└── requirements.txt       # Python dependencies

📦 Features

  • Real-time Intelligence: Updates prices on-demand.
  • Dual-Model Forecasting: Combines statistical and ML approaches for robust predictions.
  • Smart Catalog: Pre-configured tracking for top-tier hardware (RTX 30/40 series, Ryzen 5/7/9, Intel Core i5/i7).
  • Privacy First: Local data storage with zero external tracking.

🛠️ Installation & Setup

  1. Clone the repository

    git clone https://github.com/mikelballay/PredictPC-Price-Intelligence.git
    cd PredictPC-Price-Intelligence
  2. Environment Setup

    python -m venv .venv
    # Windows
    .\.venv\Scripts\Activate.ps1
    # Linux/Mac
    source .venv/bin/activate
    pip install -r requirements.txt
  3. Configuration Create a .env file in the root directory:

    KEEPA_API_KEY=your_keepa_api_key_here
  4. Data Ingestion (Optional) Note: The project comes with a sample database (data/predictpc.db). You can skip this step to run a demo immediately.

    To fetch fresh data (requires API Key):

    python -m src.data.fetch_prices
  5. Launch

    streamlit run src/dashboard/app.py

🚀 Roadmap / Future Improvements

  • Sentiment Analysis: Scrape Reddit/Twitter to gauge demand sentiment affecting prices.
  • Multi-Retailer Support: Expand beyond Amazon (Newegg, PCComponentes).
  • Alert System: Email/Discord notifications when price drops below predicted threshold.
  • Dockerization: Containerize the app for easier deployment.

Created by [Mikel Ballay] - Machine Learning Engineer Connect with me on LinkedIn | check out my Portfolio

About

ML-powered Price Intelligence Tool for PC Hardware. Tracks historical market data via Keepa API and forecasts price trends using Facebook Prophet & GBM. Features an interactive Streamlit dashboard to help users identify the optimal buying window for GPUs and CPUs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages