tfdv.visualize_statistics  |  TFX  |  TensorFlow Skip to main content Install Learn Introduction New to TensorFlow? Tutorials Learn how to use TensorFlow with end-to-end examples Guide Learn framework concepts and components Learn ML Educational resources to master your path with TensorFlow API TensorFlow (v2.16.1) Versions… TensorFlow.js TensorFlow Lite TFX Ecosystem LIBRARIES TensorFlow.js Develop web ML applications in JavaScript TensorFlow Lite Deploy ML on mobile, microcontrollers and other edge devices TFX Build production ML pipelines All libraries Create advanced models and extend TensorFlow RESOURCES Models & datasets Pre-trained models and datasets built by Google and the community Tools Tools to support and accelerate TensorFlow workflows Responsible AI Resources for every stage of the ML workflow Recommendation systems Build recommendation systems with open source tools Community Groups User groups, interest groups and mailing lists Contribute Guide for contributing to code and documentation Blog Stay up to date with all things TensorFlow Forum Discussion platform for the TensorFlow community Why TensorFlow About Case studies / English 中文 – 简体 GitHub Sign in For Production Overview Tutorials Guide TFX-Addons API Install Learn More Overview Tutorials Guide TFX-Addons API API More Ecosystem More Community More Why TensorFlow More GitHub TFX API TFX V1 tfx.v1 Overview components Overview BulkInferrer CsvExampleGen DataAccessor Evaluator ExampleDiff ExampleValidator FnArgs ImportExampleGen ImportSchemaGen InfraValidator Pusher SchemaGen StatisticsGen Trainer Transform Tuner TunerFnResult dsl Overview Artifact Channel Cond ExecutionMode Importer Pipeline Resolver components Overview AsyncOutputArtifact BeamComponentParameter InputArtifact OutputArtifact OutputDict Parameter component experimental Overview LatestArtifactStrategy LatestBlessedModelStrategy ResolverStrategy RuntimeParameter SpanRangeStrategy create_container_component io Overview fileio Overview NotFoundError PathType copy exists glob isdir listdir makedirs mkdir open remove rename rmtree stat walk placeholders Overview exec_property execution_invocation input output extensions Overview google_cloud_ai_platform Overview BulkInferrer Pusher Trainer Tuner experimental Overview google_cloud_big_query Overview BigQueryExampleGen Pusher orchestration Overview LocalDagRunner experimental Overview FinalStatusStr KubeflowDagRunner KubeflowDagRunnerConfig KubeflowV2DagRunner KubeflowV2DagRunnerConfig exit_handler get_default_kubeflow_metadata_config metadata Overview ConnectionConfigType mysql_metadata_connection_config sqlite_metadata_connection_config proto Overview ClassifyOutput CustomConfig DataSpec DistributionValidatorConfig EnvVar EnvVarSource EvalArgs ExampleDiffConfig FeatureComparator FeatureSlicingSpec Filesystem Input KubernetesConfig LocalDockerConfig ModelSpec Output OutputColumnsSpec OutputExampleSpec PairedExampleSkew PodOverrides PredictOutput PredictOutputCol PushDestination RangeConfig RegressOutput RequestSpec RollingRange SecretKeySelector ServingSpec SingleSlicingSpec SplitConfig SplitsConfig StaticRange TensorFlowServing TensorFlowServingRequestSpec TrainArgs TuneArgs ValidationSpec orchestration Overview RunState testing Overview Channel types Overview BaseBeamComponent BaseChannel BaseComponent BaseComponent.DRIVER_CLASS BaseFunctionalComponent BaseFunctionalComponentFactory BaseNode standard_artifacts Overview Boolean Bytes ExampleAnomalies ExampleStatistics ExampleStatistics.TYPE_ANNOTATION Examples Examples.TYPE_ANNOTATION Float HyperParameters InferenceResult InfraBlessing Integer JsonValue Model Model.TYPE_ANNOTATION ModelBlessing ModelEvaluation ModelRun PushedModel Schema String TransformCache TransformGraph utils Overview JsonableType parse_pbtxt_file Data Validation tfdv Overview CombinerStatsGenerator CrossFeatureView DatasetListView DatasetView DetectFeatureSkew FeaturePath FeatureView GenerateStatistics MergeDatasetFeatureStatisticsList StatsOptions TransformStatsGenerator WriteStatisticsToBinaryFile WriteStatisticsToRecordsAndBinaryFile WriteStatisticsToTFRecord compare_slices default_sharded_output_suffix default_sharded_output_supported display_anomalies display_schema experimental_get_feature_value_slicer generate_dummy_schema_with_paths generate_statistics_from_csv generate_statistics_from_dataframe generate_statistics_from_tfrecord get_confusion_count_dataframes get_domain get_feature get_feature_stats get_match_stats_dataframe get_skew_result_dataframe get_slice_stats get_statistics_html infer_schema load_anomalies_text load_schema_text load_sharded_statistics load_statistics load_stats_binary load_stats_text set_domain update_schema validate_corresponding_slices validate_examples_in_csv validate_examples_in_tfrecord validate_statistics visualize_statistics write_anomalies_text write_schema_text write_stats_text Transform tft Overview DatasetMetadata TFTransformOutput TransformFeaturesLayer annotate_asset apply_buckets apply_buckets_with_interpolation apply_pyfunc apply_vocabulary bag_of_words bucketize bucketize_per_key compute_and_apply_vocabulary count_per_key covariance deduplicate_tensor_per_row estimated_probability_density get_analyze_input_columns get_num_buckets_for_transformed_feature get_transform_input_columns hash_strings histogram make_and_track_object max mean min ngrams pca quantiles scale_by_min_max scale_by_min_max_per_key scale_to_0_1 scale_to_0_1_per_key scale_to_gaussian scale_to_z_score scale_to_z_score_per_key segment_indices size sparse_tensor_left_align sparse_tensor_to_dense_with_shape sum tfidf tukey_h_params tukey_location tukey_scale var vocabulary word_count tft.coders Overview CsvCoder ExampleProtoCoder tft.experimental Overview CacheablePTransformAnalyzer PTransformAnalyzerCacheCoder SimpleJsonPTransformAnalyzerCacheCoder annotate_sparse_output_shape annotate_true_sparse_output approximate_vocabulary compute_and_apply_approximate_vocabulary document_frequency get_vocabulary_size_by_name idf ptransform_analyzer tft_beam Overview AnalyzeAndTransformDataset AnalyzeDataset AnalyzeDatasetWithCache Context EncodeTransformedDataset ReadTransformFn TransformDataset WriteMetadata WriteTransformFn tft_beam.analyzer_cache Overview BeamAnalysisCache DatasetCache DatasetCacheMetadata DatasetKey ReadAnalysisCacheFromFS WriteAnalysisCacheToFS make_cache_entry_key validate_dataset_keys tft_beam.experimental Overview PTransformAnalyzer Model Analysis tfma Overview AggregationOptions AggregationOptions.ClassWeightsEntry AttributionsForSlice AttributionsForSlice.AttributionsKeyAndValues AttributionsForSlice.AttributionsKeyAndValues.ValuesEntry BatchedInputsToExtracts BinarizationOptions ConfidenceIntervalOptions CrossSliceMetricThreshold CrossSliceMetricThresholds CrossSlicingSpec EvalConfig EvalResult ExampleWeightOptions ExtractAndEvaluate ExtractEvaluateAndWriteResults GenericChangeThreshold GenericValueThreshold InputsToExtracts MetricConfig MetricThreshold MetricsForSlice MetricsForSlice.MetricKeyAndValue MetricsForSlice.MetricsEntry MetricsSpec MetricsSpec.CrossSliceThresholdsEntry MetricsSpec.OutputWeightsEntry MetricsSpec.PerSliceThresholdsEntry MetricsSpec.ThresholdsEntry ModelSpec ModelSpec.ExampleWeightKeysEntry ModelSpec.LabelKeysEntry ModelSpec.PredictionKeysEntry Options PaddingOptions PerSliceMetricThreshold PerSliceMetricThresholds PlotsForSlice PlotsForSlice.PlotKeyAndValue PlotsForSlice.PlotsEntry RepeatedInt32Value RepeatedStringValue SlicingSpec SlicingSpec.FeatureValuesEntry Validate ValidationResult WriteResults analyze_raw_data default_eval_shared_model default_evaluators default_extractors default_writers is_batched_input is_legacy_estimator load_attributions load_eval_result load_eval_results load_metrics load_plots load_validation_result make_eval_results multiple_data_analysis multiple_model_analysis run_model_analysis tfma.addons Overview tfma.constants Overview tfma.contrib Overview tfma.evaluators Overview AnalysisTableEvaluator Evaluation Evaluator MetricsAndPlotsEvaluator MetricsPlotsAndValidationsEvaluator verify_evaluator tfma.experimental Overview tfma.export Overview EvalInputReceiverType build_parsing_eval_input_receiver_fn tfma.exporter Overview FinalExporter LatestExporter adapt_to_remove_metrics tfma.extractors Overview ExampleWeightsExtractor Extractor FeatureExtractor FeaturesExtractor Filter InputExtractor LabelsExtractor PredictExtractor PredictionsExtractor SliceKeyExtractor TransformedFeaturesExtractor UnbatchExtractor tfma.metrics Overview AUC AUCCurve AUCPrecisionRecall AUCSummationMethod AttributionsMetric BalancedAccuracy BinaryAccuracy BinaryCrossEntropy BooleanFlipRates COCOAveragePrecision COCOAverageRecall COCOMeanAveragePrecision COCOMeanAverageRecall Calibration CalibrationPlot CategoricalCrossEntropy CoefficientOfDiscrimination CombinedFeaturePreprocessor ConfusionMatrixAtThresholds ConfusionMatrixPlot DerivedMetricComputation DiagnosticOddsRatio ExactMatch ExampleCount F1Score FN FNR FP FPR FallOut FalseDiscoveryRate FalseNegatives FalseOmissionRate FalsePositives FeaturePreprocessor FowlkesMallowsIndex Informedness Markedness MatthewsCorrelationCoefficient MaxRecall Mean MeanAbsoluteAttributions MeanAbsoluteError MeanAbsolutePercentageError MeanAttributions MeanLabel MeanPrediction MeanSquaredError MeanSquaredLogarithmicError Metric MetricComputation MetricComputations MetricKey MetricsDict MinLabelPosition MissRate MultiClassConfusionMatrixAtThresholds MultiClassConfusionMatrixPlot MultiLabelConfusionMatrixPlot NDCG NPV NegativeLikelihoodRatio NegativePredictiveValue ObjectDetectionConfusionMatrixPlot ObjectDetectionMaxRecall ObjectDetectionPrecision ObjectDetectionPrecisionAtRecall ObjectDetectionRecall ObjectDetectionThresholdAtRecall PPV PlotKey PositiveLikelihoodRatio Precision PrecisionAtRecall Preprocessor Preprocessor.BundleContextParam Preprocessor.BundleFinalizerParam Preprocessor.RestrictionParam Preprocessor.SetupContextParam Preprocessor.StateParam Preprocessor.TimerParam Preprocessor.WatermarkEstimatorParam Prevalence PrevalenceThreshold QueryStatistics Recall RecallAtPrecision RelativeCoefficientOfDiscrimination ScoreDistributionPlot SemanticSegmentationConfusionMatrix SemanticSegmentationFalsePositive SemanticSegmentationTruePositive SensitivityAtSpecificity SetMatchPrecision SetMatchRecall Specificity SpecificityAtSensitivity SquaredPearsonCorrelation StandardMetricInputs SubKey SymmetricPredictionDifference TN TNR TP TPR ThreatScore TotalAbsoluteAttributions TotalAttributions TrueNegatives TruePositives WeightedExampleCount default_binary_classification_specs default_multi_class_classification_specs default_regression_specs has_attributions_metrics merge_per_key_computations metric_thresholds_from_metrics_specs specs_from_metrics to_label_prediction_example_weight to_standard_metric_inputs tfma.model_agnostic_eval Overview tfma.post_export_metrics Overview auc auc_plots calibration calibration_plot_and_prediction_histogram confusion_matrix_at_thresholds example_count example_weight fairness_auc fairness_indicators mean_absolute_error mean_squared_error precision_at_k recall_at_k root_mean_squared_error squared_pearson_correlation tfma.sdk Overview tfma.types Overview AddMetricsCallbackType DictOfFetchedTensorValues DictOfTensorType DictOfTensorTypeMaybeDict DictOfTensorValue DictOfTensorValueMaybeDict DictOfTypeSpec DictOfTypeSpecMaybeDict EvalSharedModel Extracts FPLKeyType FeaturesPredictionsLabels MaterializedColumn MaybeMultipleEvalSharedModels MetricValueType MetricVariablesType ModelLoader PrimitiveMetricValueType RaggedTensorValue SparseTensorValue StructuredMetricValue TensorOrOperationType TensorType TensorTypeMaybeDict TensorTypeMaybeMultiLevelDict TensorValue TensorValueMaybeDict TensorValueMaybeMultiLevelDict TypeSpecMaybeDict TypeSpecMaybeMultiLevelDict ValueWithTDistribution VarLenTensorValue VarLenTensorValue.DenseRowIterator tfma.utils Overview CombineFnWithModels DoFnWithModels calculate_confidence_interval compound_key create_keys_key create_values_key get_baseline_model_spec get_by_keys get_model_spec get_model_type get_non_baseline_model_specs has_change_threshold merge_extracts model_construct_fn unique_key update_eval_config_with_defaults verify_and_update_eval_shared_models verify_eval_config tfma.validators Overview Validator tfma.version Overview tfma.view Overview SlicedMetrics SlicedPlots render_plot render_slicing_attributions render_slicing_metrics render_time_series tfma.writers Overview EvalConfigWriter MetricsPlotsAndValidationsWriter Write Writer convert_slice_metrics_to_proto Serving Client API (REST) Client API (gRPC) Server API (C++) Overview tensorflow::serving Overview Classes AspiredVersionPolicy AspiredVersionPolicy::ServableAction AspiredVersionsManager AspiredVersionsManager::Options AspiredVersionsManagerBuilder BasicManager BasicManager::Options CachingManager CachingManager::LoaderFactory CachingManager::Options ClassifierInterface FileSystemStoragePathSource Loader Loader::Metadata LoaderHarness LoaderHarness::Options Manager PathPrefixLoaderFactory RegressorInterface ResourceUnsafeLoader SavedModelBundleFactory ServableHandle ServableStateMonitor ServerCore ServerCore::Options ServingSession ServingSessionWrapper SessionWrapperIgnoreThreadPoolOptions SharedPtrHandle Source SourceAdapter UntypedServableHandle Structs AspiredServableStateSnapshot ServableRequest Namespaces tensorflow tensorflow::serving::internal ML Metadata mlmd Overview ListOptions MetadataStore OrderByField downgrade_schema TF Metadata tfmd.proto Overview anomalies_pb2 Overview Anomalies Anomalies.AnomalyInfoEntry AnomalyInfo AnomalyInfo.Reason ChangedRegion DiffRegion DriftSkewInfo DriftSkewInfo.Measurement HiddenRegion OneSideRegion UnchangedRegion derived_feature_pb2 Overview AllowlistDeriver ArgmaxTopK DerivedFeatureConfig DerivedFeatureSource ImageQualityDeriver ReduceOp SliceSql metric_pb2 Overview AUC AUCPrecisionRecall BinaryAccuracy BinaryCrossEntropy BlockUtility CategoricalAccuracy CategoricalCrossEntropy Cosine CustomMetric CustomMetric.RegistrySpec FalseNegativeRateAtThreshold FalsePositiveRateAtThreshold Hinge KullbackLeiblerDivergence LogisticRegression MaximumMeanDiscrepancy MeanAbsoluteError MeanAbsolutePercentageError MeanReciprocalRank MeanSquaredError MeanSquaredLogarithmicError MicroAUC MultilabelCrossEntropy PerformanceMetric Poisson PrecisionAtK PrecisionAtRecall PredictionMean RecallAtPrecision SensitivityAtSpecificity SparseTopKCategoricalAccuracy SpecificityAtSensitivity SquaredHinge TopKCategoricalAccuracy path_pb2 Overview Path problem_statement_pb2 Overview BinaryClassification BinaryClassification.PositiveNegativeSpec BinaryClassification.PositiveNegativeSpec.LabelValue DynamicClassSpec DynamicClassSpec.OovClassSpec MetaOptimizationTarget MetaOptimizationTarget.ThresholdConfig MultiClassClassification MultiDimensionalRegression MultiDimensionalRegression.Probability MultiLabelClassification OneDimensionalRegression OneDimensionalRegression.Counts OneDimensionalRegression.Probability ProblemStatement Task TextGeneration TopKClassification Type schema_pb2 Overview Annotation AudioDomain BoolDomain ContentChunkDomain DatasetConstraints DistributionConstraints Feature FeatureComparator FeatureCoverageConstraints FeaturePresence FeaturePresenceWithinGroup FixedShape FixedShape.Dim FloatDomain HistogramSelection ImageDomain InfinityNorm IntDomain JensenShannonDivergence MIDDomain NaturalLanguageDomain NormalizedAbsoluteDifference NumericValueComparator Schema Schema.TensorRepresentationGroupEntry SequenceLengthConstraints SequenceMetadata SequenceValueConstraints SparseFeature SparseFeature.IndexFeature SparseFeature.ValueFeature StringDomain StructDomain TensorRepresentation TensorRepresentation.DefaultValue TensorRepresentation.DenseTensor TensorRepresentation.RaggedTensor TensorRepresentation.RaggedTensor.Partition TensorRepresentation.SparseTensor TensorRepresentation.VarLenSparseTensor TensorRepresentationGroup TensorRepresentationGroup.TensorRepresentationEntry TimeDomain TimeOfDayDomain URLDomain UniqueConstraints ValueCount ValueCountList VideoDomain WeightedFeature statistics_pb2 Overview BytesStatistics CategoricalCrossStatistics CommonStatistics CrossFeatureStatistics CustomStatistic DatasetFeatureStatistics DatasetFeatureStatisticsList FeatureNameStatistics Histogram Histogram.Bucket LiftSeries LiftSeries.Bucket LiftSeries.LiftValue LiftStatistics NaturalLanguageStatistics NaturalLanguageStatistics.TokenStatistics NumericCrossStatistics NumericStatistics PresenceAndValencyStatistics RankHistogram RankHistogram.Bucket StringStatistics StringStatistics.FreqAndValue StructStatistics WeightedCommonStatistics WeightedNaturalLanguageStatistics WeightedNumericStatistics WeightedStringStatistics v0 Overview tfx_bsl tfx_bsl.public Overview beam Overview RunInference run_inference Overview CreateModelHandler ModelHandler RunInferenceOnKeyedBatches RunInferencePerModel RunInferencePerModelOnKeyedBatches proto Overview model_spec_pb2 Overview AIPlatformPredictionModelSpec BatchParameters InferenceSpecType SavedModelSpec tfxio Overview BeamRecordCsvTFXIO CsvTFXIO RecordBatchToExamplesEncoder RecordBatchesOptions TFExampleBeamRecord TFExampleRecord TFGraphRecordDecoder TFSequenceExampleBeamRecord TFSequenceExampleRecord TFXIO TensorAdapter TensorAdapterConfig TensorFlowDatasetOptions TensorRepresentations Introduction Tutorials Guide Learn ML TensorFlow (v2.16.1) Versions… TensorFlow.js TensorFlow Lite TFX LIBRARIES TensorFlow.js TensorFlow Lite TFX All libraries RESOURCES Models & datasets Tools Responsible AI Recommendation systems Groups Contribute Blog Forum About Case studies TensorFlow Learn For Production API tfdv.visualize_statistics Stay organized with collections Save and categorize content based on your preferences. View source on GitHub Visualize the input statistics using Facets. tfdv.visualize_statistics( lhs_statistics: statistics_pb2.DatasetFeatureStatisticsList, rhs_statistics: Optional[statistics_pb2.DatasetFeatureStatisticsList] = None, lhs_name: Text = 'lhs_statistics', rhs_name: Text = 'rhs_statistics', allowlist_features: Optional[List[types.FeaturePath]] = None, denylist_features: Optional[List[types.FeaturePath]] = None ) - None Used in the notebooks Used in the tutorials TensorFlow Data Validation FaceSSD Fairness Indicators Example Colab Introduction to Fairness Indicators Args lhs_statistics A DatasetFeatureStatisticsList protocol buffer. rhs_statistics An optional DatasetFeatureStatisticsList protocol buffer to compare with lhs_statistics. lhs_name Name to use for the lhs_statistics dataset if a name is not already provided within the protocol buffer. rhs_name Name to use for the rhs_statistics dataset if a name is not already provided within the protocol buffer. allowlist_features Set of features to be visualized. denylist_features Set of features to ignore for visualization. Raises TypeError If the input argument is not of the expected type. ValueError If the input statistics protos does not have only one dataset. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Last updated 2024-10-18 UTC. [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-18 UTC."],[],[]] Stay connected Blog Forum GitHub Twitter YouTube Support Issue tracker Release notes Stack Overflow Brand guidelines Cite TensorFlow Terms Privacy Manage cookies Sign up for the TensorFlow newsletter Subscribe English 中文 – 简体