readme: ---
  tags:
  - generated_from_trainer
  datasets:
  - sst2-es-mt
  metrics:
  - accuracy
  - f1
  model-index:
  - name: electricidad-small-finetuned-sst2-es
    results:
    - task:
        name: Text Classification
        type: text-classification
      dataset:
        name: sst2-es-mt
        type: sst2-es-mt
        config: sst2
        split: train
        args: sst2
      metrics:
      - name: Accuracy
        type: accuracy
        value: 0.8795871559633027
      - name: F1
        type: f1
        value: 0.88
  widget:
   - text: "La verdad es que no tengo una opinión sólida al respecto."
   - text: "Me parece muy interesante poder colaborar en este proyecto."
   - text: "El gobierno actual no lo está haciendo mal, pero debe mejorar."
   - text: "Esperaba mucho más por el precio que he pagado, la verdad..."
   - text: "El proyecto BERTIN tiene cosas interesantes, pero tienen que trabajar más duro si quieren llegar lejos."
  
  ---
  
  # Electricidad (small) fine-tuned on sst2-es-mt for Spanish Sentiment Analysis 👍👎
  
  This model is a fine-tuned version of [mrm8488/electricidad-small-discriminator](https://huggingface.co/mrm8488/electricidad-small-discriminator) on the **sst2-es-mt** [dataset](https://huggingface.co/datasets/sst2-es-mt). A dataset created using Neural Machine Translation on original [SST2](https://huggingface.co/datasets//sst2) (English) dataset.
  
  It achieves the following results on the evaluation set:
  - Accuracy: 0.879
  - F1: 0.88
  
  ## Usage
  
  ```py
  from transformers import pipeline
  
  model_ckpt = "mrm8488/electricidad-small-finetuned-sst2-es"
  
  classifier = pipeline("sentiment-analysis", model=model_ckpt)
  
  classifier("Here your text in Spanish!")
  ``` 
  
  
  ### Training hyperparameters
  
  The following hyperparameters were used during training:
  - learning_rate: 3.676560994488171e-05
  - train_batch_size: 64
  - eval_batch_size: 32
  - seed: 30
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - lr_scheduler_type: linear
  - num_epochs: 3
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     |
  |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
  | 0.3272        | 1.0   | 2105 | 0.3418          | 0.8567   | 0.8489 |
  | 0.2394        | 2.0   | 4210 | 0.3391          | 0.8796   | 0.88   |
  | 0.192         | 3.0   | 6315 | 0.3644          | 0.8761   | 0.8770 |
  
  
  ### Framework versions
  
  - Transformers 4.21.2
  - Pytorch 1.12.1+cu113
  - Datasets 2.4.0
  - Tokenizers 0.12.1
  