def compute_err(self, solution_y, coefficients):
error = <NUM_LIT:0><EOL>for modeled, expected in zip(solution_y, self.expected_values):<EOL><INDENT>error += abs(modeled - expected)<EOL><DEDENT>if any([c < <NUM_LIT:0> for c in coefficients]):<EOL><INDENT>error *= <NUM_LIT><EOL><DEDENT>return error<EOL>
Return an error value by finding the absolute difference for each
element in a list of solution-generated y-values versus expected values.

Compounds error by 50% for each negative coefficient in the solution.

solution_y:  list of y-values produced by a solution
coefficients:  list of polynomial coefficients represented by the solution

return:  error value