๐ 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
- Each user interaction increases a counter
- Data is stored in a CSV file (
usage.csv) - The model is trained on:
- Time (timestamp)
- Active user count
- 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
- Downloads last month
- -