def create_generic(numeric_values, textual_values, target, algorithm = util_functions.AlgorithmTypes.regression):
algorithm = select_algorithm(target)<EOL>results = {'<STR_LIT>': [],'<STR_LIT:success>' : False, '<STR_LIT>' : <NUM_LIT:0>, '<STR_LIT>': <NUM_LIT:0>,<EOL>'<STR_LIT>' : "<STR_LIT>", '<STR_LIT>' : "<STR_LIT>", '<STR_LIT>' : algorithm}<EOL>if len(numeric_values)!=len(textual_values) or len(numeric_values)!=len(target):<EOL><INDENT>msg = "<STR_LIT>"<EOL>results['<STR_LIT>'].append(msg)<EOL>log.exception(msg)<EOL>return results<EOL><DEDENT>try:<EOL><INDENT>pset = predictor_set.PredictorSet(essaytype="<STR_LIT:train>")<EOL>for i in xrange(<NUM_LIT:0>, len(numeric_values)):<EOL><INDENT>pset.add_row(numeric_values[i], textual_values[i], target[i])<EOL><DEDENT><DEDENT>except:<EOL><INDENT>msg = "<STR_LIT>"<EOL>results['<STR_LIT>'].append(msg)<EOL>log.exception(msg)<EOL><DEDENT>try:<EOL><INDENT>feature_ext, classifier, cv_error_results = model_creator.extract_features_and_generate_model_predictors(pset, algorithm)<EOL>results['<STR_LIT>']=cv_error_results['<STR_LIT>']<EOL>results['<STR_LIT>']=cv_error_results['<STR_LIT>']<EOL>results['<STR_LIT>']=feature_ext<EOL>results['<STR_LIT>']=classifier<EOL>results['<STR_LIT:success>']=True<EOL><DEDENT>except:<EOL><INDENT>msg = "<STR_LIT>"<EOL>results['<STR_LIT>'].append(msg)<EOL>log.exception(msg)<EOL><DEDENT>return results<EOL>
Creates a model from a generic list numeric values and text values
numeric_values - A list of lists that are the predictors
textual_values - A list of lists that are the predictors
(each item in textual_values corresponds to the similarly indexed counterpart in numeric_values)
target - The variable that we are trying to predict.  A list of integers.
algorithm - the type of algorithm that will be used