---
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
metrics:
- accuracy
widget:
- text: parking aeroport charles de gaulle carte
- text: achat académie dressage canin carte
- text: prlv sepa agence immobiliere commission vente
- text: facture carte toilettage beautydog nice carte
- text: facture carte du adobe creative cloud photo carte
pipeline_tag: text-classification
inference: true
model-index:
- name: SetFit
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.2727272727272727
name: Accuracy
---
# SetFit
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
2. Training a classification head with features from the fine-tuned Sentence Transformer.
## Model Details
### Model Description
- **Model Type:** SetFit
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
- **Maximum Sequence Length:** 128 tokens
- **Number of Classes:** 44 classes
### Model Sources
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
### Model Labels
| Label | Examples |
|:-------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|
| Shopping / electronics & multimedia |
- 'paiement darty merignac carte'
- 'payement apple store carte carte usa usd commission'
|
| Other / kids | - 'debit carte jeuxvideokidz com carte'
- 'achat carte magic cake anniversaire theo carte'
|
| Bank services / other | - 'paiement frais opposition cheque carte'
- 'paiement frais demande rib iban supplémentaires carte'
|
| Housing / rent | - 'prlv sepa studio centre ville lyon carte'
- 'prelevement loyer residence les cerisiers carte'
|
| Transportation / other | - 'service assistance dépannage routier carte'
- 'parking aeroport charles de gaulle carte'
|
| Bank services / transfers | - 'virement pour participation voyage scolaire sarah carte'
- 'virement sortant vers elodie dupont carte'
|
| Investment / retirement & savings | - 'virement pee plan épargne entreprise carte'
- 'cotisation assurance vie caisse d epargne carte'
|
| Other / taxes | - 'prelevement automatique taxe d amenagement'
- 'facture taxe sur les ordures menageres'
|
| Healthy & Beauty / other | - 'abonnement trimestre club danse rythmo'
- 'cotisation annuelle association bien être soi'
|
| Investment / securities | - 'investissement etf cac carte'
- 'transaction actions netflix carte usd'
|
| Housing / other | - 'prlv sepa du alarmes securitas direct'
- 'facture carte du leroy merlin montigny carte'
|
| Housing / house loan | - 'prlv credit immobilier ing direct echeance num'
- 'virement recu mensualite pret logis credit agricoche du'
|
| Housing / utilities & bills | - 'prlv sepa orange france telecom'
- 'prlv sepa eau de paris'
|
| Bank services / general fees | - 'frais operation non europeenne carte'
- 'frais renouvellement carte bancaire'
|
| Leisure & Entertainment / culture & events | - 'prlv sepa cinema cgr lille'
- 'achat carte billet expo universselle carte'
|
| Transportation / taxi & carpool | - 'facture carte du didi chengdu carte chn cny commission'
- 'facture carte du kakao taxi seoul carte kor krw commission'
|
| Shopping / other | - 'achat arts et decoration bleneau carte'
- 'facture carte du boutique des artistes lyon carte'
|
| Recurrent Payments / loans | - 'prlv recurrent banque postale pret perso carte'
- 'debit recurrent cic pret etudiant pretcicunive'
|
| Healthy & Beauty / doctor fees | - 'prlv sepa centre medical les lilas frzzz cde wefr'
- 'prlv sepa centre chirurgical val d or frzzz cdc foeer'
|
| Bank services / withdrawal | - 'retrait dab ecobanque lyon carte fr'
- 'retrait dab banqcentral montpellier carte fr'
|
| Other / other | - 'paiement cotisation club d escalade les rocs'
- 'paiement en ligne site de don leucan'
|
| Healthy & Beauty / pharmacy | - 'facture du pharmacie soleil levant carte'
- 'facture carte du pharmacie bellerose carte'
|
| Transportation / fuel | - 'debit station petronas nice carte'
- 'transac carte du oil berlin carte ger'
|
| Shopping / sporting goods | - 'facture carte patagonia grenoble carte'
- 'debit adidas running store nice carte'
|
| Food & Drinks / groceries | - 'debit chocolaterie dulce carte'
- 'prlv sepa epicerie du sud carte'
|
| Other / pets | - 'achat académie dressage canin carte'
- 'facture carte toilettage beautydog nice carte'
|
| Investment / real estate | - 'loyers reçus locataire paris eme carte'
- 'prlv sepa agence immobiliere commission vente'
|
| Shopping / clothing | - 'paiement carte du gucci opera paris carte'
- 'achat carte adidas originals store carte deu'
|
| Shopping / housing equipment | - 'paiement par carte brico depot nice carte'
- 'achat chez tool co toulouse carte'
|
| Transportation / maitenance | - 'facture carte du garage bonvolant poitiers carte'
- 'paiement carte du garage rénov clim reims carte'
|
| Recurrent Payments / other | - 'prlv sepa soutien scolaire en ligne mathplus'
- 'prlv sepa club sportif maxiforme'
|
| Recurrent Payments / insurance | - 'prlv sepa assurance emprunteur bnp paribas'
- 'prlv sepa assurance habitation axa'
|
| Healthy & Beauty / veterinary | - 'debit soin du veto express marseille carte'
- 'vaccins chat clinique du parc toulouse carte'
|
| Transportation / public transportation | - 'pass ferry corsica corsica linea carte'
- 'recharge navigo semaine ratp carte'
|
| Healthy & Beauty / beauty & self-care | - 'facture carte du institut beaute pure carte'
- 'facture carte du coiffeur coupe chic carte'
|
| Leisure & Entertainment / other | - 'abonnement mensuel canal carte'
- 'facture carte du spotify premium carte usa'
|
| Food & Drinks / eating out | - 'facture carte du chez laurette lyon carte'
- 'facture carte du le gourmet vegan carte'
|
| Housing / services & maintenance | - 'prlv sepa renovaction'
- 'facture carte du nettoyage professionnel sarl carte'
|
| Leisure & Entertainment / travel | - 'facture carte du air france carte'
- 'virement sortant vacation savings for maldives frzzz date'
|
| Leisure & Entertainment / sports & hobbies | - 'paiement en ligne du go sport paris carte'
- 'paiement en ligne du strava subscription carte usd'
|
| Investment / other | - 'achat actions ia revolution carte'
- 'participation crowdfunding waterclean projet'
|
| Transportation / car loan & leasing | - 'prelevement sepa creditauto favorisxcb carte'
- 'paiement mensualite volkswagen polo v loc vwpolo'
|
| Recurrent Payments / subscription | - 'abonnement vpnsecure net carte'
- 'facture carte du adobe creative cloud photo carte'
|
| Food & Drinks / other | - 'payment gourmet popcorn shop carte'
- 'achat du confiserie pierre carte'
|
## Evaluation
### Metrics
| Label | Accuracy |
|:--------|:---------|
| **all** | 0.2727 |
## Uses
### Direct Use for Inference
First install the SetFit library:
```bash
pip install setfit
```
Then you can load this model and run inference.
```python
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("HEN10/setfit-particular-transaction-solon-embeddings-labels-large-kaggle-automatisation-v1")
# Run inference
preds = model("achat académie dressage canin carte")
```
## Training Details
### Training Set Metrics
| Training set | Min | Median | Max |
|:-------------|:----|:-------|:----|
| Word count | 3 | 6.2045 | 10 |
| Label | Training Sample Count |
|:-------------------------------------------|:----------------------|
| Housing / rent | 2 |
| Housing / house loan | 2 |
| Housing / utilities & bills | 2 |
| Housing / services & maintenance | 2 |
| Housing / other | 2 |
| Food & Drinks / groceries | 2 |
| Food & Drinks / eating out | 2 |
| Food & Drinks / other | 2 |
| Leisure & Entertainment / sports & hobbies | 2 |
| Leisure & Entertainment / culture & events | 2 |
| Leisure & Entertainment / travel | 2 |
| Leisure & Entertainment / other | 2 |
| Transportation / car loan & leasing | 2 |
| Transportation / fuel | 2 |
| Transportation / public transportation | 2 |
| Transportation / taxi & carpool | 2 |
| Transportation / maitenance | 2 |
| Transportation / other | 2 |
| Recurrent Payments / loans | 2 |
| Recurrent Payments / insurance | 2 |
| Recurrent Payments / subscription | 2 |
| Recurrent Payments / other | 2 |
| Investment / securities | 2 |
| Investment / retirement & savings | 2 |
| Investment / real estate | 2 |
| Investment / other | 2 |
| Shopping / clothing | 2 |
| Shopping / electronics & multimedia | 2 |
| Shopping / sporting goods | 2 |
| Shopping / housing equipment | 2 |
| Shopping / other | 2 |
| Healthy & Beauty / doctor fees | 2 |
| Healthy & Beauty / pharmacy | 2 |
| Healthy & Beauty / beauty & self-care | 2 |
| Healthy & Beauty / veterinary | 2 |
| Healthy & Beauty / other | 2 |
| Bank services / transfers | 2 |
| Bank services / withdrawal | 2 |
| Bank services / general fees | 2 |
| Bank services / other | 2 |
| Other / taxes | 2 |
| Other / kids | 2 |
| Other / pets | 2 |
| Other / other | 2 |
### Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: True
- use_amp: False
- warmup_proportion: 0.1
- seed: 6
- eval_max_steps: -1
- load_best_model_at_end: False
### Training Results
| Epoch | Step | Training Loss | Validation Loss |
|:------:|:----:|:-------------:|:---------------:|
| 0.0021 | 1 | 0.1771 | - |
| 0.1057 | 50 | 0.1325 | - |
| 0.2114 | 100 | 0.1132 | - |
| 0.3171 | 150 | 0.0424 | - |
| 0.4228 | 200 | 0.0329 | - |
| 0.5285 | 250 | 0.0581 | - |
| 0.6342 | 300 | 0.0155 | - |
| 0.7400 | 350 | 0.0157 | - |
| 0.8457 | 400 | 0.0138 | - |
| 0.9514 | 450 | 0.0237 | - |
### Framework Versions
- Python: 3.10.13
- SetFit: 1.0.3
- Sentence Transformers: 2.6.1
- Transformers: 4.39.3
- PyTorch: 2.1.2
- Datasets: 2.17.0
- Tokenizers: 0.15.2
## Citation
### BibTeX
```bibtex
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
```