def infer_x(self, y):
        """Infer probable x from input y
        @param y  the desired output for infered x.
        @return   a list of probable x
        """
        OptimizedInverseModel.infer_x(self, y)
        if self.fmodel.size() == 0:
            return self._random_x()

        x_guesses = [self._guess_x_simple(y)[0]]
        result = []
        for i, xg in enumerate(x_guesses):
            res = scipy.optimize.minimize(self._error, xg,
                                          args        = (),
                                          method      = self.algo,
                                          bounds      = self.constraints,
                                          options     = self.conf
                                         )



            d = self._error(res.x)
            result.append((d, i, res.x))
        return [self._enforce_bounds(xi) for fi, i, xi in sorted(result)]
def infer_x ( self , y ) : OptimizedInverseModel . infer_x ( self , y ) if self . fmodel . size ( ) == 0 : return self . _random_x ( ) x_guesses = [ self . _guess_x_simple ( y ) [ 0 ] ] result = [ ] for i , xg in enumerate ( x_guesses ) : res = scipy . optimize . minimize ( self . _error , xg , args = ( ) , method = self . algo , bounds = self . constraints , options = self . conf ) d = self . _error ( res . x ) result . append ( ( d , i , res . x ) ) return [ self . _enforce_bounds ( xi ) for fi , i , xi in sorted ( result ) ]
Infer probable x from input y
        @param y  the desired output for infered x.
        @return   a list of probable x