# Coreference Resolution for Improving Performance Measures of Classification Tasks
## 3 Methodology
### The Techniques Used to Create the Input Vectors
#### 3.3.4 The Techniques Used to Create Classification Methods  
We prepared multiple fake news classifiers to verify the effectiveness of the coreference resolution. These were created using the following classification algorithms:  
* Decision Tree algorithm;
* Random Forest classifier [40];
* K-Nearest Neighbors [41];
* Multinomial Naive Bayes model [42];
* Logistic Regression.  
We used K-fold validation to evaluate the created models. The K-fold technique is a popular and easy-to-understand technique, which generally results in a less biased model. The reason for this is that it ensures that every observation from the original dataset has the chance of appearing in the training and test set.  
Firstly, we shuffled our dataset so that the order of the inputs and outputs was completely random. We conducted this step to make sure that our inputs were not biased in any way. In the K-fold cross-validation step, the original sample was randomly partitioned into \(k\) equally sized subsamples. Of the \(k\) subsamples, a single subsample was retained as the validation data for testing the model, and the remaining \(k-1\) subsamples were used as the training data. The cross-validation process was then repeated \(k\) times with each of the \(k\) subsamples used exactly once as the validation data.  
The advantage of this method is that all observations were used for both training and validation, and each observation was used for validation exactly once. When evaluating all the models we created, \(k=10\), i.e., the input dataset was randomly divided into 10 parts.  
Figure 6: Doc2 Vec architecture [22].  
We also focused on the following four widely used metrics, accuracy, precision, F1 score, and recall, to assess the performance of our models.  
Accuracy is a fundamental performance measure used in evaluating machine learning models. It represents the ratio of correctly predicted instances to the total number of instances in the dataset. Mathematically, it is defined as per Formula (5):  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN}, \tag{5}\]  
In the binary classification, we used four key metrics: true positives (_TP_), true negatives (_TN_), false positives (_FP_), and false negatives (_FN_). TP represents the number of correctly predicted positive instances, _TN_ represents the number of correctly predicted negative instances, _FP_ refers to the number of incorrectly predicted positive instances, and _FN_ indicates the number of incorrectly predicted negative instances. These metrics helped us to assess the model's performance and make informed decisions as to how to improve it.  
Precision assesses the accuracy of positive predictions made by the model. It represents the proportion of true-positive predictions (correctly predicted positive instances) among all the positive predictions (Formula (6))  
\[Precision=\frac{TP}{TP+FP}, \tag{6}\]  
Precision is particularly useful when the cost of false positives is high, as it helps in minimizing the number of false alarms. However, a high precision score may be accompanied by a low recall score, leading to an increased number of false negatives.  
Recall calculates the proportion of true-positive predictions among all the actual positive instances in the dataset (Formula (7)).  
\[Recall=\frac{TP}{TP+FN}, \tag{7}\]  
The final measure is the F1 score, which is a metric that combines precision and recall to provide a balanced evaluation of a model's performance. It is the harmonic mean of precision and recall and is mathematically represented in Formula (8):  
\[F1=2\times\frac{Precision*Recall}{Precision+Recall},\]  
The F1 score reaches its highest value at 1 (perfect precision and recall) and its lowest at 0. It is particularly useful when dealing with imbalanced datasets, where accuracy can be misleading. The F1 score considers both false positives and false negatives, making it a suitable measure when the overall model performance needs to be balanced.