Hebrew
vad
valence
arousal
dominance
regression
knesset
GiliGold's picture
Update README.md
234672c verified
|
raw
history blame
2.51 kB
metadata
license: cc-by-sa-4.0

VAD Binomial Regression Models

This repository contains three binomial regression models designed to predict VAD (Valence, Arousal, Dominance) scores for text inputs. Each model is stored as a separate pickle (.pkl) file:

  • valence_model.pkl: Predicts the Valence score (positivity/negativity).
  • arousal_model.pkl: Predicts the Arousal score (level of excitement or calm).
  • dominance_model.pkl: Predicts the Dominance score (sense of control or influence). All scores are normalized on a scale from 0 to 1.

Before making predictions, input text must be converted into embeddings using the Knesset-multi-e5-large model. The embeddings are then fed into the regression models.

Training Data

The models were trained using a combination of datasets to ensure robust and generalizable predictions:

Emobank Dataset (by buechel-hahn-2017-emobank): A comprehensive dataset containing emotional text data that we automaticaly translated to Hebrew using Google/madlad400-3b-mt. Hebrew VAD Lexicon: A lexicon that provides VAD scores for Hebrew words. Knesset Sentences: A manually annotated set of 120 Knesset sentences with VAD scores, serving as an additional benchmark and source of training data. This diverse training data allowed the models to capture nuanced emotional features across different text domains, especially in Hebrew.

Model Details

  • Model Type: Binomial Regression
  • Input: Preprocessed text data (the specific feature extraction process should align with the training procedure).
  • Output: VAD scores (valence, arousal, and dominance) on a continuous scale from 0 to 1. Each model is provided as a .pkl file and can be loaded using Python's pickle module.

Usage Example

from sentence_transformers import SentenceTransformer
import pickle

model = SentenceTransformer('GiliGold/Knesset-multi-e5-large')
embedding_vector = model.encode(sentence)

# Load the valence model
with open("valence_model.pkl", "rb") as file:
    valence_model = pickle.load(file)

# Assume `embedding_vector` is the vector obtained from the Knesset-multi model
valence_score = valence_model.predict([embedding_vector])

print(f"Predicted Valence Score: {valence_score[0]}")