You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GAN-based synthesizers work by iterating through many different epochs and optimizing a loss function. Currently, all of our core ML models store a DataFrame with the loss values per epoch under a parameter called .loss_values.
Now that the underlying ML models are storing loss values, they can be exposed through the SDV synthesizers using a simple function.
Expected behavior
Each of the GAN-based synthesizers should include a function get_loss_values() that returns a copy of the loss values. If the synthesizer has not yet been fit, then this function could raise an error.
# available for CTGAN, TVAE, CopulaGAN and PARsynthesizer.fit(data)
loss_values_df=synthesizer.get_loss_values()
# if a synthesizer has not yet been fitunfit_synthesizer.get_loss_values()
SynthesizerProcessingError: Lossvaluesarenotavailableyet. Pleasefityoursynthesizerfirst.
For multi-table synthesizes, it's possible to have a GAN-based model for single tables. (In both HSA and Independent). These synthesizers should then be able to return the loss values given the table name.
# for HSA and Independent, it's possible to use GAN-based synthesizers for individual table modelinghsa_synthesizer.set_table_parameters(
table_name='users',
table_synthesizer='CTGANSynthesizer')
# error if you haven't fit yetusers_loss=hsa_synthesizer.get_loss_values(table_name='users')
SynthesizerProcessingError: Lossvaluesarenotavailableyet. Pleasefityoursynthesizerfirst.
# after fitting, it should be possible to access the loss values for those tableshsa_synthesizer.fit(data)
users_loss=has_synthesizer.get_loss_values(table_name='users')
# if you try to get loss values from something that's not GAN-based, then there should be an errortxns_loss=hsa_synthesizer.get_loss_values(table_name='transactions')
SynthesizerInputError: Lossvaluesarenotavailablefortable'transactions'becausethetabledoesnotuseaGAN-basedmodel.
Additional context
In order to do this issue, we'll likely need to make a CTGAN release and a DeepEcho release first. (The PRs are merged, but the releases haven't been made, so the SDV won't be able to access loss values.)
The text was updated successfully, but these errors were encountered:
Problem Description
The GAN-based synthesizers work by iterating through many different epochs and optimizing a loss function. Currently, all of our core ML models store a DataFrame with the loss values per epoch under a parameter called
.loss_values
.See:
Now that the underlying ML models are storing loss values, they can be exposed through the SDV synthesizers using a simple function.
Expected behavior
Each of the GAN-based synthesizers should include a function
get_loss_values()
that returns a copy of the loss values. If the synthesizer has not yet been fit, then this function could raise an error.For multi-table synthesizes, it's possible to have a GAN-based model for single tables. (In both HSA and Independent). These synthesizers should then be able to return the loss values given the table name.
Additional context
In order to do this issue, we'll likely need to make a CTGAN release and a DeepEcho release first. (The PRs are merged, but the releases haven't been made, so the SDV won't be able to access loss values.)
The text was updated successfully, but these errors were encountered: