All of the SDMetrics visualization utilities require that I put in both real and synthetic data in order to see the visualization. However, in some cases, I may be in possession of only the real data (or only the synthetic). In these instances, it would still be useful to use the utilities.
Expected behavior
The API for the utilities can remain as-is. However, we can accept None as a valid value for either real_data or synthetic_data. The logic can change as follows:
If the synthetic_data is none (but real_data is present), then the title can update to say "Real data for ...". Continue to use the dark navy color for real data to keep consistency. It is ok to still show the legend.
Else if the real_data is none (but the synthetic_data is present), then the title can update to say "Synthetic data for ...". Continue to use the lighter color for synthetic data to keep consistency. It is ok to still show the legend.
If both real_data and synthetic_data are None, then no graph can be generated. In this case, throw an Error:
Error: No data provided to plot. Please provide either real or synthetic data.
This should apply to all utility visualizations: get_column_plot, get_column_pair_plot, and get_cardinality_plot
Additional context
Until we add this feature, here is a quick-and-dirty workaround: Supply the same dataset with both the real_data and synthetic_data parameters. Since the rendered plot is interactive, you can then click the legend to "hide" one of the options.
Problem Description
All of the SDMetrics visualization utilities require that I put in both real and synthetic data in order to see the visualization. However, in some cases, I may be in possession of only the real data (or only the synthetic). In these instances, it would still be useful to use the utilities.
Expected behavior
The API for the utilities can remain as-is. However, we can accept
None
as a valid value for eitherreal_data
orsynthetic_data
. The logic can change as follows:synthetic_data
is none (butreal_data
is present), then the title can update to say "Real data for ...". Continue to use the dark navy color for real data to keep consistency. It is ok to still show the legend.real_data
is none (but thesynthetic_data
is present), then the title can update to say "Synthetic data for ...". Continue to use the lighter color for synthetic data to keep consistency. It is ok to still show the legend.real_data
andsynthetic_data
are None, then no graph can be generated. In this case, throw an Error:This should apply to all utility visualizations:
get_column_plot
,get_column_pair_plot
, andget_cardinality_plot
Additional context
Until we add this feature, here is a quick-and-dirty workaround: Supply the same dataset with both the
real_data
andsynthetic_data
parameters. Since the rendered plot is interactive, you can then click the legend to "hide" one of the options.