afe.apis.statisticο
Analysis of statistics on tensors.
Attributesο
Functionsο
|
Equality as a distance metric. |
|
Mean value of difference between input values and ground truth values. |
Create a Statistic over a stream of (x, y) pairs |
|
Apply an independent Statistic to each tensor in a stream of pairs of |
|
|
Create a statistic that takes input pairs (i, g) |
|
Create a statistic that takes input pairs (i, g) |
Module Contentsο
- afe.apis.statistic.equality(x: afe.apis.compilation_job_base.Tensor, y: afe.apis.compilation_job_base.Tensor) float [source]ο
Equality as a distance metric.
Return 0 if the tensors are equal, 1 otherwise.
- afe.apis.statistic.mean_float(x: afe.apis.compilation_job_base.Tensor, y: afe.apis.compilation_job_base.Tensor) float [source]ο
Mean value of difference between input values and ground truth values.
- afe.apis.statistic.threshold_test_counter(metric: Metric, threshold: float) afe.driver.statistic.Statistic[Tuple[afe.apis.compilation_job_base.Tensor, afe.apis.compilation_job_base.Tensor], str] [source]ο
Create a Statistic over a stream of (x, y) pairs that counts the number of times metric(x, y) < threshold is satisfied.
- Parameters:
metric β Distance metric
threshold β Threshold to compare against
- Returns:
Statistic that captures the data
- afe.apis.statistic.tensor_set_statistics(statistics: List[afe.driver.statistic.Statistic[Tuple[Any, Any], str]]) afe.driver.statistic.Statistic[Tuple[List[Any], List[Any]], str] [source]ο
Apply an independent Statistic to each tensor in a stream of pairs of fixed-length lists.
This is intended for evaluating models that have multiple outputs and a ground truth value corresponding to each output. Each Statistic would be applied to one of the outputs and ground truth values.
- Parameters:
statistics β Statistic to apply to each pair of values
- Returns:
Composed statistic that applies the statistics to list items
- afe.apis.statistic.mean(metric: Metric) afe.driver.statistic.Statistic[Tuple[List[afe.apis.compilation_job_base.Tensor], afe.apis.compilation_job_base.Tensor], float] [source]ο
Create a statistic that takes input pairs (i, g) and computes the arithmetic mean of metric(i, g) over all given inputs.
- Parameters:
metric β Mean metric.
- Returns:
Statistic that captures the data
- afe.apis.statistic.mean_text(metric: Metric) afe.driver.statistic.Statistic[Tuple[List[afe.apis.compilation_job_base.Tensor], afe.apis.compilation_job_base.Tensor], str] [source]ο
Create a statistic that takes input pairs (i, g) and computes the arithmetic mean of metric(i, g) over all given inputs and formats the results as text message.
- Parameters:
metric β Mean metric.
- Returns:
Statistic that captures the data