Varun1010's picture
Add SetFit model
83b1888 verified
---
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
metrics:
- accuracy
widget:
- text: Tiong Bahru Plaza, DDC-L2-5, AHU-L2-03 trip alarm
- text: 'Tiong Bahru Plaza, DDC L4-1, PAU-L4-03 supply air temperature (Units: °C).2'
- text: Tiong Bahru Plaza, DDC-L20, AHU 20-1 VSD CONTROL
- text: 'Tiong Bahru Plaza, VAV 19-7, Discharge Air Flow (Units: m3/h)'
- text: Tiong Bahru Plaza, DDC-L2-5, PAU-L2-02 VSD control
pipeline_tag: text-classification
inference: true
base_model: sentence-transformers/paraphrase-MiniLM-L3-v2
model-index:
- name: SetFit with sentence-transformers/paraphrase-MiniLM-L3-v2
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.9863861386138614
name: Accuracy
---
# SetFit with sentence-transformers/paraphrase-MiniLM-L3-v2
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-MiniLM-L3-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L3-v2) as the Sentence Transformer embedding model. 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
- **Sentence Transformer body:** [sentence-transformers/paraphrase-MiniLM-L3-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L3-v2)
- **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
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### 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 |
|:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 28 | <ul><li>'Tiong Bahru Plaza, UC800_102002_Chiller_2, Chilled Water Flow'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 1 CHW Flowrate'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHW Flowrate'</li></ul> |
| 33 | <ul><li>'Tiong Bahru Plaza, UC800_102005, Cond Water Flow'</li><li>'Tiong Bahru Plaza, UC800_102005, Condenser Water Flow'</li><li>'Tiong Bahru Plaza, UC800_102004, Condenser Water Flow'</li></ul> |
| 2 | <ul><li>'Tiong Bahru Plaza, DDC-L6, AHU 4-1 FAD Feedback'</li><li>'Tiong Bahru Plaza, DDC-L2-2, AHU-L2-05 FAD feedback'</li><li>'Tiong Bahru Plaza, DDC L14-1, AHU 13-1 FAD Feedback'</li></ul> |
| 42 | <ul><li>'Tiong Bahru Plaza, UC800_102004, Cond Leaving Water Temp (Units: °C)'</li><li>'Tiong Bahru Plaza, UC800_102004, Cond Leaving Water Temp (Units: °C)'</li><li>'Tiong Bahru Plaza, UC800_102005, Cond Entering Water Temp (Units: °C)'</li></ul> |
| 31 | <ul><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CWR Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Head CWR Temp'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CWR Temp'</li></ul> |
| 9 | <ul><li>'Tiong Bahru Plaza, DDC L4-1, PAU-L4-02 supply air temperature (Units: °C).2'</li><li>'Tiong Bahru Plaza, DDC-L1-4, PAU-L1-05 supply air temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, DDC-L1-4, PAU-L1-03 supply air temperature (Units: °C)'</li></ul> |
| 1 | <ul><li>'Tiong Bahru Plaza, DDC L4-1, PAU-L4-02 static pressure (Units: Pa)'</li><li>'Tiong Bahru Plaza, DDC-L2-5, PAU-L2-02 static pressure (Units: Pa)'</li><li>'Tiong Bahru Plaza, DDC-L1-4, PAU-L1-05 Static pressure (Units: Pa)'</li></ul> |
| 25 | <ul><li>'Tiong Bahru Plaza, DDC-L1-3, AHU-L2-02 VSD control'</li><li>'Tiong Bahru Plaza, DDC-L2-5, PAU-L2-04 VSD control'</li><li>'Tiong Bahru Plaza, DDC-L3-2, AHU-6-2A VSD control'</li></ul> |
| 12 | <ul><li>'Tiong Bahru Plaza, DDC-9-1, AHU 8-1 On/Off Status'</li><li>'Tiong Bahru Plaza, DDC-9-1, AHU 7-1 On/Off Status'</li><li>'Tiong Bahru Plaza, DDC-L1-5, PAU-L1-06 on/off status'</li></ul> |
| 8 | <ul><li>'Tiong Bahru Plaza, DDC-L1-3, AHU-L1-02 returm air temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, DDC-L1-1, AHU-L1-01 returm air temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, DDC L2-4, AHU L2-04 returm air temperature (Units: °C)'</li></ul> |
| 24 | <ul><li>'Tiong Bahru Plaza, DDC-L20, PAHU TR-1 TEMPERATURE (Units: °C)'</li></ul> |
| 13 | <ul><li>'Tiong Bahru Plaza, DDC-L17, AHU 17-1 Smoke Alarm'</li><li>'Tiong Bahru Plaza, DDC-9-1, AHU 9-1 Smoke Alarm'</li><li>'Tiong Bahru Plaza, DDC-B1-6, AHU-B1-1 Smoke Alarm'</li></ul> |
| 30 | <ul><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Head CWS Temp'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CWS Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CWS Temp'</li></ul> |
| 5 | <ul><li>'Tiong Bahru Plaza, DDC-L20, AHU 19-1 OCT (Units: °C)'</li><li>'Tiong Bahru Plaza, DDC-L17, AHU 16-1 OCT (Units: °C)'</li><li>'Tiong Bahru Plaza, DDC L14-1, AHU 13-1 OCT (Units: °C)'</li></ul> |
| 43 | <ul><li>'Tiong Bahru Plaza, VAV 19-11, Air Valve Position (Units: %)'</li><li>'Tiong Bahru Plaza, VAV 19-13, Air Valve Position (Units: %)'</li><li>'Tiong Bahru Plaza, VAV 19-16, Air Valve Position (Units: %)'</li></ul> |
| 14 | <ul><li>'Tiong Bahru Plaza, DDC-L1-5, AHU-L3-04A trip alarm'</li><li>'Tiong Bahru Plaza, DDC-9-1, AHU 9-1 Trip Alarm'</li><li>'Tiong Bahru Plaza, DDC-L17, AHU 16-1 Trip Alarm'</li></ul> |
| 36 | <ul><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 3 CHWR Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CWR Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 3 CWR Temperature'</li></ul> |
| 34 | <ul><li>'Tiong Bahru Plaza, UC800_3, Operating Mode'</li><li>'Tiong Bahru Plaza, UC800_101001_Chiller_1, Operating Mode'</li><li>'CT 3-1 Switch Mode'</li></ul> |
| 18 | <ul><li>'Tiong Bahru Plaza, DDC-L2-5, PAU-L2-04 switch mode'</li><li>'Tiong Bahru Plaza, DDC-L3-3, AHU-L3-1 switch mode'</li><li>'Tiong Bahru Plaza, DDC L2-4, AHU L2-04 switch mode'</li></ul> |
| 6 | <ul><li>'Tiong Bahru Plaza, DDC-L17, AHU 16-1 Valve Control (Units: %)'</li><li>'Tiong Bahru Plaza, DDC-L20, AHU 20-1 VALVE CONTROL (Units: %)'</li><li>'Tiong Bahru Plaza, DDC L12, AHU 10-1 VALVE CONTROL (Units: %)'</li></ul> |
| 17 | <ul><li>'Tiong Bahru Plaza, VAV 19-12, Discharge Air Temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, VAV 19-15, Discharge Air Temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, VAV 19-7, Discharge Air Temperature (Units: °C)'</li></ul> |
| 0 | <ul><li>'Tiong Bahru Plaza, DDC L14-1, AHU 13-1 CO2 Reading (Units: ppm).1'</li><li>'Tiong Bahru Plaza, DDC-L1-5, AHU-L3-04A CO2 sensor reading (Units: ppm)'</li><li>'Tiong Bahru Plaza, DDC-L20, Co2 Level 18'</li></ul> |
| 29 | <ul><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHWR Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHWR Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHWR Temp'</li></ul> |
| 15 | <ul><li>'Tiong Bahru Plaza, VAV 19-6, Space Temperature (Units: °C).1'</li><li>'Tiong Bahru Plaza, VAV-19-3, Space Temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, VAV 19-17A, Space Temperature (Units: °C)'</li></ul> |
| 11 | <ul><li>'DDC-CH-3:CH 3 Start/Stop Control'</li><li>'Tiong Bahru Plaza, DDC-L1-4, PAU-L1-05 Start/Stop Control'</li><li>'Tiong Bahru Plaza, DDC L14-1, AHU12-1 Start/Stop'</li></ul> |
| 32 | <ul><li>'Tiong Bahru Plaza, UC800_101001_Chiller_1, Chilled Water Flow'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 4 CHW Flowrate'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 3 CHW Flowrate'</li></ul> |
| 27 | <ul><li>'Tiong Bahru Plaza, LSB-U4-1, Active Power kW'</li><li>'Tiong Bahru Plaza, MB-1-S2, Active Power kW'</li><li>'Tiong Bahru Plaza, MB-1-S3, Active Power kW'</li></ul> |
| 41 | <ul><li>' Chiller SC:Header Differential Pressure'</li></ul> |
| 40 | <ul><li>'Wet Bulb Temperature'</li></ul> |
| 3 | <ul><li>'Tiong Bahru Plaza, DDC-L6, AHU 4-1 FAD Control'</li><li>'Tiong Bahru Plaza, DDC-L20, L20 Fresh air damper control (Units: %)'</li><li>'Tiong Bahru Plaza, DDC-L2-2, AHU-L2-05 FAD control (Units: %)'</li></ul> |
| 22 | <ul><li>'Tiong Bahru Plaza, VAV 19-2, Active Setpoint (Units: °C)'</li><li>'Tiong Bahru Plaza, VAV 18-17, Active Setpoint (Units: °C)'</li><li>'Tiong Bahru Plaza, VAV 19-16, Active Setpoint (Units: °C)'</li></ul> |
| 21 | <ul><li>'Tiong Bahru Plaza, VAV 19-19, Air Flow Setpoint Active (Units: m3/h)'</li><li>'Tiong Bahru Plaza, VAV 19-22, Air Flow Setpoint Active (Units: m3/h)'</li><li>'Tiong Bahru Plaza, VAV 19-9, Air Flow Setpoint Active (Units: m3/h)'</li></ul> |
| 26 | <ul><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHWS Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHWS Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CHWS Temp'</li></ul> |
| 23 | <ul><li>'Tiong Bahru Plaza, DDC B1-3, Pau-B1-02-DP Sensor'</li></ul> |
| 16 | <ul><li>'Tiong Bahru Plaza, VAV 19-9, Discharge Air Flow (Units: m3/h)'</li><li>'Tiong Bahru Plaza, VAV 19-18, Discharge Air Flow (Units: m3/h)'</li><li>'Tiong Bahru Plaza, VAV 19-15, Discharge Air Flow (Units: m3/h)'</li></ul> |
| 39 | <ul><li>'Tiong Bahru Plaza, UC800_3, Evaporator Refrigerant Pressure - Circuit 1 (Units: Pa)'</li><li>'Tiong Bahru Plaza, UC800_102002_Chiller_2, Evaporator Refrigerant Pressure - Circuit 1 (Units: Pa)'</li><li>'Tiong Bahru Plaza, UC800_101001_Chiller_1, Evaporator Refrigerant Pressure - Circuit 1 (Units: Pa)'</li></ul> |
| 7 | <ul><li>'Tiong Bahru Plaza, DDC L4-1, PAU-L4-02 modulating valve feedback (Units: %).3'</li><li>'Tiong Bahru Plaza, DDC-L2-2, AHU-L2-05 modulating valve feedback'</li><li>'Tiong Bahru Plaza, DDC B1-4, PAU-B1-1 modulating valve feedback'</li></ul> |
| 37 | <ul><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 4 CWS Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Header CWS Temperature'</li><li>'Tiong Bahru Plaza, SC-10, Chiller SC, Chiller 3 CWS Temperature'</li></ul> |
| 20 | <ul><li>'Tiong Bahru Plaza, DDC_L4-3, Outdoor temperature (Units: °C)'</li><li>'Tiong Bahru Plaza, DDC_L4-3, Outdoor temperature (Units: °C).2'</li><li>'Tiong Bahru Plaza, DDC_L4-3, Outdoor temperature (Units: °C).1'</li></ul> |
| 35 | <ul><li>'Tiong Bahru Plaza, UC800_102002_Chiller_2, Condenser Saturated Refrigerant Temperature Circuit 1 (Units: °C)'</li><li>'Tiong Bahru Plaza, UC800_3, Condenser Saturated Refrigerant Temperature Circuit 1 (Units: °C)'</li><li>'Tiong Bahru Plaza, UC800_102002_Chiller_2, Evaporator Saturated Refrigerant Temperature - Circuit 1 (Units: °C)'</li></ul> |
| 4 | <ul><li>'Tiong Bahru Plaza, DDC-9-1, AHU 9-1 Flow'</li><li>'Tiong Bahru Plaza, DDC-L6, AHU 5-3 Flow'</li><li>'Tiong Bahru Plaza, DDC-L6, AHU 4-1 Flow'</li></ul> |
| 19 | <ul><li>'Tiong Bahru Plaza, DDC_L4-3, Outdoor humidity (Units: %).2'</li><li>'Tiong Bahru Plaza, DDC_L4-3, Outdoor humidity (Units: %)'</li><li>'Tiong Bahru Plaza, DDC_L4-3, Outdoor humidity (Units: %).1'</li></ul> |
| 38 | <ul><li>'Tiong Bahru Plaza, UC800_3, Entering Condenser Water (Units: °C)'</li><li>'Tiong Bahru Plaza, UC800_102002_Chiller_2, Entering Condenser Water (Units: °C)'</li><li>'Tiong Bahru Plaza, UC800_101001_Chiller_1, Entering Condenser Water (Units: °C)'</li></ul> |
| 10 | <ul><li>'Tiong Bahru Plaza, DDC-L1-3, AHU-L2-02 VSD feedback'</li><li>'DDC-CH-3:CWP 3 VSD Feedback'</li><li>'Tiong Bahru Plaza, DDC-L2-8, PAU-L2-03 VSD feedback'</li></ul> |
## Evaluation
### Metrics
| Label | Accuracy |
|:--------|:---------|
| **all** | 0.9864 |
## 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("Varun1010/all-MiniLM-L6-v2-polaris-more")
# Run inference
preds = model("Tiong Bahru Plaza, DDC-L20, AHU 20-1 VSD CONTROL")
```
<!--
### Downstream Use
*List how someone could finetune this model on their own dataset.*
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Set Metrics
| Training set | Min | Median | Max |
|:-------------|:----|:-------|:----|
| Word count | 3 | 8.7134 | 13 |
| Label | Training Sample Count |
|:------|:----------------------|
| 0 | 4 |
| 1 | 4 |
| 2 | 4 |
| 3 | 4 |
| 4 | 4 |
| 5 | 4 |
| 6 | 4 |
| 7 | 4 |
| 8 | 4 |
| 9 | 4 |
| 10 | 4 |
| 11 | 4 |
| 12 | 4 |
| 13 | 4 |
| 14 | 4 |
| 15 | 4 |
| 16 | 4 |
| 17 | 4 |
| 18 | 4 |
| 19 | 3 |
| 20 | 3 |
| 21 | 4 |
| 22 | 4 |
| 23 | 1 |
| 24 | 1 |
| 25 | 4 |
| 26 | 4 |
| 27 | 4 |
| 28 | 4 |
| 29 | 4 |
| 30 | 3 |
| 31 | 3 |
| 32 | 4 |
| 33 | 4 |
| 34 | 4 |
| 35 | 4 |
| 36 | 4 |
| 37 | 4 |
| 38 | 3 |
| 39 | 3 |
| 40 | 1 |
| 41 | 1 |
| 42 | 3 |
| 43 | 4 |
### Training Hyperparameters
- batch_size: (64, 64)
- num_epochs: (5, 5)
- 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: False
- use_amp: False
- warmup_proportion: 0.1
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
### Training Results
| Epoch | Step | Training Loss | Validation Loss |
|:------:|:----:|:-------------:|:---------------:|
| 0.0027 | 1 | 0.1538 | - |
| 0.1330 | 50 | 0.0495 | - |
| 0.2660 | 100 | 0.0655 | - |
| 0.3989 | 150 | 0.0336 | - |
| 0.5319 | 200 | 0.0282 | - |
| 0.6649 | 250 | 0.0207 | - |
| 0.7979 | 300 | 0.0184 | - |
| 0.9309 | 350 | 0.0163 | - |
| 1.0638 | 400 | 0.0088 | - |
| 1.1968 | 450 | 0.0307 | - |
| 1.3298 | 500 | 0.0153 | - |
| 1.4628 | 550 | 0.0079 | - |
| 1.5957 | 600 | 0.02 | - |
| 1.7287 | 650 | 0.0165 | - |
| 1.8617 | 700 | 0.0087 | - |
| 1.9947 | 750 | 0.0236 | - |
| 2.1277 | 800 | 0.0108 | - |
| 2.2606 | 850 | 0.0071 | - |
| 2.3936 | 900 | 0.0137 | - |
| 2.5266 | 950 | 0.0104 | - |
| 2.6596 | 1000 | 0.0054 | - |
| 2.7926 | 1050 | 0.0058 | - |
| 2.9255 | 1100 | 0.0052 | - |
| 3.0585 | 1150 | 0.0053 | - |
| 3.1915 | 1200 | 0.004 | - |
| 3.3245 | 1250 | 0.0047 | - |
| 3.4574 | 1300 | 0.0176 | - |
| 3.5904 | 1350 | 0.0046 | - |
| 3.7234 | 1400 | 0.0139 | - |
| 3.8564 | 1450 | 0.0043 | - |
| 3.9894 | 1500 | 0.0042 | - |
| 4.1223 | 1550 | 0.0112 | - |
| 4.2553 | 1600 | 0.0091 | - |
| 4.3883 | 1650 | 0.0045 | - |
| 4.5213 | 1700 | 0.009 | - |
| 4.6543 | 1750 | 0.0097 | - |
| 4.7872 | 1800 | 0.0049 | - |
| 4.9202 | 1850 | 0.0036 | - |
### Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- Sentence Transformers: 2.6.1
- Transformers: 4.38.2
- PyTorch: 2.2.1+cu121
- Datasets: 2.18.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}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->