A Comparative Analysis of Building Hidden Layer, Activation Function, and Optimizer on Neural Network Sentiment Analysis

The increasing diversity of opinions on social media offers a rich source for sentiment analysis, especially on controversial issues like the potential recession in Indonesia. This study aims to examine social media sentiment by utilizing three Deep Learning methods: Long Short-Term Memory (LSTM), Convolutional Neural Network (CNN), and Recurrent Neural Network (RNN). The main objective is to configure key hyperparameters, including the number of hidden layers, activation functions, and optimizers, to optimize performance. A dataset of 38,000 cleaned Twitter posts was used for this study. The preprocessing steps involve various techniques to prepare analysis, including case folding to standardize text, removal of punctuation to eliminate noise, stemming to reduce words to their root forms, and sentiment labeling using advanced tools like VADER and BERT to ensure accurate classification. Each deep learning model is trained using a diverse range of configurations for activation functions, such as Sigmoid and Swish, as well as optimizers like Adam and others to fine-tune performance. Among the models, the CNN, configured with 15 hidden layers, a Sigmoid activation function, and the Adam optimizer, outperformed the others, achieving the highest accuracy of 0.870 and a low loss of 0.316. The results highlight that while the number of hidden layers influences model performance, the choice of activation function and optimizer has a more significant impact on accuracy. Furthermore, the findings offer implications for future research, suggesting that activation functions and optimizers should be prioritized over hidden layers when aiming for improved sentiment analysis performance in various contexts.

Authors

Publication Details

Journal
JOIV International Journal on Informatics Visualization
Published
2025-05-31
DOI
https://doi.org/10.62527/joiv.9.3.2906
Citations
3
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
7.44
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Comparative Analysis of Building Hidden Layer, Activation Function, and Optimizer on Neural Network Sentiment Analysis

Samuel Ady Sanjaya, Dinar Ajeng Kristiyanti, Irmawati Irmawati, Cristin Natalia Karaeng et al.
3 citations
JOIV International Journal on Informatics Visualization
Sentiment Analysis and Opinion Mining
7.44
article

A Comparative Analysis of Building Hidden Layer, Activation Function, and Optimizer on Neural Network Sentiment Analysis

Samuel Ady Sanjaya, Dinar Ajeng Kristiyanti, Irmawati Irmawati, Cristin Natalia Karaeng, Faustine Ilone Hadinata
article en
3 citations

Abstract

The increasing diversity of opinions on social media offers a rich source for sentiment analysis, especially on controversial issues like the potential recession in Indonesia. This study aims to examine social media sentiment by utilizing three Deep Learning methods: Long Short-Term Memory (LSTM), Convolutional Neural Network (CNN), and Recurrent Neural Network (RNN). The main objective is to configure key hyperparameters, including the number of hidden layers, activation functions, and optimizers, to optimize performance. A dataset of 38,000 cleaned Twitter posts was used for this study. The preprocessing steps involve various techniques to prepare analysis, including case folding to standardize text, removal of punctuation to eliminate noise, stemming to reduce words to their root forms, and sentiment labeling using advanced tools like VADER and BERT to ensure accurate classification. Each deep learning model is trained using a diverse range of configurations for activation functions, such as Sigmoid and Swish, as well as optimizers like Adam and others to fine-tune performance. Among the models, the CNN, configured with 15 hidden layers, a Sigmoid activation function, and the Adam optimizer, outperformed the others, achieving the highest accuracy of 0.870 and a low loss of 0.316. The results highlight that while the number of hidden layers influences model performance, the choice of activation function and optimizer has a more significant impact on accuracy. Furthermore, the findings offer implications for future research, suggesting that activation functions and optimizers should be prioritized over hidden layers when aiming for improved sentiment analysis performance in various contexts.

JOIV International Journal on Informatics VisualizationVol. 9(3)
Openalex Percentile: Top 3%
Sentiment Analysis and Opinion Mining
7.44
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.

A Comparative Analysis of Building Hidden Layer, Activation Function, and Optimizer on Neural Network Sentiment Analysis — Samuel Ady Sanjaya, Dinar Ajeng Kristiyanti, et al. · JOIV International Journal on Informatics Visualization (2025) | TGRS Research Map | TGRS