tf.keras.layers.experimental.preprocessing.Discretization.DiscretizingCombiner
Stay organized with collections
Save and categorize content based on your preferences.
Combiner for the Discretization preprocessing layer.
tf.keras.layers.experimental.preprocessing.Discretization.DiscretizingCombiner(
epsilon, num_bins
)
This class encapsulates the computations for finding the quantile boundaries
of a set of data in a stable and numerically correct way. Its associated
accumulator is a namedtuple('summaries'), representing summarizations of
the data used to generate boundaries.
Attributes |
epsilon
|
Error tolerance.
|
num_bins
|
The desired number of buckets.
|
Methods
compute
View source
compute(
values, accumulator=None
)
Compute a step in this computation, returning a new accumulator.
deserialize
View source
deserialize(
encoded_accumulator
)
Deserialize an accumulator received from 'serialize()'.
View source
extract(
accumulator
)
Convert an accumulator into a dict of output values.
merge
View source
merge(
accumulators
)
Merge several accumulators to a single accumulator.
restore
View source
restore(
output
)
Create an accumulator based on 'output'.
serialize
View source
serialize(
accumulator
)
Serialize an accumulator for a remote call.
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. Some content is licensed under the numpy license.
Last updated 2021-05-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-05-14 UTC."],[],[],null,["# tf.keras.layers.experimental.preprocessing.Discretization.DiscretizingCombiner\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L281-L358) |\n\nCombiner for the Discretization preprocessing layer.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.keras.layers.experimental.preprocessing.Discretization.DiscretizingCombiner`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/experimental/preprocessing/Discretization/DiscretizingCombiner)\n\n\u003cbr /\u003e\n\n tf.keras.layers.experimental.preprocessing.Discretization.DiscretizingCombiner(\n epsilon, num_bins\n )\n\nThis class encapsulates the computations for finding the quantile boundaries\nof a set of data in a stable and numerically correct way. Its associated\naccumulator is a namedtuple('summaries'), representing summarizations of\nthe data used to generate boundaries.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|------------|--------------------------------|\n| `epsilon` | Error tolerance. |\n| `num_bins` | The desired number of buckets. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `compute`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L300-L316) \n\n compute(\n values, accumulator=None\n )\n\nCompute a step in this computation, returning a new accumulator.\n\n### `deserialize`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L351-L354) \n\n deserialize(\n encoded_accumulator\n )\n\nDeserialize an accumulator received from 'serialize()'.\n\n### `extract`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L329-L337) \n\n extract(\n accumulator\n )\n\nConvert an accumulator into a dict of output values.\n\n### `merge`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L318-L327) \n\n merge(\n accumulators\n )\n\nMerge several accumulators to a single accumulator.\n\n### `restore`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L339-L342) \n\n restore(\n output\n )\n\nCreate an accumulator based on 'output'.\n\n### `serialize`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/keras/layers/preprocessing/discretization.py#L344-L349) \n\n serialize(\n accumulator\n )\n\nSerialize an accumulator for a remote call."]]