## 3 Proposed Approach and Implementation Details
### Proposed Approach: Inference Engine  
This section discusses the proposed multi-stage approach, i.e., (1) stance detection, (2) author credibility verification, and (3) machine learning-based classification. During stance detection, the very first step in the inference engine, it is determined whether or not the headline and the body of a news article are relevant or not. Listing 1 shows the pseudo-code of stance detection. In order to find relevancy, the cosine similarity technique is implemented, which is used to find similarity between two text documents irrespective of their size. If their headlines and body texts are similar, then one can proceed to the next module, i.e., author credibility; otherwise, the model declares that the examined news is fake news. In NLP, it is a well-informed and popular approach. It allows for detection in favor of the audience, and from the text, it determines whether the audience found the objective to be against, in favor of, or impartial to the target [41]. The objective could be an individual, an association, an administration strategy, a development, an item, and so forth. ```
defget_vectors(title,text): vocab=[title,text] vectorizer=CountVectorizer(vocab) vectorizer.fit(vocab) return(vectoriz-er.transform([title]).toarray(),vectorizer. transform([text]).toarray()) defstance_detection(row): globaltotal,fake title,text=get_vectors(row['title'],row['text']) total+=1 if(p.cosine_similarity(title,text)<0.25): fake+=1 frame.apply(stance_detection,axis=1)
```  
The next step is the verification of author credibility. In this module, the inference engine validates an author's information to judge whether the news is fake or not. Twitter API [42] is used to obtain the author's Twitter profile. It first checks how many followers the author has and then checks how many times this news has been retweeted. [PERSON] et al. in [41] described different features of evaluating the believability of client-produced content on Twitter, and a novel continuous framework to survey the trustworthiness of tweets was proposed. The discussed framework was implemented to accomplish this by relegating a score or rating to content on Twitter to show its dependability. The authors of [43] et al. investigated different grouping strategies in order to help versatility, and another solution to the constraints present in previously existing procedures was proposed. Figure 4: Word cloud of the various news articles. Finally, for fake news detection, four different machine learning algorithms are applied. In this paper, we compare the results of all four algorithms. The selected algorithms are as follows:  
* A decision tree is one of the most popular classifiers that helps in prediction and classification, and it is supervised in nature. It splits the dataset by recursively selecting features. The selected features of the dataset can be in nominal or continuous form. This is a well-known classifier for data classification. The most distinct feature is the conversion of the process of complex decisions in order to simplify the process definition, and, as a result, it provides an easy way to understand and interpret the outcome [44]. * Random forest is a regulated AI method that is supervised in nature. On the basis of random element choice, a set of decision trees (base classifiers) is produced, and the dominant party with respect to voting is selected for classification. It generates accurate and diverse decisions that are dynamic algorithms for this classifier [45]. In a random forest, the individual decision trees are an ensemble, and they operate on average to increase the accuracy of the prediction of the model. This model also focuses on the reduction in over-fitting. The sub-samples are drawn with replacement, keeping their size the same as the original input sample size. * Logistic regression is an AI technique for classification. In this algorithm, the probabilities portraying the potential results of the possible outcomes are demonstrated utilizing a logistic function.