Logistic Regression and Naïve Bayes Comparison in Classifying Emotions on Indonesian X Social Media

Emotions are integral to human interaction and decision-making, often expressed on social media platforms like X, which provides valuable data for sentiment analysis. However, analyzing texts from X poses challenges due to informal language, slang, and unique textual features. This study compares Logistic Regression and Naive Bayes in classifying emotions from Indonesian tweets, addressing gaps in prior research by exploring feature extraction methods, data split ratios, and hyperparameter tuning. Data were collected from 100 Telkom University students, resulting in 8,978 tweets labeled into four emotions: Happy, Sad, Angry, and Fear. After preprocessing, feature extraction methods TF-IDF and Bag of Words (BoW) were applied. Models were trained and tested on 10%, 20%, and 30% data splits, and performance was evaluated using accuracy, precision, recall, and F1-score. Hyperparameter tuning was conducted for Logistic Regression using GridSearch. Results showed Logistic Regression outperformed Naive Bayes, achieving 73.49% accuracy compared to 70.27%, with BoW yielding superior results over TF-IDF. The 20% data split provided the best balance for training and testing. This research demonstrates the effectiveness of Logistic Regression and highlights the importance of tailored feature extraction and parameter optimization for emotion classification in informal text datasets, particularly for Indonesian tweets.

Authors

Institutions

Publication Details

Journal
EDUMATIC Jurnal Pendidikan Informatika
Published
2025-04-09
DOI
https://doi.org/10.29408/edumatic.v9i1.29120
Citations
1
Primary Topic
Data Mining and Machine Learning Applications
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Logistic Regression and Naïve Bayes Comparison in Classifying Emotions on Indonesian X Social Media

Warih Maharani, Gerald Shabran Rasyad
1 citations
EDUMATIC Jurnal Pendidikan Informatika
Data Mining and Machine Learning Applications
3.25
article

Logistic Regression and Naïve Bayes Comparison in Classifying Emotions on Indonesian X Social Media

Warih Maharani, Gerald Shabran Rasyad
article en
1 citations

Abstract

Emotions are integral to human interaction and decision-making, often expressed on social media platforms like X, which provides valuable data for sentiment analysis. However, analyzing texts from X poses challenges due to informal language, slang, and unique textual features. This study compares Logistic Regression and Naive Bayes in classifying emotions from Indonesian tweets, addressing gaps in prior research by exploring feature extraction methods, data split ratios, and hyperparameter tuning. Data were collected from 100 Telkom University students, resulting in 8,978 tweets labeled into four emotions: Happy, Sad, Angry, and Fear. After preprocessing, feature extraction methods TF-IDF and Bag of Words (BoW) were applied. Models were trained and tested on 10%, 20%, and 30% data splits, and performance was evaluated using accuracy, precision, recall, and F1-score. Hyperparameter tuning was conducted for Logistic Regression using GridSearch. Results showed Logistic Regression outperformed Naive Bayes, achieving 73.49% accuracy compared to 70.27%, with BoW yielding superior results over TF-IDF. The 20% data split provided the best balance for training and testing. This research demonstrates the effectiveness of Logistic Regression and highlights the importance of tailored feature extraction and parameter optimization for emotion classification in informal text datasets, particularly for Indonesian tweets.

EDUMATIC Jurnal Pendidikan InformatikaVol. 9(1)
Telkom University (ID)
Openalex Percentile: Top 8%
Data Mining and Machine Learning Applications
3.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.