View source on GitHub |
View of statistics for a dataset (slice).
tfdv.DatasetView(
stats_proto: statistics_pb2.DatasetFeatureStatistics
)
Methods
get_cross_feature
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
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
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
list_cross_features() -> Iterable[Tuple[types.FeaturePath, types.FeaturePath]]
Lists cross-feature identifiers.
list_features
list_features() -> Iterable[tfdv.FeaturePath
]
Lists feature identifiers.
proto
proto() -> statistics_pb2.DatasetFeatureStatistics
Retrieve the underlying proto.