Instructions to use Map-Action/plaintes-fr-classifieur-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Map-Action/plaintes-fr-classifieur-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Map-Action/plaintes-fr-classifieur-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Map-Action/plaintes-fr-classifieur-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
French environmental complaint classifier (Map Action, v2)
Classifies a short French complaint ("Le caniveau est bouch茅 devant l'茅cole") into the incident taxonomy used by the
Map Action platform: 8 families and 32 incident types. Fine-tuned from
intfloat/multilingual-e5-base (MIT).
Two models are in this repository: modele-famille/ (8 classes) and modele-type/ (32 classes).
Prefix the input with query: .
Results
512 held-out texts. The test set only contains complaint formulations that never appear in training.
| Version | Families: macro F1 | Families: accuracy | Types: macro F1 | Types: accuracy |
|---|---|---|---|---|
| TF-IDF + logistic regression | 51.8 % | 54.3 % | 35.1 % | 36.9 % |
| Frozen E5 embeddings + logistic regression | 62.6 % | 65.4 % | 53.9 % | 56.3 % |
| Fine-tuned E5, dataset v1 (2,048 training texts) | 67.8 % | 69.0 % | 52.7 % | 55.3 % |
| Fine-tuned E5, dataset v2 (3,328 training texts) | 77.2 % | 77.7 % | 65.7 % | 68.4 % |
Training
8 epochs, batch 32, learning rate 4e-5, linear warm-up and decay. Data: Map-Action/plaintes-environnement-fr.
Limitations, please read
- The data is synthetic. Complaints were written for each incident type and expanded with openings, places and consequences.
- Some families overlap by design ("bad smells" appears under air quality and under nuisances), which caps the score.
- In the full pipeline the input is a machine translation from Bambara, which adds its own errors.
Taxonomy
Eau & Assainissement 路 D茅chets & Insalubrit茅 路 Qualit茅 de l'Air 路 Risques Naturels & Climatiques 路
D茅gradation des Terres 路 Activit茅s mini猫res & extractives 路 Biodiversit茅 & 脡cosyst猫mes 路 Nuisances & Cadre de vie.
The 32 types are listed in taxonomie.json.
Model tree for Map-Action/plaintes-fr-classifieur-v2
Base model
intfloat/multilingual-e5-base