 BucketizedColumn - Maple Help

DeepLearning

 BucketizedColumn
 bucketized feature column Calling Sequence BucketizedColumn(fc,boundaries) Parameters

 fc - feature column boundaries - list of extended_numeric; boundaries for buckets Description

 • The BucketizedColumn(fc,boundaries) command creates a new feature column by assigning continuous data represented in fc into a discrete number of buckets defined by boundaries.
 • This function is part of the DeepLearning package, so it can be used in the short form BucketizedColumn(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[BucketizedColumn](..). Details

 • The implementation of BucketizedColumn uses the tf.feature_column.bucketized_column function from the TensorFlow Python API Documentation. Consult the TensorFlow API documentation for tf.feature_column.bucketized_column for more information. Examples

Define a feature which takes a single value, in this case a physical measurement from a flower. Then assign it to one of five buckets.

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $\mathrm{fc}≔\mathrm{NumericColumn}\left("PetalLength",\mathrm{shape}=\left[1\right],\mathrm{datatype}={\mathrm{float}}_{8}\right)$
 ${\mathrm{fc}}{≔}\left[\begin{array}{c}{\mathrm{Feature Column}}\\ {\mathrm{NumericColumn\left(key=\text{'}PetalLength\text{'}, shape=\left(1,\right), default_value=None, dtype=tf.float64, normalizer_fn=None\right)}}\end{array}\right]$ (1)
 > $\mathrm{bc}≔\mathrm{BucketizedColumn}\left(\mathrm{fc},\left[2,3.5,5,6.5\right]\right)$
 ${\mathrm{bc}}{≔}\left[\begin{array}{c}{\mathrm{Feature Column}}\\ {\mathrm{BucketizedColumn\left(source_column=NumericColumn\left(key=\text{'}PetalLength\text{'}, shape=\left(1,\right), default_value=None, dtype=tf.float64, normalizer_fn=None\right), boundaries=\left(2, 3.5, 5, 6.5\right)\right)}}\end{array}\right]$ (2) Compatibility

 • The DeepLearning[BucketizedColumn] command was introduced in Maple 2018.