This is a Django-based backend for an Active Learning system using CatBoost. The system:
- Queries the most informative instances for labeling.
- Allows users to label instances via the frontend.
- Trains a CatBoost model once enough labels are collected.
- Django REST API for querying & submitting labels
- Active Learning for iterative model improvement
- CatBoost Classifier for anomaly detection
- SQLite Database for storing labeled/unlabeled data
git clone https://github.com/yourusername/active-learning-backend.git
cd active-learning-backendpython -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`pip install -r requirements.txtpython manage.py migratepython manage.py shell
exec(open('labeling/load_data.py').read())python manage.py runserverAccess the API at: http://127.0.0.1:8000/
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/get_uncertain_instances/ |
Retrieve unlabeled instances |
POST |
/api/submit_labels/ |
Submit labels for instances |
POST |
/api/train_model/ |
Train the CatBoost model |
- The API requires at least 10 labeled instances before training.
- The trained CatBoost model is cached for future predictions.
Developed by Langat Vincent 🚀
This project is licensed under the MIT License.
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/yourusername/active-learning-backend.git
git push -u origin mainLet me know if you need any modifications! 🚀