classifiers module

This script provides four classifiers (K-NN, SVM, Random Forest, and Naive Bayes) to solve a classification problem.

The script receives the training and test datasets (labels and data) as well as the mRMR ranking to perform the classification. The optimisation of the parameters in the different models is carried out through a grid search, using sklearn.model_selection.GridSearchCV. Different subsets of features of the mRMR ranking are selected in order to determine which subset is the best.

classifiers.fit_model(model, data_train, data_test, labels_train, labels_test, features_mrmr, max_features)[source]

Fit the model.

Parameters:

:return Accuracy :rtype: float