Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panchadip 128 patch 1 1 #1487

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

Panchadip-128
Copy link
Contributor

@Panchadip-128 Panchadip-128 commented Oct 18, 2024

Issue #1783 solved
Created a Fake News Detection system using machine learning algorithms like Logistic Regression, Decision Tree, Gradient Boosting, and Random Forest. The dataset consists of real and fake news articles, and we have applied preprocessing, feature extraction using TF-IDF, and trained several models

Description:

Summary of the fake news detection project:

Libraries: Various Python libraries are used, including pandas for data manipulation, matplotlib and seaborn for visualization, re and string for text preprocessing, and scikit-learn for machine learning.

Data Loading: The fake and true news datasets are loaded from CSV files (Fake.csv and True.csv). The datasets are combined, with a "class" column added (0 for fake news, 1 for true news).

Data Preprocessing:

Unnecessary columns (title, subject, date) are dropped.
Text data is cleaned by converting it to lowercase, removing special characters, URLs, and numbers.
The dataset is shuffled and split into training and testing sets.
Feature Extraction: The text is converted into numerical representations using the TfidfVectorizer to transform the text into term frequency-inverse document frequency (TF-IDF) vectors.

Machine Learning Models:

Logistic Regression: Achieved an accuracy of 98.78%.
Decision Tree Classifier: Achieved an accuracy of 99.53%.
Gradient Boosting Classifier: Achieved an accuracy of 99.44%.
Random Forest Classifier: Achieved an accuracy of 98.69%.
Model Evaluation: Precision, recall, f1-score, and accuracy are calculated for each model using the test dataset. All models perform well, with accuracy close to 99%.

The project demonstrates a successful implementation of multiple machine learning models for detecting fake news based on text data, with Decision Tree and Gradient Boosting performing the best.

Fixes # (issue)

Type of change

  • Added a new machine learning frameworks, libraries or software.- Yes
  • Documentation update- Yes

Checklist:

  • My code follows the style guidelines of this project - Yes
  • I have performed a self-review of my own code- Yes
  • I have commented my code, particularly in hard-to-understand areas - Yes
  • I have made corresponding changes to the documentation- Yes
  • My changes generate no new warnings- Yes

Issue #1783
Created a Fake news Detection AI Model, using machine learning algorithms like Logistic Regression, Decision Tree, Gradient Boosting, and Random Forest. The dataset consists of real and fake news articles, and you've applied preprocessing, feature extraction using TF-IDF, and trained several models
Issue #1783 solved
Created a Fake News Detection system using machine learning algorithms like Logistic Regression, Decision Tree, Gradient Boosting, and Random Forest. The dataset consists of real and fake news articles, and we have applied preprocessing, feature extraction using TF-IDF, and trained several models
Copy link

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@sanjay-kv sanjay-kv merged commit ead412f into recodehive:main Oct 21, 2024
1 check passed
@Panchadip-128 Panchadip-128 deleted the Panchadip-128-patch-1-1 branch October 21, 2024 18:35
@Panchadip-128
Copy link
Contributor Author

@sanjay-kv Sir, i didnt receieve any points for this merge as well. Please review once . Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants