def infer_x(self, y):
        """Infer probable x from input y

        @param y  the desired output for infered x.
        """
        assert len(y) == self.fmodel.dim_y, "Wrong dimension for y. Expected %i, got %i" % (self.fmodel.dim_y, len(y))
        if len(self.fmodel.dataset) == 0:
            return [[0.0]*self.dim_x]
        else:
            _, index = self.fmodel.dataset.nn_y(y, k=1)
            return [self.fmodel.dataset.get_x(index[0])]
def infer_x ( self , y ) : assert len ( y ) == self . fmodel . dim_y , "Wrong dimension for y. Expected %i, got %i" % ( self . fmodel . dim_y , len ( y ) ) if len ( self . fmodel . dataset ) == 0 : return [ [ 0.0 ] * self . dim_x ] else : _ , index = self . fmodel . dataset . nn_y ( y , k = 1 ) return [ self . fmodel . dataset . get_x ( index [ 0 ] ) ]
Infer probable x from input y

        @param y  the desired output for infered x.