<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _error(self, x):
 """Error function. Once self.y_desired has been defined, compute the error of input x using the forward model. """

        y_pred = self.fmodel.predict_y(x)
        err_v  = y_pred - self.goal
        error = sum(e*e for e in err_v)
        return error