<jupyter_start><jupyter_text>Fake news Detection  Fake news refers to misinformation or disinformation spread through word of mouth,media or digital channels such as edited videos/pics,memes,unverified sources and social media rumours or deep fake videos. Fake news has become a serious problem with potential of resulting in mob violence, public shame or any kind of social stigma. Or even propaganda like favouring politicians in elections or spreading inflammatory messages of terrorists,crimes etc Many examples  are there in the past and currently .The problem statement dataset has been taken from kaggle Dataset :https://www.kaggle.com/pnkjgpt/fake-news-dataset  Data science project DocumentationThe Data Science Method1.Problem Identification2.Data Wrangling* Data Collection    - Locating the data    - Data loading    - Data joining* Data Organization    - File structure    - Git & Github* Data Definition    * Column names    - Data types (numeric, categorical, timestamp, etc.)    - Description of the columns    - Count or percent per unique values or codes (including NA)    - The range of values or codes* Data Cleaning    * NA or missing data    - Duplicates3.Exploratory Data Analysis- Build data profile tables and plots- Outliers & Anomalies- Explore data relationships- Identification and creation of features4.Pre-processing and Training Data Development- Create dummy or indicator features for categorical variables- Standardize the magnitude of numeric features- Split into testing and training datasets- Apply scaler to the testing set5.Modeling- Fit Models with Training Data Set- Review Model Outcomes — Iterate over additional models as needed.- Identify the Final Model6.Documentation - Review the Results- Present and share your findings - storytelling- Finalize Code- Finalize Documentation  1.Problem Identification  To predict whether a news is fake or real  2.Data Wrangling  2.1 Import required libraries<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns<jupyter_output><empty_output><jupyter_text>2.2 Data Collection- Locating the data- Data loading- Data joining<jupyter_code>##locate /explore  the datasets
fake_news_data = pd.read_csv("datasets/train.csv")
fake_news_data.info()
fake_news_data.shape
fake_news_data.head(10)
fake_news_data.head(2).T
fake_news_data.describe()
fake_news_data.isna().sum()
fake_news_data.title.value_counts()
fake_news_data.class.value_counts()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.05398967844382691, 'fraction_numerical': 0.0059547439460103215, 'mean_word_length': 5.028708133971292, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '389270', 'license': 'MIT', 'n_tokens_mistral': 665, 'n_tokens_neox': 636, 'n_words': 286, 'path': 'NLP/Fake News/.ipynb_checkpoints/Fake News detection-checkpoint.ipynb', 'repo_name': 'sanapple9631/datascienceprojects', 'size': '2519'}