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
SDMetrics 0.12.0 hasn't been released yet (as of writing this issue). When it is released, we'll have to make some updates in the SDV visualizations wrappers to support the new functionality.
Note that SDV has a pinned requirement of sdmetrics<0.12. So we'll need to bump this up too when we're done.
By default, we should determine the plot type based on the metadata. (a) if sdtype is numerical/datetime, use 'distplot', (b) if sdtype is categorical/boolean, use 'bar', (c) otherwise, the data is incompatible so raise an Error.
If the user provides a plot type, then their provided value overrides the logic above
For datetime columns, SDV should convert the data to a datetime64 dtype, using the provided datetime_format from the metadata. Pass the converted data along to the SDMetrics visualization
get_column_pair_plot
Similar to above, add an optional parameter called plot_type
By default, determine plot type based on meatdata. (a) if both sdtypes are numerical/datetime, then use 'scatter', (b) if both sdtypes are categorical/boolean, then use 'heatmap', (c) if one is numerical/datetime and the other is categorical/boolean, use 'box', (d) otherwise, raise an Error because the data is incompatible
If the user provides a plot type, t hen their provided value overrides the logic above
For datetime columns, SDV should convert the data to a datetime64 dtype, using the provided datetime_format from the metadata. Pass the converted data along to the SDMetrics visualization
(multi-table only) get_cardinality_plot
Add an optional parameter called plot_type
By default, the plot type should be 'bar' in all cases
If the user provides a plot type, then pass that along instead
Additional Context
For the error messages, we may want to create a new type of error for visualizations.
>>> fig = get_column_plot(
real_data=real_data,
synthetic_data=synthetic_data,
column_name='user_id',
metadata=metadata,
)
VisualizationUnavailableError: The column 'user_id' has sdtype 'id', which does not have a supported visualization. To visualize this data anyways, please add a 'plot_type'.
The text was updated successfully, but these errors were encountered:
Problem Description
SDMetrics 0.12.0 hasn't been released yet (as of writing this issue). When it is released, we'll have to make some updates in the SDV visualizations wrappers to support the new functionality.
Note that SDV has a pinned requirement of sdmetrics<0.12. So we'll need to bump this up too when we're done.
Expected behavior
Update the visualization functions for both Single Table and Multi Table.
get_column_plot
:plot_type
'distplot'
, (b) if sdtype is categorical/boolean, use'bar'
, (c) otherwise, the data is incompatible so raise an Error.datetime64
dtype, using the provideddatetime_format
from the metadata. Pass the converted data along to the SDMetrics visualizationget_column_pair_plot
plot_type
'scatter'
, (b) if both sdtypes are categorical/boolean, then use'heatmap'
, (c) if one is numerical/datetime and the other is categorical/boolean, use'box'
, (d) otherwise, raise an Error because the data is incompatibledatetime64
dtype, using the provideddatetime_format
from the metadata. Pass the converted data along to the SDMetrics visualizationget_cardinality_plot
plot_type
'bar'
in all casesAdditional Context
For the error messages, we may want to create a new type of error for visualizations.
The text was updated successfully, but these errors were encountered: