FakeNewsML

所属分类:内容生成
开发工具:Python
文件大小:48828KB
下载次数:0
上传日期:2022-06-21 22:29:41
上 传 者sh-1993
说明:  使用机器学习深度学习的假新闻挑战
(Fake News challenge using Machine Learning Deep Learning)

文件列表:
LICENSE (1077, 2019-10-03)
data (0, 2019-10-03)
data\competition_test_bodies.csv (2045680, 2019-10-03)
data\competition_test_stances.csv (2177588, 2019-10-03)
data\competition_test_stances_unlabeled.csv (1940688, 2019-10-03)
data\test_bodies.csv (2045680, 2019-10-03)
data\test_stances_unlabeled.csv (1940688, 2019-10-03)
data\train_bodies.csv (3752301, 2019-10-03)
data\train_stances.csv (4255300, 2019-10-03)
data\train_stances.random.csv (4201299, 2019-10-03)
final_features (0, 2019-10-03)
images (0, 2019-10-03)
images\acctoscore.PNG (39010, 2019-10-03)
images\correctness.png (22371, 2019-10-03)
main.py (8728, 2019-10-03)
output (0, 2019-10-03)
output\dt_actual_labels.csv (287719, 2019-10-03)
output\dt_predicted_labels.csv (289748, 2019-10-03)
output\lr_actual_labels.csv (287719, 2019-10-03)
output\lr_predicted_labels.csv (285955, 2019-10-03)
output\nb_actual_labels.csv (287719, 2019-10-03)
output\nb_predicted_labels.csv (299038, 2019-10-03)
output\rf_actual_labels.csv (287719, 2019-10-03)
output\rf_predicted_labels.csv (289208, 2019-10-03)
preprocessed_data (0, 2019-10-03)
preprocessed_data\test_bodies.p (42546454, 2019-10-03)
preprocessed_data\test_headlines.p (1883523, 2019-10-03)
preprocessed_data\training_bodies.p (67626897, 2019-10-03)
preprocessed_data\training_headlines.p (2844111, 2019-10-03)
preprocessed_data\validation_bodies.p (21786631, 2019-10-03)
preprocessed_data\validation_headlines.p (897311, 2019-10-03)
report (0, 2019-10-03)
report\report.pdf (229687, 2019-10-03)
requirements.txt (81, 2019-10-03)
src (0, 2019-10-03)
... ...

# Fake News ML Fake news challenge using ML/DL ## Dataset [Fake News Challenge Dataset](http://www.fakenewschallenge.org/) ## Running / Installation If you are running the code for the first time. Run the following commands in your python console. 1) -> import nltk -> nltk.download() 2) Install contractions library which is used in the pre-processing part -> pip install contractions==0.0.18 3) All the other libraries will come along with anaconda. 4) If you want to experiment with the pre processing and feature extraction results you can delete the contents in the folders `preprocessed_data` and `final_features`. 5) You need to run the `main.py` for the whole project to execute. ### Implementation 1) `data_import.py` - This file imports the data from the dataset and we use the `competition_test` files to test the data. 2) `train_validation_split.py` - The train data that is imported from the csv files is split into 80 % train and 20 % validation to check the results before testing them on the test data. 3) `preprocess.py` - We use different pre processing techniques like **tokenize**, **stopwords**, **stem/lemmatize** for the text data. 4) `feature_extraction.py` - we mainly use three different concepts to extract features from the text. They are: 1) Sentence Weighting 2) Ngrams (2 grams) 3) TF-IDF Vectorizing 5) `models.py` - we mainly use four different ML algorithms to find the class labels. They are: 1) Random Forest Classifier 2) Decision Tree Classifier 3) Logistic Regression 4) Naive Bayes 6) `metrics.py` - We use different performance metrics like `Competition Score`, `Accuracy`, `Precision`, `Recall`, `F1-score` to evaluate our labels. 7) `score.py` - This is the official scorer python file that is to be used, to evaluate the results. ### Results and Comparisons 1) Percentage of correctness for different stances for all the 5 algorithms we compare with: ![correctness](images/correctness.png) 2) The accuracy - score chart for the dataset is: ![accuracy-score](images/acctoscore.PNG) ### Report For detailed information about the repository please find the pdf attached in `report/report.pdf`

近期下载者

相关文件


收藏者