# Comparison of Machine Learning Models for Sentiment Analysis of Big Turkish Web-Based Data +
## 3 Materials and Methods
### System Evaluation
In its structure, leaves represent the document category, while branches represent the combination of features leading to these categories [30]. Each non-leaf node is labeled with an attribute, which asks a question about the input sample and creates a branch for possible answers. Possible answers are determined by one of the answers from branches [40]. Thus, classification is obtained using the path from the root to the leaf node [47]. In the DT codes applied in the study, the depth of the tree is defined as unlimited (max_depth = none), thus allowing the model to learn the dataset. RF is an algorithm based on ensemble learning. Through ensemble learning, where different types of algorithms or the same algorithm are combined multiple times, RF combines multiple algorithms of the same type. It combines multiple decision trees and thus creates a forest of trees [48]. This algorithm provides high classification accuracy and can determine variable importance. In this study, 100 trees were used by default (N_estimators = 100), and each tree was trained with the dataset to increase the generalization ability of the model. LR is a discriminative classifier that allows the estimation of independent variables [49]. Independent variables are one or more than one; logistic regression is based on algorithmsthat determine the output and result [50]. LR consists of extracting a set of weighted features from the input, multiplying each feature by the weight and then summing [51]. In the LR model used in the study, the iteration process was performed by determining the value of max_iter = 1000, thus determining the stopping criterion and allowing the model to learn better. The use of these algorithms was preferred due to the high performance accuracies of supervised machine learning approaches and the creation of a trained model with manual tagging, which constitutes one of the foundations of the study. The suitability of the system for each of the product categories and groups that constitute the study's dataset was tested with a confusion matrix and evaluation metrics. The evaluation metrics used were accuracy, precision, recall, and f-1 score. The confusion matrix is a matrix in which the classification model results are compared with the actual results, as shown in Table 2 [52]. If the model results classified in a text are the same as the actual result, it is considered correctly classified [53]. Accuracy calculates the percentage of the total predicted quantity that is correctly predicted [54]. With evaluation metrics, performance is calculated based on the accuracy in the test set [55]. \[\text{Accuracy}=\frac{\text{TN}+\text{TP}}{\text{TN}+\text{TP}+\text{FN}+ \text{FP}} \tag{1}\]  
\(\text{TN}/\text{TP}\) is the number of reviews where both humans and computers agree that they belong to class C; FP/FP is the number of reviews where humans classify the reviews as belonging to class C, but the classifier classifies the inaccuracies as not belonging to class C [56]. Precision, recall, and f-1 score calculations are performed with the following equations [57]:  
\[\text{Precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{2}\]  
\[\text{Recall}=\frac{\text{TP}}{\text{TP}+\text{FN}} \tag{3}\]  
\[\text{F-1 Score}=\frac{2*\text{Precision}*\text{Recall}}{\text{Precision}+ \text{Recall}} \tag{4}\]  
While precision measures the accuracy of a classifier, recall is a tool that measures the model's prediction accuracy for the class, i.e., the ability to find all positive units in the dataset [58]. F-measure is the weighted harmonic mean of precision and recall [59].