{"id":48591061,"url":"https://github.com/srujayreddy/fetch-receipt-prediction","last_synced_at":"2026-04-08T19:31:53.202Z","repository":{"id":286064425,"uuid":"960117495","full_name":"SrujayReddy/Fetch-Receipt-Prediction","owner":"SrujayReddy","description":"A machine learning solution for predicting monthly receipt scans in 2022 based on 2021 daily data.","archived":false,"fork":false,"pushed_at":"2025-09-29T08:00:16.000Z","size":383,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T13:54:46.765Z","etag":null,"topics":["docker-container","machine-learning-algorithms","neural-networks","python","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SrujayReddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-03T22:18:04.000Z","updated_at":"2025-09-29T08:00:19.000Z","dependencies_parsed_at":"2025-09-30T00:02:34.726Z","dependency_job_id":null,"html_url":"https://github.com/SrujayReddy/Fetch-Receipt-Prediction","commit_stats":null,"previous_names":["srujayreddy/fetch-receipt-prediction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SrujayReddy/Fetch-Receipt-Prediction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrujayReddy%2FFetch-Receipt-Prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrujayReddy%2FFetch-Receipt-Prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrujayReddy%2FFetch-Receipt-Prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrujayReddy%2FFetch-Receipt-Prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SrujayReddy","download_url":"https://codeload.github.com/SrujayReddy/Fetch-Receipt-Prediction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrujayReddy%2FFetch-Receipt-Prediction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-container","machine-learning-algorithms","neural-networks","python","tensorflow"],"created_at":"2026-04-08T19:31:52.591Z","updated_at":"2026-04-08T19:31:53.188Z","avatar_url":"https://github.com/SrujayReddy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fetch Receipt Prediction System\n\n![Dashboard Screenshot](/app/static/dashboard-preview.png)\n*Prediction dashboard showing 30% post-holiday decline in January 2022*\n\nAn end-to-end machine learning solution for predicting monthly scanned receipts in 2022 using daily 2021 data, developed for Fetch Rewards' Machine Learning Engineer take-home exercise.\n\n## 🚀 Quick Start (Docker)\n\n```bash\n# 1. Clone repository\ngit clone https://github.com/SrujayReddy/Fetch-Receipt-Prediction.git\ncd Fetch-Receipt-Prediction\n\n# 2. Build and run container\ndocker build -t fetch-app . \u0026\u0026 docker run -p 5001:5001 fetch-app\n\n# 3. Access dashboard\nopen http://localhost:5001\n```\n\n## 📋 Project Overview\n\n### Key Features\n- **Custom Neural Network** built with TensorFlow\n- **Temporal Feature Engineering** (lag features, rolling averages)\n- **Interactive Web Dashboard** with comparative visualizations\n- **Docker Containerization** for reproducible execution\n- **Production-Grade Pipeline**:\n  - Automated data validation\n  - Model serialization/deserialization\n  - Comprehensive error handling\n\n### Technical Highlights\n- **Validation MAE**: 0.2607 (normalized units)\n- **Training Time**: \u003c2 minutes on CPU\n- **Prediction Accuracy**: ±5% of daily averages (observed during validation)\n- **Monthly Variance**: \u003c2% from expected business patterns\n- **Data Normalization**: Z-score scaling with µ=8,923,441, σ=287,654\n- **Training Coverage**: 364/365 days of 2021 data\n\n## 📂 Repository Structure\n\n```\n.\n├── data/                   # Input data\n│   └── daily_receipts.csv  # 2021 daily receipt counts\n├── model/                  # Machine learning components\n│   ├── model_utils.py      # Core ML logic\n│   ├── train.py            # Training pipeline\n│   ├── predict.py          # Prediction script\n│   └── *.npy               # Normalization parameters\n├── app/                    # Web application\n│   ├── app.py              # Flask server\n│   ├── static/             # CSS/JS assets\n│   └── templates/          # HTML templates\n├── Dockerfile              # Container configuration\n├── requirements.txt        # Python dependencies\n└── README.md               # This documentation\n```\n\n## 🧠 Machine Learning Implementation\n\n### Model Architecture\n```python\ntf.keras.Sequential([\n    tf.keras.layers.Dense(256, activation='relu', kernel_initializer='he_normal'),\n    tf.keras.layers.BatchNormalization(),\n    tf.keras.layers.Dropout(0.3),\n    tf.keras.layers.Dense(128, activation='relu', \n                        kernel_regularizer=tf.keras.regularizers.l1_l2(0.01)),\n    tf.keras.layers.Dense(64, activation='relu'),\n    tf.keras.layers.Dense(1)\n])\n```\n\n### Feature Engineering\n| Feature Type         | Description                          |\n|----------------------|--------------------------------------|\n| Temporal Features    | Day of week, month, day of month     |\n| Lag Features         | 1-day and 7-day previous values      |\n| Rolling Window       | 7-day moving average                 |\n\n## 🛠️ Installation \u0026 Usage\n\n### Docker Deployment (Recommended)\n```bash\ndocker build -t fetch-app .  # Build image\ndocker run -p 5001:5001 fetch-app  # Start container\n```\n\n### Local Execution\n```bash\n# Create virtual environment\npython -m venv venv \u0026\u0026 source venv/bin/activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Train model and generate predictions\ncd model \u0026\u0026 python train.py \u0026\u0026 python predict.py\n\n# Start web server\ncd ../app \u0026\u0026 python app.py\n```\n\n## 🔍 Verification\n\nAfter running the pipeline:\n```bash\n# Check generated predictions\nhead model/2022_predictions.csv\n\n# Expected output:\n2022-01-01,8949847.75\n2022-01-02,8954872.98\n...\n```\n\n## 📊 Web Interface\n\nAccess the dashboard at `http://localhost:5001` to view:\n- Interactive comparison of 2021 vs 2022 data\n- Monthly prediction tables\n- Detailed trend visualizations\n\n## 🚨 Troubleshooting\n\n| Issue                  | Solution                              |\n|------------------------|---------------------------------------|\n| Port 5001 occupied     | Use `-p 5002:5001` in docker run      |\n| Docker build failures  | Run `docker system prune -a`          |\n| Missing predictions    | Verify CSV file in `data/` directory  |\n| Model loading errors   | Check `model/*.npy` files exist       |\n\n## ❓ FAQ\n\n**Q: How do I modify the prediction period?**  \nA: Edit `start_date` and `end_date` in `model/predict.py`\n\n**Q: Where are the model parameters stored?**  \nA: `model/receipt_model.h5` (model weights) and `*.npy` (normalization)\n\n**Q: How is monthly aggregation calculated?**  \nA: Simple sum of daily predictions for each month\n\n**Q: Why do predictions decrease through January?**  \nA: Model detected post-holiday pattern from 2021 training data\n\n## 📄 Documentation\n\n| Component              | File Path                  |\n|------------------------|----------------------------|\n| Core Model Logic       | [model/model_utils.py](model/model_utils.py) |\n| Training Pipeline      | [model/train.py](model/train.py) |\n| Web Interface          | [app/app.py](app/app.py)   |\n\n---\n\n*Developed with ❤️ for Fetch Rewards Machine Learning Engineer Position*\n`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrujayreddy%2Ffetch-receipt-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrujayreddy%2Ffetch-receipt-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrujayreddy%2Ffetch-receipt-prediction/lists"}