Files changed (1) hide show
  1. README.md +11 -0
README.md CHANGED
@@ -25,6 +25,17 @@ We have fine-tuned [INDUS Model](https://huggingface.co/nasa-impact/nasa-smd-ibm
25
  - **Stratified Splitting:** The dataset is split based on `provider-id` to maintain balanced representation across train, validation, and test sets.
26
  - **Improved Performance:** Focal loss with different focusing parameters (γ) was evaluated, showing significant improvements in weighted precision, recall, F1 score, and Jaccard similarity over cross-entropy loss and previous models.
27
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  ## Experiments
30
 
 
25
  - **Stratified Splitting:** The dataset is split based on `provider-id` to maintain balanced representation across train, validation, and test sets.
26
  - **Improved Performance:** Focal loss with different focusing parameters (γ) was evaluated, showing significant improvements in weighted precision, recall, F1 score, and Jaccard similarity over cross-entropy loss and previous models.
27
 
28
+ ## Label Mapping During Inference
29
+
30
+ After obtaining predictions from the model, we can map the predicted label indices to their actual names using the `model.config.id2label` dictionary
31
+
32
+ ```python
33
+ # Example usage
34
+ predicted_indices = [0, 2, 5] # top 3
35
+ predicted_labels = [model.config.id2label[idx] for idx in predicted_indices]
36
+ print(predicted_labels)
37
+ ```
38
+
39
 
40
  ## Experiments
41