(self, samples)
return self.transformer.inverse_transform(data, sigmas.detach().cpu().numpy())
Sample data similar to the training data.

        Args:
            samples (int):
                Number of rows to sample.

        Returns:
            numpy.ndarray or pandas.DataFrame
Sample data similar to the training data.
Sample data similar to the training data .
def sample(self, samples):
        """Sample data similar to the training data.

        Args:
            samples (int):
                Number of rows to sample.

        Returns:
            numpy.ndarray or pandas.DataFrame
        """
        self.decoder.eval()

        steps = samples // self.batch_size + 1
        data = []
        for _ in range(steps):
            mean = torch.zeros(self.batch_size, self.embedding_dim)
            std = mean + 1
            noise = torch.normal(mean=mean, std=std).to(self._device)
            fake, sigmas = self.decoder(noise)
            fake = torch.tanh(fake)
            data.append(fake.detach().cpu().numpy())

        data = np.concatenate(data, axis=0)
        data = data[:samples]
        return self.transformer.inverse_transform(data, sigmas.detach().cpu().numpy())
def sample ( self , samples ) : self . decoder . eval ( ) steps = samples // self . batch_size + 1 data = [ ] for _ in range ( steps ) : mean = torch . zeros ( self . batch_size , self . embedding_dim ) std = mean + 1 noise = torch . normal ( mean = mean , std = std ) . to ( self . _device ) fake , sigmas = self . decoder ( noise ) fake = torch . tanh ( fake ) data . append ( fake . detach ( ) . cpu ( ) . numpy ( ) ) data = np . concatenate ( data , axis = 0 ) data = data [ : samples ] return self . transformer . inverse_transform ( data , sigmas . detach ( ) . cpu ( ) . numpy ( ) )