tfma.view.render_slicing_metrics
Stay organized with collections
Save and categorize content based on your preferences.
Renders the slicing metrics view as widget.
tfma.view.render_slicing_metrics(
result: tfma.EvalResult
,
slicing_column: Optional[str] = None,
slicing_spec: Optional[Union[slicer.SingleSliceSpec, tfma.SlicingSpec
]] = None,
weighted_example_column: Optional[str] = None,
event_handlers: Optional[Callable[[Dict[str, Union[str, float]]], None]] = None
) -> Optional[visualization.SlicingMetricsViewer]
Used in the notebooks
Args |
result
|
An tfma.EvalResult.
|
slicing_column
|
The column to slice on.
|
slicing_spec
|
The tfma.SlicingSpec to filter results. If neither column nor
spec is set, show overall.
|
weighted_example_column
|
Override for the weighted example column. This can
be used when different weights are applied in different aprts of the model
(eg: multi-head).
|
event_handlers
|
The event handlers
|
Returns |
A SlicingMetricsViewer object if in Jupyter notebook; None if in Colab.
|
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-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfma.view.render_slicing_metrics\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/view/widget_view.py#L26-L57) |\n\nRenders the slicing metrics view as widget. \n\n tfma.view.render_slicing_metrics(\n result: ../../tfma/EvalResult,\n slicing_column: Optional[str] = None,\n slicing_spec: Optional[Union[slicer.SingleSliceSpec, ../../tfma/SlicingSpec]] = None,\n weighted_example_column: Optional[str] = None,\n event_handlers: Optional[Callable[[Dict[str, Union[str, float]]], None]] = None\n ) -\u003e Optional[visualization.SlicingMetricsViewer]\n\n### Used in the notebooks\n\n| Used in the tutorials |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| - [TFX Estimator Component Tutorial](https://www.tensorflow.org/tfx/tutorials/tfx/components) - [TFX Keras Component Tutorial](https://www.tensorflow.org/tfx/tutorials/tfx/components_keras) - [Create a TFX pipeline for your data with Penguin template](https://www.tensorflow.org/tfx/tutorials/tfx/penguin_template) - [Model analysis using TFX Pipeline and TensorFlow Model Analysis](https://www.tensorflow.org/tfx/tutorials/tfx/penguin_tfma) |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `result` | An tfma.EvalResult. |\n| `slicing_column` | The column to slice on. |\n| `slicing_spec` | The tfma.SlicingSpec to filter results. If neither column nor spec is set, show overall. |\n| `weighted_example_column` | Override for the weighted example column. This can be used when different weights are applied in different aprts of the model (eg: multi-head). |\n| `event_handlers` | The event handlers |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A SlicingMetricsViewer object if in Jupyter notebook; None if in Colab. ||\n\n\u003cbr /\u003e"]]