As a developer, it would be easier to make changes to the QualityReport if our code abstractions matched our logical and user facing abstractions. It's hard to add new properties, modify aggregation in existing ones and handle errors now because the results are being collected in a way that doesn't match the desired output.
After adding the BaseSingleTableProperty class in #354, we can use it at the multi table level as well. To do this we can create a BaseMultiTableProperty class and add it to a _properties module in the reports/multi_table folder.
Expected behavior
Attributes
metrics: A list of metrics that make up the property.
_properties: A dict mapping the table names to their single table properties.
Abstract methods
get_score(real_data, synthetic_data, metadata, progress_bar) - Returns a float that is the average score of all the individual metric scores computed. This method should average all the scores for each column/column pair as opposed to getting the average score for each table and averaging those.
get_visualization(table_name) - Returns a plotly.graph_objects._figure.Figure object for the specified table.
Additional context
In the case of column shape metrics, the score should be computed by averaging the scores of every column in every table. This way no table scores are weighted disproportionately. For column pair metrics, the same should happen except for every column pair for each table.
Problem Description
As a developer, it would be easier to make changes to the
QualityReport
if our code abstractions matched our logical and user facing abstractions. It's hard to add new properties, modify aggregation in existing ones and handle errors now because the results are being collected in a way that doesn't match the desired output.After adding the
BaseSingleTableProperty
class in #354, we can use it at the multi table level as well. To do this we can create aBaseMultiTableProperty
class and add it to a_properties
module in thereports/multi_table
folder.Expected behavior
Attributes
metrics
: A list of metrics that make up the property._properties
: A dict mapping the table names to their single table properties.Abstract methods
get_score(real_data, synthetic_data, metadata, progress_bar)
- Returns a float that is the average score of all the individual metric scores computed. This method should average all the scores for each column/column pair as opposed to getting the average score for each table and averaging those.get_visualization(table_name)
- Returns aplotly.graph_objects._figure.Figure
object for the specified table.Additional context