Skip to content

Commit

Permalink
API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfyang committed Oct 26, 2018
1 parent 8c893f1 commit 868c6a5
Show file tree
Hide file tree
Showing 27 changed files with 1,040 additions and 4 deletions.
8 changes: 8 additions & 0 deletions g3doc/_toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
toc:
- title: Get Started
path: /tfx/model_analysis/get_started

- heading: Examples
- title: Chicago Taxi (end-to-end)
path: https://github.com/tensorflow/model-analysis/tree/master/examples/chicago_taxi
status: external
74 changes: 74 additions & 0 deletions g3doc/api_docs/python/_toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Automatically generated file; please do not edit
toc:
- title: tfma
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma
- title: EvaluateAndWriteResults
path: /tfx/model_analysis/api_docs/python/tfma/EvaluateAndWriteResults
- title: load_eval_result
path: /tfx/model_analysis/api_docs/python/tfma/load_eval_result
- title: load_eval_results
path: /tfx/model_analysis/api_docs/python/tfma/load_eval_results
- title: make_eval_results
path: /tfx/model_analysis/api_docs/python/tfma/make_eval_results
- title: multiple_data_analysis
path: /tfx/model_analysis/api_docs/python/tfma/multiple_data_analysis
- title: multiple_model_analysis
path: /tfx/model_analysis/api_docs/python/tfma/multiple_model_analysis
- title: run_model_analysis
path: /tfx/model_analysis/api_docs/python/tfma/run_model_analysis
- title: SingleSliceSpec
path: /tfx/model_analysis/api_docs/python/tfma/SingleSliceSpec
- title: tfma.constants
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma/constants
- title: tfma.export
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma/export
- title: build_parsing_eval_input_receiver_fn
path: /tfx/model_analysis/api_docs/python/tfma/export/build_parsing_eval_input_receiver_fn
- title: make_export_strategy
path: /tfx/model_analysis/api_docs/python/tfma/export/make_export_strategy
- title: tfma.exporter
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma/exporter
- title: FinalExporter
path: /tfx/model_analysis/api_docs/python/tfma/exporter/FinalExporter
- title: LatestExporter
path: /tfx/model_analysis/api_docs/python/tfma/exporter/LatestExporter
- title: tfma.post_export_metrics
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics
- title: auc
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/auc
- title: auc_plots
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/auc_plots
- title: calibration_plot_and_prediction_histogram
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/calibration_plot_and_prediction_histogram
- title: confusion_matrix_at_thresholds
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/confusion_matrix_at_thresholds
- title: example_count
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/example_count
- title: example_weight
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/example_weight
- title: precision_recall_at_k
path: /tfx/model_analysis/api_docs/python/tfma/post_export_metrics/precision_recall_at_k
- title: tfma.version
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma/version
- title: tfma.view
section:
- title: Overview
path: /tfx/model_analysis/api_docs/python/tfma/view
- title: render_plot
path: /tfx/model_analysis/api_docs/python/tfma/view/render_plot
- title: render_slicing_metrics
path: /tfx/model_analysis/api_docs/python/tfma/view/render_slicing_metrics
- title: render_time_series
path: /tfx/model_analysis/api_docs/python/tfma/view/render_time_series
31 changes: 31 additions & 0 deletions g3doc/api_docs/python/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# All symbols in TensorFlow Model Analysis

* <a href="./tfma.md"><code>tfma</code></a>
* <a href="./tfma/EvaluateAndWriteResults.md"><code>tfma.EvaluateAndWriteResults</code></a>
* <a href="./tfma/SingleSliceSpec.md"><code>tfma.SingleSliceSpec</code></a>
* <a href="./tfma/constants.md"><code>tfma.constants</code></a>
* <a href="./tfma/export.md"><code>tfma.export</code></a>
* <a href="./tfma/export/build_parsing_eval_input_receiver_fn.md"><code>tfma.export.build_parsing_eval_input_receiver_fn</code></a>
* <a href="./tfma/export/make_export_strategy.md"><code>tfma.export.make_export_strategy</code></a>
* <a href="./tfma/exporter.md"><code>tfma.exporter</code></a>
* <a href="./tfma/exporter/FinalExporter.md"><code>tfma.exporter.FinalExporter</code></a>
* <a href="./tfma/exporter/LatestExporter.md"><code>tfma.exporter.LatestExporter</code></a>
* <a href="./tfma/load_eval_result.md"><code>tfma.load_eval_result</code></a>
* <a href="./tfma/load_eval_results.md"><code>tfma.load_eval_results</code></a>
* <a href="./tfma/make_eval_results.md"><code>tfma.make_eval_results</code></a>
* <a href="./tfma/multiple_data_analysis.md"><code>tfma.multiple_data_analysis</code></a>
* <a href="./tfma/multiple_model_analysis.md"><code>tfma.multiple_model_analysis</code></a>
* <a href="./tfma/post_export_metrics.md"><code>tfma.post_export_metrics</code></a>
* <a href="./tfma/post_export_metrics/auc.md"><code>tfma.post_export_metrics.auc</code></a>
* <a href="./tfma/post_export_metrics/auc_plots.md"><code>tfma.post_export_metrics.auc_plots</code></a>
* <a href="./tfma/post_export_metrics/calibration_plot_and_prediction_histogram.md"><code>tfma.post_export_metrics.calibration_plot_and_prediction_histogram</code></a>
* <a href="./tfma/post_export_metrics/confusion_matrix_at_thresholds.md"><code>tfma.post_export_metrics.confusion_matrix_at_thresholds</code></a>
* <a href="./tfma/post_export_metrics/example_count.md"><code>tfma.post_export_metrics.example_count</code></a>
* <a href="./tfma/post_export_metrics/example_weight.md"><code>tfma.post_export_metrics.example_weight</code></a>
* <a href="./tfma/post_export_metrics/precision_recall_at_k.md"><code>tfma.post_export_metrics.precision_recall_at_k</code></a>
* <a href="./tfma/run_model_analysis.md"><code>tfma.run_model_analysis</code></a>
* <a href="./tfma/version.md"><code>tfma.version</code></a>
* <a href="./tfma/view.md"><code>tfma.view</code></a>
* <a href="./tfma/view/render_plot.md"><code>tfma.view.render_plot</code></a>
* <a href="./tfma/view/render_slicing_metrics.md"><code>tfma.view.render_slicing_metrics</code></a>
* <a href="./tfma/view/render_time_series.md"><code>tfma.view.render_time_series</code></a>
54 changes: 54 additions & 0 deletions g3doc/api_docs/python/tfma.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfma" />
<meta itemprop="path" content="Stable" />
<meta itemprop="property" content="DATA_CENTRIC_MODE"/>
<meta itemprop="property" content="MODEL_CENTRIC_MODE"/>
<meta itemprop="property" content="VERSION_STRING"/>
</div>

# Module: tfma

Init module for TensorFlow Model Analysis on notebook.

## Modules

[`constants`](./tfma/constants.md) module: Constants used in TensorFlow Model Analysis.

[`export`](./tfma/export.md) module: Library for exporting the EvalSavedModel.

[`exporter`](./tfma/exporter.md) module: `Exporter` class represents different flavors of model export.

[`post_export_metrics`](./tfma/post_export_metrics.md) module: Library containing helpers for adding post export metrics for evaluation.

[`version`](./tfma/version.md) module: Contains the version string for this release of TFMA.

[`view`](./tfma/view.md) module: View API for Tensorflow Model Analysis.

## Classes

[`class SingleSliceSpec`](./tfma/SingleSliceSpec.md): Specification for a single slice.

## Functions

[`EvaluateAndWriteResults(...)`](./tfma/EvaluateAndWriteResults.md)

[`load_eval_result(...)`](./tfma/load_eval_result.md): Creates an EvalResult object for use with the visualization functions.

[`load_eval_results(...)`](./tfma/load_eval_results.md): Run model analysis for a single model on multiple data sets.

[`make_eval_results(...)`](./tfma/make_eval_results.md): Run model analysis for a single model on multiple data sets.

[`multiple_data_analysis(...)`](./tfma/multiple_data_analysis.md): Run model analysis for a single model on multiple data sets.

[`multiple_model_analysis(...)`](./tfma/multiple_model_analysis.md): Run model analysis for multiple models on the same data set.

[`run_model_analysis(...)`](./tfma/run_model_analysis.md): Runs TensorFlow model analysis.

## Other Members

<h3 id="DATA_CENTRIC_MODE"><code>DATA_CENTRIC_MODE</code></h3>

<h3 id="MODEL_CENTRIC_MODE"><code>MODEL_CENTRIC_MODE</code></h3>

<h3 id="VERSION_STRING"><code>VERSION_STRING</code></h3>

14 changes: 14 additions & 0 deletions g3doc/api_docs/python/tfma/EvaluateAndWriteResults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfma.EvaluateAndWriteResults" />
<meta itemprop="path" content="Stable" />
</div>

# tfma.EvaluateAndWriteResults

``` python
tfma.EvaluateAndWriteResults(
*args,
**kwargs
)
```

140 changes: 140 additions & 0 deletions g3doc/api_docs/python/tfma/SingleSliceSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfma.SingleSliceSpec" />
<meta itemprop="path" content="Stable" />
<meta itemprop="property" content="__eq__"/>
<meta itemprop="property" content="__init__"/>
<meta itemprop="property" content="__ne__"/>
<meta itemprop="property" content="generate_slices"/>
<meta itemprop="property" content="is_overall"/>
<meta itemprop="property" content="is_slice_applicable"/>
</div>

# tfma.SingleSliceSpec

## Class `SingleSliceSpec`



Specification for a single slice.

This is intended to be an immutable class that specifies a single slice.
Use this in conjunction with get_slices_for_features_dict to generate slices
for a dictionary of features.

Examples:
- columns = ['age'], features = []
This means to slice by the 'age' column.
- columns = ['age'], features = [('gender', 'female')]
This means to slice by the 'age' column if the 'gender' is 'female'.
- For more examples, refer to the tests in slicer_test.py.

<h2 id="__init__"><code>__init__</code></h2>

``` python
__init__(
columns=(),
features=()
)
```

Initialises a SingleSliceSpec.

#### Args:

* <b>`columns`</b>: an iterable of column names to slice on.
* <b>`features`</b>: a iterable of features to slice on. Each feature is a
(key, value) tuple. Note that the value can be either a string or an
int, and the type is taken into account when comparing values, so
SingleSliceSpec(features=[('age', '5')]) will *not* match a slice
with age=[5] (age is a string in the spec, but an int in the slice).


#### Raises:

* <b>`ValueError`</b>: There was overlap between the columns specified in columns
and those in features.
* <b>`ValueError`</b>: columns or features was a string: they should probably be a
singleton list containing that string.



## Methods

<h3 id="__eq__"><code>__eq__</code></h3>

``` python
__eq__(other)
```

Return self==value.

<h3 id="__ne__"><code>__ne__</code></h3>

``` python
__ne__(other)
```

Return self!=value.

<h3 id="generate_slices"><code>generate_slices</code></h3>

``` python
generate_slices(accessor)
```

Generates all slices that match this specification from the data.

Should only be called within this file.

Examples:
- columns = [], features = []
slice accessor has features age=[5], gender=['f'], interest=['knitting']
returns [[]]
- columns = ['age'], features = [('gender', 'f')]
slice accessor has features age=[5], gender=['f'], interest=['knitting']
returns [[('age', 5), ('gender, 'f')]]
- columns = ['interest'], features = [('gender', 'f')]
slice accessor has features age=[5], gender=['f'],
interest=['knitting', 'games']
returns [[('gender', 'f'), ('interest, 'knitting')],
[('gender', 'f'), ('interest, 'games')]]

#### Args:

* <b>`accessor`</b>: slice accessor.


#### Yields:

A SliceKeyType for each slice that matches this specification. Nothing
will be yielded if there no slices matched this specification. The entries
in the yielded SliceKeyTypes are guaranteed to be sorted by key names (and
then values, if necessary), ascending.

<h3 id="is_overall"><code>is_overall</code></h3>

``` python
is_overall()
```

Returns True if this specification represents the overall slice.

<h3 id="is_slice_applicable"><code>is_slice_applicable</code></h3>

``` python
is_slice_applicable(slice_key)
```

Determines if this slice spec is applicable to a slice of data.

#### Args:

* <b>`slice_key`</b>: The slice as a SliceKeyType


#### Returns:

True if the slice_spec is applicable to the given slice, False otherwise.



29 changes: 29 additions & 0 deletions g3doc/api_docs/python/tfma/constants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfma.constants" />
<meta itemprop="path" content="Stable" />
<meta itemprop="property" content="DATA_CENTRIC_MODE"/>
<meta itemprop="property" content="FEATURES_PREDICTIONS_LABELS_KEY"/>
<meta itemprop="property" content="MODEL_CENTRIC_MODE"/>
<meta itemprop="property" content="SLICE_KEYS"/>
<meta itemprop="property" content="SLICE_KEYS_MATERIALIZED"/>
<meta itemprop="property" content="UNKNOWN_EVAL_MODE"/>
</div>

# Module: tfma.constants

Constants used in TensorFlow Model Analysis.

## Other Members

<h3 id="DATA_CENTRIC_MODE"><code>DATA_CENTRIC_MODE</code></h3>

<h3 id="FEATURES_PREDICTIONS_LABELS_KEY"><code>FEATURES_PREDICTIONS_LABELS_KEY</code></h3>

<h3 id="MODEL_CENTRIC_MODE"><code>MODEL_CENTRIC_MODE</code></h3>

<h3 id="SLICE_KEYS"><code>SLICE_KEYS</code></h3>

<h3 id="SLICE_KEYS_MATERIALIZED"><code>SLICE_KEYS_MATERIALIZED</code></h3>

<h3 id="UNKNOWN_EVAL_MODE"><code>UNKNOWN_EVAL_MODE</code></h3>

20 changes: 20 additions & 0 deletions g3doc/api_docs/python/tfma/export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfma.export" />
<meta itemprop="path" content="Stable" />
<meta itemprop="property" content="EvalInputReceiverType"/>
</div>

# Module: tfma.export

Library for exporting the EvalSavedModel.

## Functions

[`build_parsing_eval_input_receiver_fn(...)`](../tfma/export/build_parsing_eval_input_receiver_fn.md): Build a eval_input_receiver_fn expecting fed tf.Examples.

[`make_export_strategy(...)`](../tfma/export/make_export_strategy.md): Create an ExportStrategy for EvalSavedModel.

## Other Members

<h3 id="EvalInputReceiverType"><code>EvalInputReceiverType</code></h3>

Loading

0 comments on commit 868c6a5

Please sign in to comment.