What is the main purpose of TensorFlow Data Validation (TFDV) in a machine learning workflow?
Think about what helps ensure data quality before training a model.
TFDV is designed to analyze datasets, infer schemas, and detect anomalies to ensure data quality before training.
What will be the output type of the following code snippet?
import tensorflow_data_validation as tfdv stats = tfdv.generate_statistics_from_csv(data_location='data.csv') schema = tfdv.infer_schema(stats) print(type(schema))
Check what type is returned by infer_schema in TFDV.
The infer_schema function returns a Schema proto object representing the data schema.
You have a dataset and its statistics computed with TFDV. Which function should you use to detect anomalies by comparing the statistics against a schema?
Think about which function compares data stats to a schema to find issues.
validate_statistics compares dataset statistics to a schema and returns detected anomalies.
Which parameter would you adjust in TFDV to make anomaly detection more sensitive to small changes in feature distributions?
Look for parameters that control anomaly thresholds directly in the validation function.
The thresholds parameter in validate_statistics allows customizing anomaly detection thresholds (e.g., for drift and distribution); lowering them makes detection more sensitive to small changes.
You ran tfdv.validate_statistics(stats, schema) but it returned an empty anomalies proto, even though you know the data has changed significantly. What is the most likely cause?
Think about what the schema represents and how anomalies are detected.
If the schema is outdated and matches old data, TFDV will not detect anomalies in changed data.
