CodeClauseInternship_Fake_News_Detector

所属分类:数学计算
开发工具:Jupyter Notebook
文件大小:0KB
下载次数:0
上传日期:2023-12-16 14:44:10
上 传 者sh-1993
说明:  假新闻检测器项目利用数据科学和机器学习来区分假新闻和真新闻。正在使用数据...
(The Fake News Detector project employs data science and machine learning to distinguish between fake and true news articles. Utilizing datasets, it applies Logistic Regression, Decision Tree, Gradient Boosting, and Random Forest models, achieving high accuracies (e.g., 99.55%).)

# Fake News Detector using Data Science and Machine learning # Dataset Information
  • Two datasets: df_fake and df_true.
  • Columns: 'title', 'text', 'subject', 'date', 'class'.
  • Additional column 'class': 0 for fake, 1 for true. # Data Preparation
  • Removed the last 10 rows for manual testing from both datasets.
  • Merged manual testing dataframes for fake and true news, saved to CSV. # Model Building
  • Used four classification models: Logistic Regression, Decision Tree, Gradient Boosting, and Random Forest.
  • Achieved high accuracy for all models (e.g., 99.55% for Gradient Boosting). # Model Testing with Manual Entry
  • Provided a function for manual testing of news.
  • Input a news text, and it predicts whether it's fake using all four models. # Example Manual Testing
  • Entered a news text about the failure of US foreign policy and economic issues.
  • All models predict it as "Fake News." # Libraries
  • pandas
  • matplotlib
  • seaborn
  • scikit-learn # Algorithms
  • Logistic Regression **Best Model Accuracy:** 95.00
  • Decision Tree Classification **Best Model Accuracy:** 99.46
  • Gradient Boosting Classifier **Best Model Accuracy:** 99.55
  • Random Forest Classifier **Best Model Accuracy:** 99.15

  • 近期下载者

    相关文件


    收藏者