
## Q1: Exploration
#### (1) How many tweets (sentences) were used to train and validate sets?
#### (2) What are the target predictive labels?
#### (3) What are the distributions of labels in training and validation sets?
#### (4) Analyze the words per tweet in the train and validation (e.g., use wordcloud).
#### (5) Drop down your observations and insights: 

- Are the classes balanced? What are the potential implications of class imbalance?
- Are there any words that seem particularly indicative of certain emotions?
- Do the training and validation sets appear similar in terms of vocabulary and tweet length?

## Q2:Preprocessing
#### (1) Use 2 different tokinzers (e.g., e.g., bert-base-uncased, distilbert-base-uncased, roberta-base) from hugging face.
#### (2) Report the tokenizer's vocabulary size.
#### (3) Present the tokenization results for the selected tokenizer on three examples.
#### (4) Drop down your observation and insights:

- How do the two tokenizers differ in their handling of these examples?
- What are the advantages and disadvantages of each tokenizer, based on your observations?
- How does the tokenizer handle out-of-vocabulary words?
- Explain the purpose of [CLS] and [SEP] tokens and how they are used in the context of BERT.

## Q3: Modeling (Fine-Tuning & Performance)
#### (1) Build and Fine-Tune a BERT-Based Emotion Classifier:  

a. *Encoder Selection:*  Use the bert-base-uncased pre-trained model from the Hugging Face Transformers library.
b. *Classifier Head:* Utilize `transformers.AutoModelForSequenceClassification` to easily add a classification head on top of the BERT model. This class automatically configures the model for sequence classification tasks. 
c. *Fine tuning process:* Fine-tune the pre-trained BERT model on the provided emotion classification training dataset. This involves updating the model's weights to better adapt it to the specific task of emotion recognition.

#### (2) Document your observations and insights regarding the modeling process, including:
- What were the main challenges you encountered during fine-tuning?
- Which hyperparameters (learning rate, batch size, epochs) did you experiment with, and how did they impact the model's performance?.
- Report the model's performance on the validation set (report all metrics calculated). Is there any evidence of overfitting? If so, what steps did you take to mitigate it?
- What are the limitations of your model? Are there specific emotions that the model struggles to classify correctly? Based on your analysis of the confusion matrix, can you identify any common patterns in the misclassified examples?
- How could the model be further improved? Consider data augmentation, different model architectures, or other advanced techniques.

**> Optionally use pytorch**