TableGANGenerator<T>

Models & Types · AiDotNet.NeuralNetworks.SyntheticData

TableGAN generator using a DCGAN-style architecture with classification and information loss for high-quality synthetic tabular data generation.

Inheritance: NeuralNetworkBase<T> → NeuralSyntheticTabularGeneratorBase<T> → TableGANGenerator<T>

Implements: IGeneratedParameterRegistrar<T>, ISyntheticTabularGenerator<T>

For Beginners

TableGAN is like a regular GAN with two extra quality checks:

  1. Adversarial loss: Does the synthetic data look real? (WGAN-GP for stable training)
  2. Classification loss: Are label-feature relationships preserved?
  3. Information loss: Do the mean/variance statistics match the real data?

If you provide custom layers in the architecture, those will be used directly for the generator network. If not, the network creates industry-standard TableGAN layers based on the original research paper specifications.

Example usage:

How It Works

TableGAN optimizes three losses simultaneously:

This implementation follows the standard neural network architecture pattern with:

  • Proper inheritance from NeuralNetworkBase
  • Layer-based architecture using ILayer components
  • Full autodiff and JIT compilation support

Reference: “Data Synthesis based on Generative Adversarial Networks” (Park et al., 2018)

Constructors

Constructor Summary
TableGANGenerator() Initializes a new instance with default architecture settings.
TableGANGenerator(NeuralNetworkArchitecture<T> architecture, TableGANOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) Initializes a new TableGAN generator with the specified architecture.

Properties

Property Summary
IReadOnlyList<ColumnMetadata> Columns { get; }
TableGANOptions<T> Options { get; } Gets the TableGAN-specific options.
bool IsFitted { get; set; }

Methods

Method Summary
Dictionary<string, T> GetFeatureImportance()
Matrix<T> Generate(int numSamples, Vector<T> conditionColumn, Vector<T> conditionValue)
ModelMetadata<T> GetModelMetadata()
Task FitAsync(Matrix<T> data, IReadOnlyList<ColumnMetadata> columns, int? epochs, CancellationToken cancellationToken)
void Fit(Matrix<T> data, IReadOnlyList<ColumnMetadata> columns, int? epochs)