Implementation:Sdv dev SDV Evaluate Quality Single Table
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Data_Quality, Evaluation |
| Last Updated | 2026-02-14 00:00 GMT |
Overview
Wrapper for the SDMetrics single-table QualityReport, providing a convenient evaluation entry point within SDV workflows.
Description
The evaluate_quality function is a thin wrapper around sdmetrics.reports.single_table.quality_report.QualityReport. It converts SDV Metadata to the SDMetrics format, creates a QualityReport instance, generates the report, and optionally prints a summary.
Usage
Call after generating synthetic data to get a quality score.
Code Reference
Source Location
- Repository: SDV
- File: sdv/evaluation/single_table.py
- Lines: L12-35
Signature
def evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
"""Evaluate the quality of the synthetic data.
Args:
real_data (pd.DataFrame): The real data.
synthetic_data (pd.DataFrame): The synthetic data.
metadata (Metadata): Metadata describing the data.
verbose (bool): Print report summary. Defaults to True.
Returns:
QualityReport: Single table quality report.
"""
Import
from sdv.evaluation.single_table import evaluate_quality
External Reference
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| real_data | pd.DataFrame | Yes | Original real data |
| synthetic_data | pd.DataFrame | Yes | Generated synthetic data |
| metadata | Metadata | Yes | Metadata describing the data |
| verbose | bool | No | Print summary (default: True) |
Outputs
| Name | Type | Description |
|---|---|---|
| return value | QualityReport | Report with overall score and per-column/pair metrics |
Usage Examples
from sdv.evaluation.single_table import evaluate_quality
quality_report = evaluate_quality(real_data, synthetic_data, metadata)
# Get overall score (0 to 1)
print(f"Overall quality: {quality_report.get_score()}")
# Get per-column scores
column_shapes = quality_report.get_details(property_name='Column Shapes')
print(column_shapes)
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment