← All work
Analytics & ML · 2025

ESG sentiment classifier

2 of 5real-world sentences right, after 86.84% on the test set
Role

Group · I built the SVM

Year

2025

Type

Analytics & ML

Tools

NLP, scikit-learn

The answer

The model scores well on the test set but partly learned the dataset's sentence templates, not sentiment. The next step is training on real sustainability reports and news.

86.84%test accuracy, 228 sentences
2 of 5real-world sentences right
16test sentences also in training

01The problem

Can a lightweight text classifier flag whether a statement about a company's ESG practice is positive or negative?

Group project, Semester 7, 2025 · I built the SVM, one of the models the group compared; a teammate prepared the dataset

02What I did

  • Built and evaluated the SVM on 910 labelled sentences (75/25 stratified split).
  • Read its feature weights to see what it had learned.
  • Tested it on real-world sentences.

03Results

On the test set, the errors are balanced
NegativePositiveNegativeNegative · Negative: 9797Negative · Positive: 1313PositivePositive · Negative: 1717Positive · Positive: 101101

Confusion matrix, 228 test sentences. Rows: actual label. Columns: predicted.

Source: notebook classification report (recall 0.882 x 110); notebook classification report; notebook classification report (recall 0.856 x 118)

Five real-world sentences: 2 right
SentenceActualModelRight?
The company announced a new plan to achieve net-zero emissions by 2040.PositivePositiveyes
Regulators are investigating the firm over alleged human rights violations in its supply chain.NegativePositiveno
The foundation's investment in renewable energy has yielded strong community support.PositiveNegativeno
Stakeholders expressed disappointment with the board's lack of diversity.NegativeNegativeyes
The company's carbon footprint remains a significant concern for investors.NegativePositiveno

Source: notebook cell 11

04Files

Next project

LinkUp

12 screens →