# Fusion Text Representations to Enhance Contextual Meaning in Sentiment Classification
## 4 Experiments and Results
### Dataset  
The IMDB dataset, which comprises 50,000 reviews, is extensively utilized in machine learning for sentiment categorization. This dataset is commonly employed for training and evaluating models capable of discerning if a movie review exhibits a positive or negative attitude. The collection is sourced from IMDB reviews contributed by diverse people who offer ratings and reviews for the movies they have watched. For this study, we employed a sample size of 50,000 reviews, which were equally divided into 25,000 positives reviews and 25,000 negatives reviews. We divided the dataset into training data, testing data, and validation data. Training data were used during the training phase with the aim of training the model to recognize patterns and learn from the data. The training data were used to update the weights and biases in the model through backpropagation and optimization processes. Validation data were used during the training phase but after each epoch or iteration. The purpose of using these data was to validate the model during training to assess its performance and to tune hyperparameters. This helps in preventing overfitting by providing feedback on the model's performance on data not seen during training. After the model was trained on the training set, it was evaluated on the validation set to monitor performance metrics such as accuracy, loss, or other relevant metrics. These results were used to adjust hyperparameters such as learning rate, number of layers, or units in each layer. Testing data were used after the model was fully trained and all tuning was completed. The purpose of these data was to evaluate the final performance of the model to provide an unbiased estimate of its performance on completely new data. These data were used once at the end to measure accuracy, precision, recall, F1 score, or other metrics. These results give an idea of how well the model will perform in a real-world environment. The total data in the IMDB dataset are 50,000. We divided the data into 80% training data and 20% testing data, resulting in 40,000 training data and 10,000 testing data. For validation data, the training data were further split to obtain a validation set consisting of 20% of the training data. Therefore, out of 40,000 training data, the actual training data used were 32,000, and the validation data used were 8000. The IMDB dataset included in this study is available for access at the following URL: [[https://ai.stanford.edu/~amaas/data/sentiment/](https://ai.stanford.edu/~amaas/data/sentiment/)]([https://ai.stanford.edu/~amaas/data/sentiment/](https://ai.stanford.edu/~amaas/data/sentiment/)) (accessed on 19 June 2024) [33]. To compare the results, we also used dataset evaluation with 5-fold cross-validation. Cross-validation is a robust statistical method used to assess the generalizability of a model by partitioning the data into multiple subsets (folds). In our proposed model, the dataset is divided into five equally sized folds. During each iteration, four folds are used for training the model, and the remaining fold is used for testing. We employed 5-fold cross-validation to evaluate the performance of the sentiment analysis model on the IMDB dataset. This technique involves dividing the dataset into five equal parts (folds). In each iteration, four parts are used to train the model, while one part is used to test the model. This process is repeated five times so that each part of the data is used once as the test set. The implementation of 5-fold cross-validation was carried out using the 'KFold' class from'sklearn.model_selection'. This implementation involves several stages. In the first stage, the preprocessed data, which has been converted into numerical sequences, is divided into five parts using 'KFold(n_splits = 5, shuffle = True, random_state = 42)'.