teras.losses.saint_denoising_loss#
- teras.losses.saint_denoising_loss(real, reconstructed, cardinalities)[source]#
Since we apply categorical and numerical embedding layers separately and then combine them into a new features matrix this effectively makes the first k features in the outputs categorical (since categorical embeddings are applied first) and all other features numerical. Here, k = num_categorical_features
- Parameters:
real – Samples drawn from the original dataset.
reconstructed – Samples reconstructed by the reconstruction head.
cardinalities (
list) – list, a list cardinalities of all the features in the dataset in the same order as the features’ occurrence. For numerical features, use the value 0 as indicator at the corresponding index. You can use the compute_cardinalities function from teras.utils package for this purpose.