# Module: tfma.utils

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/utils/__init__.py) |

Init module for TensorFlow Model Analysis utils.

## Classes

[`class CombineFnWithModels`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/CombineFnWithModels): Abstract class for CombineFns that need the shared models.

[`class DoFnWithModels`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/DoFnWithModels): Abstract class for DoFns that need the shared models.

## Functions

[`calculate_confidence_interval(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/calculate_confidence_interval): Calculate confidence intervals based 95% confidence level.

[`compound_key(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/compound_key): Returns a compound key based on a list of keys.

[`create_keys_key(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/create_keys_key): Creates secondary key representing the sparse keys associated with key.

[`create_values_key(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/create_values_key): Creates secondary key representing sparse values associated with key.

[`get_baseline_model_spec(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/get_baseline_model_spec): Returns baseline model spec.

[`get_by_keys(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/get_by_keys): Returns value with given key(s) in (possibly multi-level) dict.

[`get_model_spec(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/get_model_spec): Returns model spec with given model name.

[`get_model_type(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/get_model_type): Returns model type for given model spec taking into account defaults.

[`get_non_baseline_model_specs(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/get_non_baseline_model_specs): Returns non-baseline model specs.

[`has_change_threshold(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/has_change_threshold): Checks whether the eval_config has any change thresholds.

[`merge_extracts(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/merge_extracts): Merges list of extracts into a single extract with multidimensional data.

[`model_construct_fn(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/model_construct_fn): Returns function for constructing shared models.

[`unique_key(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/unique_key): Returns a unique key given a list of current keys.

[`update_eval_config_with_defaults(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/update_eval_config_with_defaults): Returns a new config with default settings applied.

[`verify_and_update_eval_shared_models(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/verify_and_update_eval_shared_models): Verifies eval shared models and normnalizes to produce a single list.

[`verify_eval_config(...)`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/utils/verify_eval_config): Verifies eval config.