This class encapsulates a K- Nearest Neighbor Classifier.
See http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm
Classify a single image. Takes in an image and returns the string of the classification.
Make sure you haved loaded the feauture extractors and the training data.
Load the classifier from file
Save the classifier to file
Note that training and testing will need to be redone.
Add a list of feature extractors to the classifier. These feature extractors must match the ones used to train the classifier. If the classifier is already trained then this method will require that you retrain the data.
Note that training and testing will need to be redone.
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
This class encapsulates a Naive Bayes Classifier. See: http://en.wikipedia.org/wiki/Naive_bayes
Classify a single image. Takes in an image and returns the string of the classification.
Make sure you haved loaded the feauture extractors and the training data.
Load the classifier from file
Save the classifier to file
Add a list of feature extractors to the classifier. These feature extractors must match the ones used to train the classifier. If the classifier is already trained then this method will require that you retrain the data.
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
This class encapsulates a Naive Bayes Classifier. See: http://en.wikipedia.org/wiki/Support_vector_machine
Classify a single image. Takes in an image and returns the string of the classification.
Make sure you haved loaded the feauture extractors and the training data.
Load the classifier from file
Save the classifier to file
Add a list of feature extractors to the classifier. These feature extractors must match the ones used to train the classifier. If the classifier is already trained then this method will require that you retrain the data.
Note that resetting the properties will reset the SVM and you will need to retrain.
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
This method encapsulates a number of tree-based machine learning approaches and associated meta algorithms.
Decision trees: http://en.wikipedia.org/wiki/Decision_trees
boosted adpative decision trees http://en.wikipedia.org/wiki/Adaboost
random forrests http://en.wikipedia.org/wiki/Random_forest
bagging (bootstrap aggregating) http://en.wikipedia.org/wiki/Bootstrap_aggregating
Classify a single image. Takes in an image and returns the string of the classification.
Make sure you haved loaded the feauture extractors and the training data.
Load the classifier from file
Save the classifier to file
Add a list of feature extractors to the classifier. These feature extractors must match the ones used to train the classifier. If the classifier is already trained then this method will require that you retrain the data.
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]
Train the classifier. paths the order of the paths in the same order as the class type
disp - if display is a display we show images and class label, otherwise nothing is done.
subset - if subset = -1 we use the whole dataset. If subset = # then we use min(#images,subset)
savedata - if save data is None nothing is saved. If savedata is a file name we save the data to a tab delimited file.
verbose - print confusion matrix and file names returns [%Correct %Incorrect Confusion_Matrix]