To install these packages, use the following command in a virtualenv.
$ pip3 install -r requirements.txt
In alternative, install the packages listed in requirement.txt file manually
NOTE: The code works only with python >= 3.5
Available in sgm format in the folder:
data/
To train one of the implemented algorithms, run the following command:
$ python train_reuters.py
Flags
--linearsvm # use Linear Support Vector Machine classifier
--knn # use Naive-Bayes
--logisticregression # use Perceptron
--randomforest # use Random Forest
NOTE: The presence of a flag is mandatory.
To test one of the implemented algorithms, run the following command:
$ python test_reuters.py
Flags
--linearsvm # use Linear Support Vector Machine classifier
--knn # use Naive-Bayes
--logisticregression # use Perceptron
--randomforest # use Random Forest