View source on GitHub |
Query statistic metrics.
Inherits From: Metric
tfma.metrics.QueryStatistics(
total_queries_name: str = TOTAL_QUERIES_NAME,
total_documents_name: str = TOTAL_DOCUMENTS_NAME,
min_documents_name: str = MIN_DOCUMENTS_NAME,
max_documents_name: str = MAX_DOCUMENTS_NAME
)
These metrics are query/ranking based so a query_key must also be provided in the associated metrics spec.
Args | |
---|---|
total_queries_name
|
Total queries metric name. |
total_documents_name
|
Total documents metric name. |
min_documents_name
|
Min documents name. |
max_documents_name
|
Max documents name. |
Methods
computations
computations(
eval_config: Optional[tfma.EvalConfig
] = None,
schema: Optional[schema_pb2.Schema] = None,
model_names: Optional[List[str]] = None,
output_names: Optional[List[str]] = None,
sub_keys: Optional[List[Optional[SubKey]]] = None,
aggregation_type: Optional[AggregationType] = None,
class_weights: Optional[Dict[int, float]] = None,
example_weighted: bool = False,
query_key: Optional[str] = None
) -> tfma.metrics.MetricComputations
Creates computations associated with metric.
from_config
@classmethod
from_config( config: Dict[str, Any] ) -> 'Metric'
get_config
get_config() -> Dict[str, Any]
Returns serializable config.