tfdv.DatasetView
Stay organized with collections Save and categorize content based on your preferences.
View of statistics for a dataset (slice).
tfdv.DatasetView( stats_proto: statistics_pb2.DatasetFeatureStatistics )
Methods
get_cross_feature
View source
get_cross_feature( x_path: Union[str, tfdv.FeaturePath
, Iterable[str]], y_path: Union[str, tfdv.FeaturePath
, Iterable[str]] ) -> Optional['CrossFeatureView']
Retrieve a cross-feature if it exists, or None.
get_derived_feature
View source
get_derived_feature( deriver_name: str, source_paths: Sequence[tfdv.FeaturePath
] ) -> Optional['FeatureView']
Retrieve a derived feature based on a deriver name and its inputs.
Args |
deriver_name | The name of a deriver. Matches validation_derived_source deriver_name. |
source_paths | Source paths for derived features. Matches validation_derived_source.source_path. |
Returns |
FeatureView of derived feature. |
Raises |
ValueError if multiple derived features match. |
get_feature
View source
get_feature( feature_id: Union[str, tfdv.FeaturePath
, Iterable[str]] ) -> Optional['FeatureView']
Retrieve a feature if it exists.
Features specified within the underlying proto by name (instead of path) are normalized to a length 1 path, and can be referred to as such.
Args |
feature_id | A types.FeaturePath, Iterable[str] consisting of path steps, or a str, which is converted to a length one path. |
Returns |
A FeatureView, or None if feature_id is not present. |
list_cross_features
View source
list_cross_features() -> Iterable[Tuple[types.FeaturePath, types.FeaturePath]]
Lists cross-feature identifiers.
list_features
View source
list_features() -> Iterable[tfdv.FeaturePath
]
Lists feature identifiers.
proto
View source
proto() -> statistics_pb2.DatasetFeatureStatistics
Retrieve the underlying proto.
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."],[],[],null,["# tfdv.DatasetView\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L428-L559) |\n\nView of statistics for a dataset (slice). \n\n tfdv.DatasetView(\n stats_proto: statistics_pb2.DatasetFeatureStatistics\n )\n\nMethods\n-------\n\n### `get_cross_feature`\n\n[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L493-L507) \n\n get_cross_feature(\n x_path: Union[str, ../tfdv/FeaturePath, Iterable[str]],\n y_path: Union[str, ../tfdv/FeaturePath, Iterable[str]]\n ) -\u003e Optional['CrossFeatureView']\n\nRetrieve a cross-feature if it exists, or None.\n\n### `get_derived_feature`\n\n[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L520-L559) \n\n get_derived_feature(\n deriver_name: str,\n source_paths: Sequence[../tfdv/FeaturePath]\n ) -\u003e Optional['FeatureView']\n\nRetrieve a derived feature based on a deriver name and its inputs.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|----------------|-----------------------------------------------------------------------------------|\n| `deriver_name` | The name of a deriver. Matches validation_derived_source deriver_name. |\n| `source_paths` | Source paths for derived features. Matches validation_derived_source.source_path. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| FeatureView of derived feature. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|---|---|\n| ValueError if multiple derived features match. ||\n\n\u003cbr /\u003e\n\n### `get_feature`\n\n[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L471-L491) \n\n get_feature(\n feature_id: Union[str, ../tfdv/FeaturePath, Iterable[str]]\n ) -\u003e Optional['FeatureView']\n\nRetrieve a feature if it exists.\n\nFeatures specified within the underlying proto by name (instead of path) are\nnormalized to a length 1 path, and can be referred to as such.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|--------------|-------------------------------------------------------------------------------------------------------------------|\n| `feature_id` | A types.FeaturePath, Iterable\\[str\\] consisting of path steps, or a str, which is converted to a length one path. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| A FeatureView, or None if feature_id is not present. ||\n\n\u003cbr /\u003e\n\n### `list_cross_features`\n\n[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L514-L518) \n\n list_cross_features() -\u003e Iterable[Tuple[types.FeaturePath, types.FeaturePath]]\n\nLists cross-feature identifiers.\n\n### `list_features`\n\n[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L509-L512) \n\n list_features() -\u003e Iterable[../tfdv/FeaturePath]\n\nLists feature identifiers.\n\n### `proto`\n\n[View source](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/stats_util.py#L467-L469) \n\n proto() -\u003e statistics_pb2.DatasetFeatureStatistics\n\nRetrieve the underlying proto."]]