(self, n, condition_column=None, condition_value=None)
return self._transformer.inverse_transform(data)
Sample data similar to the training data.

        Choosing a condition_column and condition_value will increase the probability of the
        discrete condition_value happening in the condition_column.

        Args:
            n (int):
                Number of rows to sample.
            condition_column (string):
                Name of a discrete column.
            condition_value (string):
                Name of the category in the condition_column which we wish to increase the
                probability of happening.

        Returns:
            numpy.ndarray or pandas.DataFrame
Sample data similar to the training data.
Sample data similar to the training data .
def sample(self, n, condition_column=None, condition_value=None):
        """Sample data similar to the training data.

        Choosing a condition_column and condition_value will increase the probability of the
        discrete condition_value happening in the condition_column.

        Args:
            n (int):
                Number of rows to sample.
            condition_column (string):
                Name of a discrete column.
            condition_value (string):
                Name of the category in the condition_column which we wish to increase the
                probability of happening.

        Returns:
            numpy.ndarray or pandas.DataFrame
        """
        if condition_column is not None and condition_value is not None:
            condition_info = self._transformer.convert_column_name_value_to_id(
                condition_column, condition_value)
            global_condition_vec = self._data_sampler.generate_cond_from_condition_column_info(
                condition_info, self._batch_size)
        else:
            global_condition_vec = None

        steps = n // self._batch_size + 1
        data = []
        for i in range(steps):
            mean = torch.zeros(self._batch_size, self._embedding_dim)
            std = mean + 1
            fakez = torch.normal(mean=mean, std=std).to(self._device)

            if global_condition_vec is not None:
                condvec = global_condition_vec.copy()
            else:
                condvec = self._data_sampler.sample_original_condvec(self._batch_size)

            if condvec is None:
                pass
            else:
                c1 = condvec
                c1 = torch.from_numpy(c1).to(self._device)
                fakez = torch.cat([fakez, c1], dim=1)

            fake = self._generator(fakez)
            fakeact = self._apply_activate(fake)
            data.append(fakeact.detach().cpu().numpy())

        data = np.concatenate(data, axis=0)
        data = data[:n]

        return self._transformer.inverse_transform(data)
def sample ( self , n , condition_column = None , condition_value = None ) : if condition_column is not None and condition_value is not None : condition_info = self . _transformer . convert_column_name_value_to_id ( condition_column , condition_value ) global_condition_vec = self . _data_sampler . generate_cond_from_condition_column_info ( condition_info , self . _batch_size ) else : global_condition_vec = None steps = n // self . _batch_size + 1 data = [ ] for i in range ( steps ) : mean = torch . zeros ( self . _batch_size , self . _embedding_dim ) std = mean + 1 fakez = torch . normal ( mean = mean , std = std ) . to ( self . _device ) if global_condition_vec is not None : condvec = global_condition_vec . copy ( ) else : condvec = self . _data_sampler . sample_original_condvec ( self . _batch_size ) if condvec is None : pass else : c1 = condvec c1 = torch . from_numpy ( c1 ) . to ( self . _device ) fakez = torch . cat ( [ fakez , c1 ] , dim = 1 ) fake = self . _generator ( fakez ) fakeact = self . _apply_activate ( fake ) data . append ( fakeact . detach ( ) . cpu ( ) . numpy ( ) ) data = np . concatenate ( data , axis = 0 ) data = data [ : n ] return self . _transformer . inverse_transform ( data )