LSH/classification_utils.py
def tune(classifier, validationData, validationDataLabels, hyperParamList):
    
    '''
    Tune a trained classifier on validationData by choosing the hyperparameter which yielded
    the best results.
    @param classifier the trained classifier
    @param validationData the data to validate on
    @param validationDataLabels the validation data's labels
    @param hyperParamList the list of hyperparameters to choose from
    @raise LogicalError if there exists no 1-1 mapping between the validation data and its labels
    '''
    
    if len(validationData) != len(validationDataLabels):
        raise LogicalError, "Method tune(): validationDataLabels do not match validation examples"
    
    return classifier.tune(validationData, validationDataLabels, hyperParamList)

    Tune a trained classifier on validationData by choosing the hyperparameter which yielded
    the best results.
    @param classifier the trained classifier
    @param validationData the data to validate on
    @param validationDataLabels the validation data's labels
    @param hyperParamList the list of hyperparameters to choose from
    @raise LogicalError if there exists no 1-1 mapping between the validation data and its labels
    
Tune a trained classifier on validationData by choosing the hyperparameter which yielded
the best results.
Tune a trained classifier on validationData by choosing the hyperparameter which yielded the best results .
def tune(classifier, validationData, validationDataLabels, hyperParamList):
    if len(validationData) != len(validationDataLabels):
        raise LogicalError, "Method tune(): validationDataLabels do not match validation examples"
    return classifier.tune(validationData, validationDataLabels, hyperParamList)
def tune ( classifier , validationData , validationDataLabels , hyperParamList ) : if len ( validationData ) != len ( validationDataLabels ) : raise LogicalError , "Method tune(): validationDataLabels do not match validation examples" return classifier . tune ( validationData , validationDataLabels , hyperParamList )
Tune a trained classifier on validationData by choosing the hyperparameter which yielded
the best results.
Tune a trained classifier on validationData by choosing the hyperparameter which yielded the best results .
'''
    Tune a trained classifier on validationData by choosing the hyperparameter which yielded
    the best results.
    @param classifier the trained classifier
    @param validationData the data to validate on
    @param validationDataLabels the validation data's labels
    @param hyperParamList the list of hyperparameters to choose from
    @raise LogicalError if there exists no 1-1 mapping between the validation data and its labels
    '''
classifier
validationData
validationDataLabels
hyperParamList