def _evalFunction(individual, name_values, X, y, scorer, cv, iid, fit_params,<EOL>verbose=<NUM_LIT:0>, error_score='<STR_LIT>', score_cache={}):
parameters = _individual_to_params(individual, name_values)<EOL>score = <NUM_LIT:0><EOL>n_test = <NUM_LIT:0><EOL>paramkey = str(individual)<EOL>if paramkey in score_cache:<EOL><INDENT>score = score_cache[paramkey]<EOL><DEDENT>else:<EOL><INDENT>for train, test in cv.split(X, y):<EOL><INDENT>assert len(train) > <NUM_LIT:0> and len(test) > <NUM_LIT:0>, "<STR_LIT>"<EOL>_score = _fit_and_score(estimator=individual.est, X=X, y=y, scorer=scorer,<EOL>train=train, test=test, verbose=verbose,<EOL>parameters=parameters, fit_params=fit_params,<EOL>error_score=error_score)[<NUM_LIT:0>]<EOL>if iid:<EOL><INDENT>score += _score * len(test)<EOL>n_test += len(test)<EOL><DEDENT>else:<EOL><INDENT>score += _score<EOL>n_test += <NUM_LIT:1><EOL><DEDENT><DEDENT>assert n_test > <NUM_LIT:0>, "<STR_LIT>"<EOL>score /= float(n_test)<EOL>score_cache[paramkey] = score<EOL><DEDENT>return (score,)<EOL>
Developer Note:
        --------------------
        score_cache was purposefully moved to parameters, and given a dict reference.
        It will be modified in-place by _evalFunction based on it's reference.
        This is to allow for a managed, paralell memoization dict,
        and also for different memoization per instance of EvolutionaryAlgorithmSearchCV.
        Remember that dicts created inside function definitions are presistent between calls,
        So unless it is replaced this function will be memoized each call automatically.