Wondering about dimensionality in emotion classification

Hello, I’m looking for a model that can provide some dimensionality for each emotion (e.g., fear on a scale from 1-5). I’m most interested in the j-hartmann/emotion-english-distilroberta-base model. I’m wondering if the probabilities for each emotion could be interpreted as a dimensional score (e.g., joy = .98, sad = .41). Is that possible? If not, is there a way to fine-tune the model to accommodate this? Are there models I’m missing that already do what I’m asking?

Thank you very much! :slight_smile:

sorry but uestion is not clear to me. how many classes and labels do you have in your dataset?

Hi prit-sk,
There are 7 classes and labels. Coming from this model. The output looks like this:
[[{‘label’: ‘anger’, ‘score’: 0.004419783595949411},
{‘label’: ‘disgust’, ‘score’: 0.0016119900392368436},
{‘label’: ‘fear’, ‘score’: 0.0004138521908316761},
{‘label’: ‘joy’, ‘score’: 0.9771687984466553},
{‘label’: ‘neutral’, ‘score’: 0.005764586851000786},
{‘label’: ‘sadness’, ‘score’: 0.002092392183840275},
{‘label’: ‘surprise’, ‘score’: 0.008528684265911579}]]

My question is whether the values can be interpreted as the amount of each emotion. For instance, can you say the text input is 97.7% “joy”? If not, can models like this be fine-tuned to add such emotional dimension or is there one that already exists?

My research question involves understanding the degree of fear in text. So, rather than just knowing whether the model thinks there’s fear in the text (i.e., a binary “yes” or “no”), I’d like to know how much fear is being communicated in the text (i.e., 15%, 81%, etc.). Is this possible?

I got the question, thanks for elaborating.

But i think you have used softmax as activation function. can you please confirm, since for multilabel, we use sigmoid function.

https://huggingface.co/j-hartmann/emotion-english-distilroberta-base: if you are referring this, yes you can interpret as confidence values: [can you say the text input is 97.7% “joy”?, YES]