<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manasi Deshpande on Medium]]></title>
        <description><![CDATA[Stories by Manasi Deshpande on Medium]]></description>
        <link>https://medium.com/@mpdeshpande?source=rss-99aa8f72dfec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*drT5I_LqDsMmsd_L</url>
            <title>Stories by Manasi Deshpande on Medium</title>
            <link>https://medium.com/@mpdeshpande?source=rss-99aa8f72dfec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:28:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mpdeshpande/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Reel vs Real: Conclusion]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-conclusion-9e00df281962?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e00df281962</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[conclusion]]></category>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Tue, 30 May 2023 18:27:48 GMT</pubDate>
            <atom:updated>2023-05-30T18:27:48.716Z</atom:updated>
            <content:encoded><![CDATA[<p>Fake news detection is a critical task in today’s information-driven society, and the combination of Random Forest classifier, regex, and TF-IDF has proven to be effective in addressing this challenge. The use of these techniques brings together the strengths of machine learning, natural language processing, and pattern matching to identify and classify fake news articles accurately.</p><p>Random Forest, as an ensemble learning algorithm, offers several advantages for fake news detection. Its ability to handle complex data and mitigate over-fitting makes it a robust choice. By combining multiple decision trees, it captures nonlinear relationships in the data and produces reliable predictions. The feature importance measure provided by Random Forest assists in understanding the underlying characteristics of fake news, enabling better feature selection and extraction.</p><p>Regex plays a crucial role in data preprocessing by allowing the identification and removal of irrelevant information from news articles. With the use of regular expressions, HTML tags, punctuation, and other noise can be eliminated, improving the quality of the input for the subsequent stages of analysis. Regex enables efficient pattern matching and extraction of specific textual patterns that may be indicative of fake news, such as misleading URLs or excessive use of capital letters.</p><p>TF-IDF, a popular technique in natural language processing, converts the preprocessed text into numerical features. It assigns weights to each term based on its frequency in the document and its inverse frequency across the entire corpus. This approach highlights the importance of terms that are specific to a particular document while downplaying common terms. TF-IDF captures the distinctive characteristics of news articles, enabling the model to learn meaningful patterns and make accurate predictions.</p><p>By combining Random Forest with regex and TF-IDF, we create a comprehensive fake news detection pipeline. The model can effectively learn from the TF-IDF features and make predictions based on the patterns identified by the ensemble of decision trees. The use of regex in data preprocessing ensures that irrelevant information is removed, further enhancing the model’s performance.</p><p>Through the training and evaluation process, we can assess the model’s performance using metrics such as accuracy, precision, recall, and F1-score. These metrics provide insights into how well the model can distinguish between real and fake news. Continuous monitoring and feedback allow for iterative improvements, ensuring that the model remains up to date with evolving patterns of fake news dissemination.</p><p>However, it’s important to acknowledge that fake news detection is a challenging task, and no single approach is perfect. The effectiveness of the model heavily depends on the quality and representativeness of the training data, as well as the choice of features and the fine-tuning of hyperparameters. Constant vigilance and adaptation are crucial in addressing the ever-evolving strategies employed by purveyors of fake news.</p><p>The combination of Random Forest classifier, regex, and TF-IDF offers a powerful approach for fake news detection. It leverages the strengths of machine learning, pattern matching, and feature extraction to identify and classify fake news articles accurately. This holistic pipeline provides a valuable tool in combating the spread of misinformation, promoting media literacy, and fostering a more informed society. Continuous research and advancements in this field will further refine and enhance the effectiveness of these techniques in the fight against fake news.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*XTpMYJVvMhVM9rxCK4c1GA.png" /><figcaption>Model vs Accuracy</figcaption></figure><p>Fake news detection is of utmost importance in today’s digital age where misinformation and disinformation can spread rapidly, impacting individuals, communities, and even democratic processes. The need for fake news detection arises due to several key reasons:</p><p>1.<strong> Preservation of Truth and Accuracy</strong>: Fake news undermines the integrity of information and distorts the truth. Fake news detection is essential to preserve the accuracy and authenticity of news articles, ensuring that people can access reliable information for making informed decisions.</p><p>2. <strong>Protection against Manipulation and Influence</strong>: Fake news is often created with the intention of manipulating public opinion, swaying elections, or inciting unrest. By detecting and exposing fake news, we can minimize the influence of malicious actors and protect the democratic process from undue manipulation.</p><p>3. <strong>Mitigation of Social and Psychological Impact</strong>: Fake news can have severe social and psychological consequences. It can fuel societal divisions, create distrust among communities, and even incite violence. Detecting and countering fake news helps mitigate these negative impacts, promoting social cohesion and fostering a healthier information ecosystem.</p><p>4. <strong>Preserving Trust in Media</strong>: Fake news erodes trust in mainstream media and journalism as a whole. Fake news detection initiatives demonstrate a commitment to maintaining journalistic integrity and rebuilding public trust in credible news sources.</p><p>5. <strong>Combatting Misinformation in Public Health</strong>: Fake news can have dire consequences in public health crises, where misinformation can spread rapidly and endanger lives. Detecting and debunking fake news related to health issues is vital for ensuring accurate information reaches the public, promoting public safety, and minimizing the harm caused by misinformation.</p><p>6. <strong>Promoting Media Literacy and Critical Thinking</strong>: Fake news detection efforts go hand in hand with promoting media literacy and critical thinking skills among individuals. By raising awareness about fake news and providing tools to identify and evaluate reliable sources, we empower individuals to navigate the vast sea of information and make informed judgments.</p><p>7. <strong>Protecting Businesses and Brands</strong>: Fake news can harm the reputation of businesses and brands. Detecting and addressing false information about products, services, or companies is crucial for maintaining trust with consumers and safeguarding the interests of businesses.</p><p>8. <strong>Ethical Responsibility</strong>: In an era where information spreads rapidly and widely, there is an ethical responsibility to combat the spread of misinformation. Fake news detection serves as a safeguard against the deliberate manipulation of public opinion and upholds the ethical standards of disseminating accurate and reliable information.</p><p>In conclusion, fake news detection is necessary to preserve truth, protect against manipulation, mitigate social impact, preserve trust in media, combat misinformation in public health, promote media literacy, protect businesses, and fulfill ethical responsibilities. By developing robust detection mechanisms, raising awareness, and promoting media literacy, we can collectively work towards a more informed, resilient, and trustworthy information ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e00df281962" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel vs Real: Final steps]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-final-steps-68ffb8e78d50?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/68ffb8e78d50</guid>
            <category><![CDATA[random-forest-classifiers]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Tue, 30 May 2023 18:21:22 GMT</pubDate>
            <atom:updated>2023-05-30T18:21:22.514Z</atom:updated>
            <content:encoded><![CDATA[<p>The last steps for fake news detection involve using the trained model to make predictions on new, unseen news articles and taking necessary actions based on the predictions. Here are the final steps:</p><p>1. <strong>Preprocessing of New Data</strong>: Similar to the preprocessing step during model training, any new, unseen news articles need to be preprocessed by cleaning and normalizing the text, removing irrelevant information, and converting it into numerical features that can be understood by the model.</p><p>2. <strong>Applying the Trained Model</strong>: Use the trained model to make predictions on the preprocessed new data. The model will classify the news articles as either real or fake based on the learned patterns and relationships.</p><p>3. <strong>Interpreting the Predictions</strong>: Examine the predictions made by the model. For each news article, the model will assign a probability or confidence score indicating the likelihood of it being fake or real. Based on these predictions, appropriate actions can be taken. For example, articles with a high probability of being fake can be flagged for further investigation or subjected to additional scrutiny before sharing or publishing.</p><p>4. <strong>Monitoring and Feedback</strong>: Continuously monitor the performance of the fake news detection system and gather feedback from the predictions and actions taken. This feedback can be used to refine and improve the model, update the training data, or incorporate new features or techniques to enhance the accuracy and effectiveness of the system.</p><p>Random Forest is often considered one of the best algorithms for fake news detection due to its strengths in handling complex data and mitigating overfitting. Here are a few reasons why Random Forest is well-suited for this task:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/0*HHxMOT7TuSOhA-j1.png" /></figure><p>1. <strong>Ensemble of Decision Trees</strong>: Random Forest is an ensemble learning method that combines multiple decision trees. Each decision tree learns different patterns from the data, and their predictions are averaged or aggregated to make the final prediction. This ensemble approach helps to improve the model’s generalization ability and reduce the risk of overfitting.</p><p>2.<strong> Handling Nonlinear Relationships</strong>: Fake news detection often involves identifying complex patterns and nonlinear relationships between textual features and the authenticity of news articles. Random Forest can capture these nonlinear relationships effectively, as each decision tree can learn different combinations of features and their interactions.</p><p>3. <strong>Feature Importance</strong>: Random Forest provides a measure of feature importance, which indicates the relevance of each feature in the classification task. This information can help identify the most informative features for distinguishing between real and fake news. It assists in understanding the underlying characteristics of fake news articles and can guide feature selection or extraction efforts.</p><p>4. <strong>Robust to Noise and Outliers</strong>: Random Forest is robust to noise and outliers in the data. Outliers or irrelevant features in the dataset are less likely to affect the overall performance of the model due to the ensemble nature of Random Forest. It reduces the impact of individual noisy or irrelevant data points, leading to more robust predictions.</p><p>5. <strong>Parallelization</strong>: Random Forest can be trained in parallel, making it computationally efficient and scalable. The training process can take advantage of multi-core processors or distributed computing frameworks, allowing for faster model training on large datasets.</p><p>While Random Forest is a powerful algorithm, it’s important to note that the effectiveness of any algorithm depends on the quality and representativeness of the training data, appropriate preprocessing techniques, and other factors specific to the fake news detection task. It’s always advisable to experiment with different algorithms and evaluate their performance on the specific dataset to determine the best approach.</p><p>It’s important to note that fake news detection is an ongoing challenge, and the fight against fake news requires a combination of technological solutions, media literacy, and critical thinking. The last steps focus on the deployment and monitoring of the model to provide an initial detection mechanism, but it’s essential to stay updated with emerging trends and adapt the system to address new tactics employed in spreading fake news. Continuous improvement and adaptation are key to combating the spread of misinformation and promoting a more informed society.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68ffb8e78d50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel vs Real: Model training]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-model-training-8d94a9e86870?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d94a9e86870</guid>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[train-test-split]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[model-training]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Tue, 30 May 2023 18:07:37 GMT</pubDate>
            <atom:updated>2023-05-30T18:07:37.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CSlZq4sXlbTHcCS9.jpeg" /><figcaption>Model training</figcaption></figure><p>Model training for fake news detection involves the process of training a machine learning model to learn patterns and make predictions about the authenticity of news articles. The first step is to acquire a labeled dataset of news articles, where each article is associated with a binary label indicating whether it is real or fake news. The data is then preprocessed by cleaning and normalizing the text, removing irrelevant information, and converting it into numerical features. The dataset is split into training and testing sets, with the training set used to train the model and the testing set used to evaluate its performance.</p><p>Next, a suitable machine learning algorithm is selected, such as Random Forest, Naive Bayes, Support Vector Machines, or deep learning models like Convolutional Neural Networks or Recurrent Neural Networks. The model is trained using the training set, where it learns the patterns and relationships between the features and labels in the data. After training, the model’s performance is evaluated using metrics like accuracy, precision, recall, and F1-score, to assess its ability to classify fake and real news articles accurately.</p><p>To improve the model’s performance, hyperparameter tuning can be performed by adjusting parameters such as learning rate, regularization strength, or the number of trees in a Random Forest. Fine-tuning these hyperparameters can help optimize the model’s performance on the specific task of fake news detection. Once the model achieves satisfactory performance, it can be deployed to predict the authenticity of new, unseen news articles, providing a valuable tool for combating the spread of fake news.</p><p>Continuous evaluation and refinement of the model are essential to adapt to evolving patterns and tactics used in spreading fake news. Monitoring the model’s performance and incorporating new techniques or data sources can help maintain its accuracy and effectiveness over time. Additionally, it’s crucial to stay updated with the latest research and advancements in the field of fake news detection to improve the model’s capabilities and address new challenges that may arise.</p><ul><li><strong>Train-Test Split</strong>: Split the preprocessed dataset into training and testing sets. Typically, around 70–80% of the data is used for training, and the remaining portion is used for testing the model’s performance.</li></ul><p>Following is a sample code of train test split and model training of the data for fake news detection</p><p>import pandas as pd<br>from sklearn.feature_extraction.text import TfidfVectorizer<br>from sklearn.ensemble import RandomForestClassifier<br>from sklearn.model_selection import train_test_split<br>from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score</p><p><em># Load the dataset (assuming the dataset is in a CSV file)</em><br>data = pd.read_csv(‘fake_news_dataset.csv’)</p><p><em># Split the dataset into features (X) and labels (y)</em><br>X = data[‘text’] # Textual content of the news articles<br>y = data[‘label’] # Binary labels: 0 for real news, 1 for fake news</p><p><em># Perform train-test split</em><br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)</p><p><em># Create an instance of TfidfVectorizer</em><br>vectorizer = TfidfVectorizer()</p><p><em># Fit and transform the training set</em><br>X_train_tfidf = vectorizer.fit_transform(X_train)</p><p><em># Transform the test set</em><br>X_test_tfidf = vectorizer.transform(X_test)</p><p><em># Create an instance of RandomForestClassifier</em><br>random_forest = RandomForestClassifier()</p><p><em># Train the model on the training set</em><br>random_forest.fit(X_train_tfidf, y_train)</p><p><em># Make predictions on the test set</em><br>y_pred = random_forest.predict(X_test_tfidf)</p><p><em># Evaluate the model</em><br>accuracy = accuracy_score(y_test, y_pred)<br>precision = precision_score(y_test, y_pred)<br>recall = recall_score(y_test, y_pred)<br>f1 = f1_score(y_test, y_pred)</p><p><em># Print the evaluation metrics</em><br>print(“Accuracy:”, accuracy)<br>print(“Precision:”, precision)<br>print(“Recall:”, recall)<br>print(“F1-score:”, f1)</p><p>Next, a TfidfVectorizer instance is created and fitted on the training set to transform the textual data into TF-IDF feature vectors. The same vectorizer is then used to transform the test set.</p><p>After that, an instance of RandomForestClassifier is created, and the model is trained on the training set using the fit() function. Predictions are made on the test set using the predict() function.</p><p>Finally, the model’s performance is evaluated using accuracy, precision, recall, and F1-score metrics calculated with the help of functions from scikit-learn’s metrics module.</p><p>The code was a simple example of implementation of fake news detection using Random forest classifier. Just like that we found the accuracy, precision, recall and F1 score of random forest, logistic regression and Gradient boosting algorithm. And found out that the Random forest algorithm gives the most accurate results.</p><p>That’s all for today folks lets discuss the next part in the next blog. Till then stay tuned!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d94a9e86870" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel vs Real: Feature extraction]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-feature-extraction-e4d4a69280cf?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4d4a69280cf</guid>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[regex]]></category>
            <category><![CDATA[tf-idf]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Mon, 29 May 2023 18:13:51 GMT</pubDate>
            <atom:updated>2023-05-29T18:13:51.053Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Feature Extraction</strong></h4><p>Here are two feature extraction techniques I have used in my project of fake news detection system.</p><h3>1) Term Frequency-Inverse Document Frequency</h3><p>Extract relevant features from the preprocessed text using the TF-IDF (Term Frequency-Inverse Document Frequency) technique. TF-IDF assigns weights to words based on their frequency in a document and inversely to their frequency in the entire corpus. This step involves the following:</p><ul><li>a. Create a TF-IDF matrix representing the corpus, where each row corresponds to a document (news article) and each column corresponds to a unique word in the corpus.</li><li>b. Compute the TF-IDF score for each word in the corpus based on its frequency in the document and the inverse frequency in the corpus.</li><li>c. Normalize the TF-IDF matrix to have values between 0 and 1.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*BAgG2c2vs6rIMxHbdMhzsg.png" /><figcaption>Simple example of TF-IDF and bag of words</figcaption></figure><ul><li><strong>Term Frequency (TF)</strong>: Term Frequency measures the frequency of a term in a document. It calculates the ratio of the number of times a term appears in a document to the total number of terms in that document. TF is represented as:</li></ul><p>TF(term, document) = (Number of occurrences of the term in the document) / (Total number of terms in the document)</p><ul><li><strong>Inverse Document Frequency (IDF)</strong>: Inverse Document Frequency measures the rarity of a term across the entire corpus. It is calculated as the logarithm of the total number of documents divided by the number of documents containing the term. IDF is represented as:</li></ul><p>IDF(term) = log((Total number of documents) / (Number of documents containing the term))</p><ul><li><strong>TF-IDF Calculation</strong>: The TF-IDF score for a term in a document is obtained by multiplying the term frequency (TF) with the inverse document frequency (IDF):</li></ul><p>TF-IDF(term, document) = TF(term, document) * IDF(term)</p><h3>2) REGEX</h3><p>Regex, short for regular expression, is a powerful tool used for pattern matching and searching within text data. It consists of a sequence of characters that define a search pattern, allowing you to search for specific patterns or strings of characters in a text.</p><p>Regex provides a concise and flexible way to search, extract, and manipulate text based on specific patterns. It is commonly used in various programming languages and text editors for tasks such as data validation, text parsing, and pattern matching.</p><p>Here are some common components and special characters used in regex:</p><p><strong>Literals</strong>: Regular characters match themselves. For example, the regex pattern “abc” matches the exact sequence “abc” in the text.</p><p><strong>Character Classes</strong>: Square brackets [] are used to define a character class. For example, the pattern “[aeiou]” matches any single lowercase vowel.</p><p><strong>Quantifiers</strong>: Quantifiers specify how many times a preceding character or group should occur. Some common quantifiers are:</p><ul><li>“*” matches zero or more occurrences of the preceding character or group.</li><li>“+” matches one or more occurrences of the preceding character or group.</li><li>“?” matches zero or one occurrence of the preceding character or group.</li><li>“{n}” matches exactly n occurrences of the preceding character or group.</li><li>“{n, m}” matches at least n and at most m occurrences of the preceding character or group.</li></ul><p><strong>Special Characters</strong>: Some special characters have a predefined meaning in regex:</p><ul><li>“.” matches any single character except a newline character.</li><li>“^” matches the start of a line or string.</li><li>“$” matches the end of a line or string.</li><li>“\d” matches any digit (0–9).</li><li>“\w” matches any alphanumeric character.</li><li>“\s” matches any whitespace character.</li><li>“\b” matches a word boundary.</li></ul><p><strong>Grouping and Alternation</strong>: Parentheses () are used to group characters or sub patterns. The “|” character denotes alternation, where either the expression before or after the “|” is matched. For example, the pattern “(cat|dog)” matches either “cat” or “dog”.</p><p><strong>Anchors</strong>: Anchors are used to match a specific position within the text. Some common anchors are:</p><ul><li>“\b” matches a word boundary.</li><li>“^” matches the start of a line or string.</li><li>“$” matches the end of a line or string.</li></ul><p>Now, let’s see an example implementation of regex for fake news detection:</p><p>import re</p><p><em># Example pattern to detect exaggerated claims</em><br>pattern = r”(exaggerated|unbelievable|impossible)”</p><p><em># Sample text</em><br>text = “This article presents an exaggerated claim about the benefits of a new product.”</p><p><em># Matching the pattern in the text</em><br>matches = re.findall(pattern, text, flags=re.IGNORECASE)</p><p><em># Printing the matches</em><br>print(matches)</p><p>In the above example, we define a pattern using the regex string “exaggerated|unbelievable|impossible”. This pattern searches for any occurrence of the words “exaggerated”, “unbelievable”, or “impossible” (ignoring case) in the given text. The re.findall() function is used to find all matches of the pattern in the text. In this case, it would print [&#39;exaggerated&#39;].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*hUNgl3v8frvRZgFLrx4Tww.png" /><figcaption>Regex</figcaption></figure><p>In conclusion, both regex and TF-IDF are valuable techniques used in fake news detection:</p><p>Regex is useful for pattern matching and identifying specific phrases, keywords, or patterns that are indicative of fake news. It allows for the detection of suspicious claims, exaggerated statements, or misleading information commonly found in fake news articles. By defining and applying regex patterns, it becomes possible to flag or filter out articles that exhibit such patterns, aiding in the identification of potentially fake news.</p><p>TF-IDF, on the other hand, focuses on measuring the importance of terms within a document and across a corpus. It provides a numerical representation of the significance of each term in differentiating between real and fake news. By assigning higher weights to terms that are frequent in a document but rare in the entire corpus, TF-IDF helps to identify terms that are more characteristic of either real or fake news articles.</p><p>By combining both regex and TF-IDF, a more robust and accurate fake news detection system can be built. Regex can capture specific patterns or phrases associated with fake news, while TF-IDF can highlight the most important and discriminative terms in differentiating between real and fake news. Together, these techniques can contribute to the development of a comprehensive fake news detection model.</p><p>However, it’s important to note that fake news detection is a complex problem, and neither regex nor TF-IDF alone can guarantee perfect accuracy. The effectiveness of these techniques depends on the quality of the dataset, the patterns identified, and the selection of relevant features. Additional machine learning algorithms and natural language processing techniques can be combined with regex and TF-IDF to further enhance the accuracy and performance of fake news detection systems. Continuous evaluation, refinement, and the incorporation of new techniques are necessary to keep pace with evolving tactics used in spreading fake news.</p><p>That’s all for this blog folks stay tuned for the next blog!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4d4a69280cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel vs Real: Dataset and data preprocessing]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-dataset-and-data-preprocessing-642ad951ee88?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/642ad951ee88</guid>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-pre-processing]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Mon, 29 May 2023 17:53:59 GMT</pubDate>
            <atom:updated>2023-05-29T17:53:59.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*36-OrWU1zF58Wzz0ll82Tw.png" /></figure><h3><strong>DATASET</strong></h3><p>Collect a dataset that consists of labeled news articles, where each article is tagged as either “fake” or “real.” There are various sources available online that provide labeled datasets for fake news detection.</p><p>The first step I took while starting the project was finding a good dataset.The dataset used in this study is commonly known as the real and fake news Dataset, was acquired through the Kaggle platform. The real and fake news dataset is used to train and test the models. 4 features, 47006 records, and one column that tells if a news is fake or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*gzjDtagRIVNnd647wUGqkA.png" /><figcaption>Fake news dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kk1us9N81I9KSlazjoYlVw.png" /><figcaption>Real news dataset</figcaption></figure><h3><strong>DATA PRE-PROCESSING</strong></h3><p>Clean and preprocess the collected dataset to remove any irrelevant information and noise. Perform the following steps:</p><p>a. Remove any HTML tags, special characters, and punctuation from the text.</p><p>b. Convert the text to lowercase to ensure consistency.</p><p>c. Tokenize the text into individual words or phrases.</p><p>d. Remove stop words (commonly used words that do not add much meaning) from the text, such as “the,” “is,” “a,” etc.</p><p>e. Perform stemming or lemmatization to reduce words to their root form. This helps in reducing the vocabulary size and capturing the essence of words.</p><p>f. Out of 47006 records 10 records had the missing values. • All the missing values are eliminated from the dataset.</p><p>g. There were no null values present. Using label encoding, features are scaled to translate string characteristics with only two potential unique values into values 0 and 1, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*c1hg2ijW-jJMBdiIgiXzHQ.png" /><figcaption>After preprocessing the dataset</figcaption></figure><p>In conclusion, the dataset and data preprocessing are crucial steps in fake news detection. The quality and cleanliness of the dataset greatly impact the performance of the machine learning model. Similarly, effective data preprocessing techniques help in extracting relevant features and reducing noise from the text data.</p><p>When it comes to the dataset, it’s essential to have a well-labeled and balanced collection of real and fake news articles. This ensures that the model learns from diverse examples and can generalize well to unseen data. Care should be taken to obtain the dataset from reliable sources or through careful manual annotation.</p><p>Data preprocessing plays a vital role in preparing the text data for analysis. It involves cleaning the text by removing HTML tags, special characters, and punctuation. Lowercasing the text helps in maintaining consistency, and tokenization breaks the text into individual words or phrases. Removing stop words reduces noise, and stemming or lemmatization helps in reducing the vocabulary size.</p><p>Additionally, the use of techniques like TF-IDF for feature extraction allows capturing the importance of words in differentiating between real and fake news. Feature selection helps in reducing the dimensionality of the dataset and improving the model’s performance by selecting the most informative features.</p><p>Furthermore, incorporating regular expressions (regex) can enhance the detection of fake news by capturing specific patterns or keywords commonly found in misleading or false information. Regex patterns can be developed to identify suspicious phrases, exaggerated claims, or other indicators of fake news.</p><p>Overall, the quality of the dataset and the effectiveness of the data preprocessing techniques greatly influence the accuracy and reliability of the fake news detection model. It is important to continuously evaluate and iterate on the dataset and preprocessing steps to improve the model’s performance and stay up-to-date with emerging trends in fake news.</p><p>That’s all about dataset and data preprocessing we will talk about the next steps in our next blog of reel vs real.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=642ad951ee88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel VS Real: ML Algorithms Part 5]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-ml-algorithms-part-5-dd0460598a20?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd0460598a20</guid>
            <category><![CDATA[false-news-detection]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[fake-news-detection]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 23:14:57 GMT</pubDate>
            <atom:updated>2023-04-25T23:14:57.018Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Machine learning algorithms used in fake news detection</strong></p><p>Hello Folks today we are going to discuss about neural networks.<strong><br></strong>Neural networks are a type of machine learning algorithm that are designed to mimic the way the human brain works. They are composed of layers of interconnected nodes (neurons) that process and transmit information.</p><p>Each neuron receives input signals, processes them, and then sends output signals to other neurons in the network. The neurons are organized into layers, with each layer performing a different type of processing on the input data. The output of one layer is fed as input to the next layer until the final output is produced.</p><p>During training, the weights and biases of the connections between the neurons are adjusted to minimize the error between the predicted output and the actual output. This process is repeated many times until the network learns to accurately classify the input data.</p><p>Neural networks are powerful algorithms that can be used for a variety of tasks, including image recognition, natural language processing, and classification. They can handle large amounts of data and can automatically extract features from the input data without requiring manual feature engineering.</p><p>However, neural networks can be computationally expensive to train and require large amounts of data. They can also be prone to overfitting, where the network performs well on the training data but poorly on new, unseen data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*Al2kjYokf8Fy9SVmXMHZ8Q.png" /></figure><p>Neural networks can be used for fake news detection by learning patterns in the data that distinguish real news from fake news. In the context of fake news detection, a neural network would take in the input data, such as the text of a news article, and output a prediction of whether the article is real or fake.</p><p>The neural network would be trained on a large dataset of labeled news articles, where each article is labeled as real or fake. During training, the network adjusts the weights and biases of its connections to minimize the error between the predicted output and the actual output.</p><p>One way to use a neural network for fake news detection is to treat it as a binary classification problem, where the goal is to classify each article as either real or fake. The input features for the neural network could include word frequency, readability, source credibility, and other linguistic patterns.</p><p>Another approach is to use a neural network to score the trustworthiness of news sources. The neural network would be trained on a dataset of news sources, and would output a score that reflects how trustworthy each source is. This score could be used as a feature in other machine learning algorithms for fake news detection.</p><p>Neural networks have been shown to be effective in many applications of natural language processing, including sentiment analysis and text classification, which makes them a promising approach for fake news detection. However, neural networks can be computationally expensive to train and require large amounts of data. Careful attention should be paid to issues such as overfitting and the selection of appropriate hyperparameters when using neural networks for fake news detection.</p><p>This was all about neural networks. Next blog will be out soon. Till then Stay tuned folks!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd0460598a20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel VS Real: Ml Algorithms Part 4]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-ml-algorithms-part-4-92c5b6868ae6?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/92c5b6868ae6</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[naive-bayes-classifier]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 22:48:48 GMT</pubDate>
            <atom:updated>2023-04-25T22:48:48.278Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Machine learning algorithms used in Fake news detection</strong></p><p>In this blog we will discuss one more algorithm that helps us with our project. The algorithm is Naive Bayes algorithm.</p><p>Naive Bayes is a simple and popular algorithm used for classification tasks in machine learning. It is based on Bayes’ theorem, which is a probability theorem used to calculate the likelihood of a hypothesis given some evidence.</p><p>Naive Bayes assumes that the probability of each input feature is independent of the others, which is a naive assumption but often works well in practice. The algorithm works by calculating the probability of each class (real or fake news) given the input features, and then selecting the class with the highest probability as the predicted class.</p><p>For example, let’s say we want to classify a news article as either real or fake based on the words used in the article. Naive Bayes would calculate the probability of the article belonging to each class based on the frequency of each word in the article. The algorithm would assume that the probability of each word appearing in the article is independent of the other words, even though this may not be entirely true.</p><p>Despite its naive assumption, Naive Bayes is often used in text classification tasks, including fake news detection, and has been shown to be effective in many cases. It is also a computationally efficient algorithm that can be trained quickly on large datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*kjE5ARNmrABOWZnHe3ilXg.png" /><figcaption>Naive Bayes Algorithm</figcaption></figure><p>Naive Bayes is a commonly used algorithm for fake news detection. In the context of fake news detection, Naive Bayes can be used to classify news articles as either real or fake based on a set of input features, such as word frequency, readability, source credibility, and other linguistic patterns.</p><p>Naive Bayes works by calculating the probability of each class (real or fake news) given the input features, using Bayes’ theorem. The algorithm assumes that the input features are independent of each other, even though this may not always be true. Despite this naive assumption, Naive Bayes has been shown to be effective in many cases of fake news detection.</p><p>The algorithm is computationally efficient and can be trained quickly on large datasets. It can also handle high-dimensional feature spaces, which is useful in text classification tasks where there are many possible features.</p><p>In practice, Naive Bayes can be used in combination with other machine learning algorithms, such as SVM or decision trees, to improve accuracy and reduce overfitting. Overall, Naive Bayes is a powerful and widely used algorithm for fake news detection, and can help prevent the spread of misinformation.</p><p>In the upcoming blog we will discuss more algorithms. Till the stay tuned Folks!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92c5b6868ae6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel VS Real: ML Algorithms Part 3]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-ml-algorithms-part-3-706318d5cd24?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/706318d5cd24</guid>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[support-vector-machine]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 22:40:49 GMT</pubDate>
            <atom:updated>2023-04-25T22:40:49.941Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Machine learning algorithms used in Fake news detection</strong></p><p>Hello Folks!! In the past blogs we have understood three machine learning algorithms. In this blog we will study one more algorithm named Support vector machine.</p><p>Support Vector Machines (SVM) is a machine learning algorithm that can be used for classification tasks. The goal of SVM is to find a boundary, called a hyperplane, that separates the different classes of data points as best as possible.</p><p>In other words, SVM tries to find a line, plane, or hyperplane in a high-dimensional space that best divides the data into two groups. The data points closest to the hyperplane are called support vectors, and the distance between the hyperplane and the support vectors is maximized, creating a wide margin between the two classes.</p><p>The advantage of SVM is that it can work well with both linearly separable data and non-linear data, by transforming the input features into a higher-dimensional space where the data becomes separable. SVM also has the ability to handle noisy data and outliers, making it a robust algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*nJsWEurSVWW_3tbnpgwNbw.png" /><figcaption>Support vector machine</figcaption></figure><p>Support Vector Machines (SVM) can be used for fake news detection by classifying news articles as either real or fake based on a set of input features. The input features can include various textual and metadata-based features of the article such as word frequency, readability, source credibility, sentiment analysis, and other linguistic patterns.</p><p>SVM works by finding the hyperplane that best separates the two classes of data points (real news and fake news) based on the input features. The goal of SVM is to maximize the margin between the hyperplane and the support vectors (data points closest to the hyperplane) while minimizing the classification error.</p><p>In the context of fake news detection, SVM can be trained on a dataset of labeled news articles to learn the patterns and characteristics of real and fake news. Once trained, the SVM model can be used to classify new news articles as either real or fake.</p><p>SVM has been shown to be an effective algorithm for fake news detection, achieving high accuracy rates in various studies and competitions. SVM can also be combined with other machine learning algorithms, such as decision trees or random forests, to improve accuracy and reduce overfitting.</p><p>In the future blogs we are going to study some more machine learning algorithms used in fake news detection. Till then stay tuned folks!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=706318d5cd24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel VS Real: ML Algorithms Part 2]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-ml-algorithms-part-2-bb33763eb740?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb33763eb740</guid>
            <category><![CDATA[decision-tree]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fake-news-detection]]></category>
            <category><![CDATA[false-news-detection]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Mon, 24 Apr 2023 18:27:39 GMT</pubDate>
            <atom:updated>2023-04-24T18:27:39.069Z</atom:updated>
            <content:encoded><![CDATA[<h4>Machine learning Algorithms used in Fake news detection</h4><p>In the Part 1 of the blog we discussed two machine learning algorithms namely logistic regression and Decision trees and how they can be used in fake news detection. In Part 2 we are going to study one more algorithm that can be used for fake news detection.</p><p>Random forest is a machine learning algorithm that can be used for classification, regression, and other tasks. It is an extension of decision trees, where a collection of decision trees is trained on randomly selected subsets of the input data and the output is determined by combining the predictions of each tree.</p><p>In a random forest, each decision tree is trained on a random subset of the input features and a random subset of the input data. This randomness helps to reduce overfitting, which is when the model fits too closely to the training data and performs poorly on new, unseen data.</p><p>Once the decision trees are trained, the output for new, unseen data points is determined by aggregating the predictions of all the trees. In a classification task, the output is determined by taking the majority vote of the predictions of each tree. In a regression task, the output is determined by taking the average of the predictions of each tree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*ZFEwIqawcaVn9Ifs-BqJqA.png" /><figcaption>Decision Tree Algorithm</figcaption></figure><p>Random forest algorithm is particularly well-suited to fake news detection because it can handle high-dimensional data with many input features. This is important because there may be many different characteristics of news articles that can indicate whether they are real or fake, such as the language used, the sources cited, and the tone of the article.</p><p>Overall, random forest algorithm is a powerful and versatile algorithm that can be used to build a highly accurate fake news detection system. By using this algorithm, it is possible to automatically detect fake news articles and help prevent the spread of misinformation.</p><p>Here are some facts about Decision Trees:</p><ol><li>Decision trees are simple and interpretable. They provide a visual representation of the decision-making process, which can be easily understood by humans.</li><li>Decision trees can handle both categorical and numerical data, making them versatile for a wide range of tasks.</li><li>Decision trees can handle missing values by using surrogate splits, which are alternative splits that provide similar information gain.</li><li>Decision trees can be used for both classification and regression tasks.</li><li>Decision trees are prone to overfitting, which occurs when the model fits too closely to the training data and performs poorly on new, unseen data.</li><li>Decision trees can be improved by using techniques such as pruning, which removes branches that are not useful or that may lead to overfitting.</li><li>Decision trees can be used as the basis for more complex algorithms such as random forests, which combine multiple decision trees to improve accuracy and reduce overfitting.</li></ol><p>So this was all about decision trees in the next blog we will talk about some more machine learning algorithms related to fake news detection system. Till the stay tuned Folks!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb33763eb740" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reel VS Real: ML Algorithms Part 1]]></title>
            <link>https://medium.com/@mpdeshpande/reel-vs-real-ml-algorithms-part-1-c2843d2f30de?source=rss-99aa8f72dfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2843d2f30de</guid>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[decision-tree]]></category>
            <category><![CDATA[fake-news-detection]]></category>
            <dc:creator><![CDATA[Manasi Deshpande]]></dc:creator>
            <pubDate>Sun, 23 Apr 2023 18:25:31 GMT</pubDate>
            <atom:updated>2023-04-23T18:25:31.623Z</atom:updated>
            <content:encoded><![CDATA[<h4>Algorithms used for Fake news detection</h4><p>Hello Folks!! In the last blog we talked about all the existing research on Fake news detection so in this blog we are going to discuss various Machine learning techniques that can be used to in our project so after discussing all the algorithms we will determine which algorithm works better for our project.</p><p>In the Part 1 of ML algorithms we are going to understand two Machine learning algorithms namely</p><ol><li>Logistic Regression</li><li>Decision trees</li></ol><h3>Logistic Regression</h3><p>Logistic regression is a type of machine learning algorithm used for binary classification tasks. In binary classification, the goal is to predict one of two possible outcomes based on a set of input features.</p><p>Logistic regression works by fitting a line (or a hyperplane in higher dimensions) that separates the two classes of data points in the input feature space. It then applies a logistic function (also known as a sigmoid function) to the output of the linear model to map it to a probability value between 0 and 1.</p><p>The logistic function takes the output of the linear model as input and squashes it into the range [0,1]. This probability value represents the likelihood that the input data belongs to one of the two classes.</p><p>In the context of fake news detection, logistic regression can be trained on a dataset of labeled news articles, with each article labeled as either real or fake. The input features could be various characteristics of the article, such as the language used, the sources cited, the tone of the article, and so on.</p><p>Logistic regression works by fitting a linear model to the input features and applying a logistic function to the output. The logistic function maps the output of the linear model to a probability value between 0 and 1, representing the probability that the article is fake.</p><p>Once the logistic regression model is trained, it can be used to predict the probability that new, unseen news articles are fake. If the predicted probability is above a certain threshold, the article can be classified as fake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*y4C66xKccaIO833Gk_jHiw.png" /><figcaption>Logistic regression</figcaption></figure><p>One advantage of logistic regression is that it is a simple and interpretable model, which can help with understanding which input features are most important for fake news detection. However, logistic regression may not be as powerful as more complex algorithms such as neural networks or random forests, especially if the input features are highly nonlinear or complex.</p><p>In summary, logistic regression is a useful algorithm for fake news detection, particularly if interpretability and simplicity are important considerations.</p><h3>Decision tree</h3><p>A decision tree is a machine learning algorithm that can be used for classification and regression tasks. The algorithm works by recursively partitioning the input data into smaller subsets based on a series of binary decisions, ultimately leading to a prediction.</p><p>In a decision tree, the input features are used to split the data at each node of the tree. The feature that provides the most information gain, or the most useful information, is chosen as the split point. The process is repeated recursively until a stopping criterion is met (e.g., the maximum depth of the tree is reached).</p><p>Once the decision tree is trained, it can be used to predict the output for new, unseen data points by traversing the tree based on the values of the input features. The final prediction is based on the leaf node that is reached by the traversal.</p><p>Given below is a simple example of Decision tree</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*26Nam-g18nZwdf67_g4UyA.png" /><figcaption>Decision tree algorithm</figcaption></figure><p>In the context of fake news detection, decision trees can be trained on a dataset of labeled news articles, with each article labeled as either real or fake. The input features could be various characteristics of the article, such as the language used, the sources cited, the tone of the article, and so on.</p><p>The decision tree algorithm works by selecting the most informative feature to split the data at each node of the tree. This process is repeated recursively until the data is fully partitioned, or until a stopping criterion is met (e.g., the maximum depth of the tree is reached).</p><p>Once the decision tree is trained, it can be used to predict the label of new, unseen news articles by traversing the tree based on the values of the input features. The final prediction is based on the leaf node that is reached by the traversal.</p><p>One advantage of decision trees is that they can be easily interpreted, as the tree structure and the feature importance measures can provide insights into which input features are most important for fake news detection. However, decision trees may not be as powerful as more complex algorithms such as neural networks or random forests, especially if the input features are highly nonlinear or complex.</p><p>In summary, decision trees are a useful algorithm for fake news detection, particularly if interpretability and simplicity are important considerations.</p><p>In this blog we have discussed 2 Machine learning algorithms in the further blogs we are going to understand some more algorithms. Till the stay tuned folks!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2843d2f30de" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>