sdv-dev / CTGAN

Conditional GAN for generating synthetic tabular data.
Other
1.23k stars 279 forks source link

Generating model summary #277

Open 9jaswag opened 1 year ago

9jaswag commented 1 year ago

Environment details

If you are already running CTGAN, please indicate the following details about the environment in which you are running it:

Problem description

First off, great job with what has been done on the CTGAN and TVAE models. I'd like to find out if it's currently possible to generate the model summary of a trained CTGANSynthesizer or TVAESynthesizer?

What I already tried

Tried looking at the docs, but couldn't find any mention of such.

npatki commented 1 year ago

Hi @9jaswag, nice to meet you and thanks for the kind words!

Curious what kind of information you'd want to see in a summary? Is there a particular usage or project you have in mind?

While there is no such summary available, you can sample synthetic data and then generate reports that compare the real vs. synthetic data. That should provide you some useful information to get started in evaluating the model.

For more information, check out our SDMetrics library. You can find reports, metrics and visualizations.

9jaswag commented 1 year ago

Thanks for your response @npatki. While tinkering with models in the past, I've been able to generate model summaries (e.g with keras model.summary()) whenever I need it for "documentation purposes". I was hoping I'd be able to do same for the synthesisers SDV offers.

npatki commented 1 year ago

Hi @9jaswag, I'm not as familiar with the keras library. What information would you like to see in the summary? How are you using the summaries?

Here are a few other things you can do:

9jaswag commented 1 year ago

@npatki here's a model summary sample I got from a quick Google search. image

I'll check out your get_learned_parameters suggestion. Thanks!

npatki commented 1 year ago

Hi @9jaswag just curious, how are you using the Layer, Output Shape and Param # information for your project?

9jaswag commented 1 year ago

Mostly to write up a descriptive summary of the model. Anyone who looks at it can get a general information about the model. Doing a quick search, I noticed there's an attempt to create something similar for pytorch

Deepam-Rai commented 1 year ago

@9jaswag Did it work?