How to do sentiment analysis on my own dataset?


I have seen this example, which does sentiment analysis on product reviews.

Therefore, is there a way to do this with my own dataset? I want to classify the sentiment of text as “happy”, “sad” or “neutral” using my own dataset.


You have to define your own and to load your own labeled text. Then choose an LM like BERT from the huggingface library to finetune.