A News Analyzer to detect fake news
Here's a video demo: https://www.youtube.com/watch?v=JDM_5WDHOfc&feature=youtu.be
if using RandomTree.py, RandomForest.py, genCrossValid.py, then Numpy and Scipy are required:
-
Numpy
v1.11.1v1.16.4 -
Scipy v0.17.1
-
Scikit-learn v.0.18.1
-
NLTK v3.2.1
-
Theano (for LSTM model) v1.0.4
Install/Upgrade existing libraries: $ sudo pip install lib_name (--upgrade)
LINK - wikipedia for cross-validation
in genCrossValid.py, genData(k, file, writeToFile) can generate the datasets for k-fold cross validation
--parameters
k: number of folds, fedault 10
file: the path of the file
writeToFile: Boolean, wether write the cross-validation data to files or not. If true, the method will generate 2*k files, where "ntrain.csv" contains the training set for n-th cross validation and "ntest.csv" contains the testing set for n-th cross-validation
--return: list for training sets and list of testing sets (all in Numpy's nd-array)
Install Packages Listed Above If Necessary
Go to webAWS folder, type $ ./run or $ python application.py on terminal for python 2.7. For python3, please run the application by $ python3 application.py
Version Notation The master contains the complete version of this project, which is expected to run in python 3. However, if you don't have python 3, a python 2.7 version is provided in the branch. Please note that python 2.7 version doesn't have LSTM model involved.