LSH/classification_utils.py
def test(classifier, testData, testLabs):
    '''
    Test a classifier on the data provided.
    @param classifier a classifier object
    @param testData a 2D ndarray holding the data to test on
    @param testLabs a 1D ndarray holding the labels of the data that we test on
    @raise LogicalError if the test data labels do not numerically match the testing data
    @return the accuracy reported
    '''
    
    if len(testData) != len(testLabs):
        raise LogicalError, "Method test(): test data labels do not match examples."
    return classifier.test(testData, testLabs, None)

    Test a classifier on the data provided.
    @param classifier a classifier object
    @param testData a 2D ndarray holding the data to test on
    @param testLabs a 1D ndarray holding the labels of the data that we test on
    @raise LogicalError if the test data labels do not numerically match the testing data
    @return the accuracy reported
    
Test a classifier on the data provided.
Test a classifier on the data provided .
def test(classifier, testData, testLabs):
    if len(testData) != len(testLabs):
        raise LogicalError, "Method test(): test data labels do not match examples."
    return classifier.test(testData, testLabs, None)
def test ( classifier , testData , testLabs ) : if len ( testData ) != len ( testLabs ) : raise LogicalError , "Method test(): test data labels do not match examples." return classifier . test ( testData , testLabs , None )
Test a classifier on the data provided.
Test a classifier on the data provided .
'''
    Test a classifier on the data provided.
    @param classifier a classifier object
    @param testData a 2D ndarray holding the data to test on
    @param testLabs a 1D ndarray holding the labels of the data that we test on
    @raise LogicalError if the test data labels do not numerically match the testing data
    @return the accuracy reported
    '''
classifier
testData
testLabs