# Two-Stage Dimensionality Reduction for Social Media Engagement Classification
## 4 Experimental Results  
The results of the proposed method, known as the TSDR approach, are presented in two parts in this section. Section 4.1 evaluates its classification performance on benchmark datasets, and Section 4.2 assesses its performance on a real-world application utilizing social media data.  
The classification accuracy of the TSDR approach is compared to well-established algorithms. It is important to note that deterministic algorithms produce consistent outputs given the same inputs and machine state, while non-deterministic algorithms can produce varying outputs in the same circumstances [22].  
The \(k\)-NN algorithm is a deterministic method that classifies based on the distances between a given sample and its \(k\) nearest neighbors. Its deterministic nature ensures consistent results given the same inputs. In contrast, the MLP is a non-deterministic algorithm, with the weights of its neurons initialized randomly and the calculation of errors unique to each iteration [23].  
Comparing the efficiency of the TSDR approach with both deterministic and non-deterministic algorithms provides a comprehensive evaluation of the proposed method. Non-deterministic algorithms, such as the MLP, can be useful for finding approximate solutions when exact solutions are difficult to attain using deterministic methods.  
While the parameterization of k-NN is straightforward, the same is not true for MLP, as it is a multilayer neural network that becomes more sensitive to the dataset. The appropriate number of neurons for each layer remains an area of uncertainty in the literature.  
Next, we present some general guidelines for determining the number of neurons in the hidden layer of an MLP [24]:  
Figure 10: CG final subset.  
The number of neurons in the hidden layer should fall within the range between the size of the input layer and the size of the output layer.  
The number of neurons in the hidden layer should be equal to 2/3 of the size of the input layer, plus the size of the output layer.  
The number of neurons in the hidden layer should be less than double the size of the input layer.  
In this study, the number of neurons in the single hidden layer of the MLP is arbitrarily determined by summing 2/3 of the number of features (in the input layer) and the number of labels (in the output layer). The only parameter yet to be defined is \(d\), the number of desired dimensions in the output subset by the end of the first stage of the TSDR approach. As detailed in Section 3.2, the number of dimensions by the end of the second stage of the TSDR approach is solely determined by the number of classes in the original dataset.  
Each of the methods (\(k\)-NN, MLP, LDA, and TSDR) were tested 100 times on various datasets. In each trial, a new training and test split was performed at fixed proportions of 60% and 40%, respectively. For each round, the TSDR was evaluated by varying the value of \(d\) from the total number of features minus one in the original dataset to the total number of classes plus one. Briefly, the classification performance for the following methods will be compared as follows:  
* \(k\)-NN (deterministic method) on original dataset;
* MLP (non-deterministic method) on original dataset;
* LDA (non-deterministic method) on original dataset;
* TSDR discriminant function (as per Section 3.3 and Equation (15);
* \(k\)-NN on TSDR final subset;
* MLP on TSDR final subset;
* LDA on TSDR final subset.