Transaction on Informatics and Data Science
Vol. 3 No. 2 (2026)

Quality-Controlled Indonesian Twitter Sentiment Analysis Baseline Using TF-IDF and Classical Machine Learning Approaches

Aan Ansori (Informatics, Faculty of Science and Technology, Universitas Islam Negeri Sultan Maulana Hasanuddin Banten, Indonesia)
Raden Kania (Informatics, Faculty of Computer Science, Universitas Banten Jaya, Banten, Indonesia)
Tifani Intan Solihati (Informatics, Faculty of Computer Science, Universitas Banten Jaya, Banten, Indonesia)
Fitri Damyati (Informatics, Faculty of Engineering, Universitas Sultan Ageng Tirtayasa, Banten, Indonesia.)



Article Info

Publish Date
09 Oct 2026

Abstract

Social media provides a large volume of informal textual data for examining public sentiment, but Indonesian Twitter content presents substantial challenges due to slang, nonstandard spelling, limited context, and uneven class distribution. This study evaluates a reproducible machine-learning and natural-language-processing pipeline for three-way sentiment classification on a publicly available Indonesian Twitter dataset. The original corpus contained 10,806 manually labeled tweets. Quality control removed duplicate texts and all duplicate texts carrying conflicting labels, yielding 9,948 observations: 2,606 negative, 4,955 neutral, and 2,387 positive. Text was normalized and represented using term frequency-inverse document frequency with unigram and unigram-bigram configurations. Multinomial Naive Bayes, logistic regression, linear support vector machine, and random forest classifiers were evaluated using a stratified 80:20 split, with macro-F1 prioritized due to class imbalance. Multinomial Naive Bayes achieved the highest accuracy at 60.35%, but logistic regression with unigram-bigram features produced the best macro-F1 of 56.22% and a weighted F1 of 58.45%. Five-fold cross-validation produced a mean macro-F1 of 56.59% with low dispersion. Error analysis indicates that negation, mixed sentiment, informal expressions, and context dependence remain major sources of misclassification. These findings establish a transparent classical baseline for Indonesian social-media sentiment analysis.

Copyrights © 2026






Journal Info

Abbrev

tids

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Engineering

Description

Transactions on Informatics and Data Science (TIDS), with ISSN: 3064-1772 (online), is a scientific journal that publishes the latest research in the fields of informatics and data science, focusing on both theoretical advances and practical applications. Published by the Department of Informatics, ...