File size: 1,703 Bytes
81678dd 1773560 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | ---
license: mit
language: en
pipeline_tag: tabular-regression
tags:
- regression
- sklearn
- demo
- active-users
---
# ๐ Active Users Prediction Model (Simple Regression)
## ๐ง Overview
This project demonstrates a simple regression-based approach to estimate and predict active users in a Hugging Face Space.
Since Hugging Face does not provide direct access to real-time active user metrics, this model uses request counts as a proxy signal and applies a regression model to estimate user activity trends.
---
## ๐ Features
- Tracks incoming requests as a proxy for user activity
- Logs usage data over time
- Trains a Linear Regression model on historical data
- Predicts current active users based on timestamp
---
## ๐๏ธ How It Works
1. Each user interaction increases a counter
2. Data is stored in a CSV file (`usage.csv`)
3. The model is trained on:
- Time (timestamp)
- Active user count
4. The model predicts active users for the current time
---
## ๐ Project Structure
---
## โ๏ธ Model Details
- **Model Type:** Linear Regression
- **Library:** scikit-learn
- **Input Feature:** Timestamp
- **Output:** Estimated Active Users
---
## ๐ Example Output
---
## โ ๏ธ Limitations
- This is an approximation, not real user tracking
- Counts requests, not unique users
- No session or IP-based filtering
- Model retrains on each request (not optimized)
---
## ๐ฎ Future Improvements
- Use a database instead of CSV
- Track unique users via sessions/IP
- Add time-based features (hour, day)
- Use advanced models (Random Forest, LSTM)
- Deploy with AWS for scalability
---
## ๐งโ๐ป Author
Udyan Trivedi
---
## ๐ License
MIT License |