For our code work, we utilized three feature extraction methods: tree based feature selection, L1 Regularization based feature extraction, and Recursive Feature Elimination.
Each one of them can use svm, naive bayes, KNN, random forest classifier, decision tree, and logistic regression for classification.
Tree based feature selection is defined at DTBFS(), L1 Regularization based feature extraction is defined at L1RF(), Recursive Feature Elimination is defined at RandomForestF() in MAIN3.py.
Open the annotion of these three method under 'main' before running the feature selection you want to test.
Open the annotation of model below each hint 'Using ......' and the annotation of clff_best which has the same classification method as model before you run whatever classification method you want.
The naive bayes classification method of "tree based feature selection" is defined at DTBFS_NB(), you can open the anootation and run it directly under 'main'.
The naive bayes classification method of "L1 Regularization based feature extraction" is defined at L1RF_NB(), you can open the anootation and run it directly under 'main'.
The naive bayes classification method of "Recursive Feature Elimination" is defined in naive_bayes.py, you can run the file directly.
For the code work of check point1, you can run main1.py directly.
The default method in MAIN3.py is tree based feature selection using logistic regression for classification.