DeepLearning - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : Constructing Feature Columns : DeepLearning/CategoricalColumn

DeepLearning

  

CategoricalColumn

  

categorical feature column

 

Calling Sequence

Parameters

Options

Description

Details

Examples

Compatibility

Calling Sequence

CategoricalColumn(key,categories,opts)

Parameters

key

-

string; label for feature column

categories

-

list of strings or integers; category values in input

opts

-

zero or more options as specified below

Options

• 

datatype=one of integer[4],integer[8], or string

The value of option datatype specifies the type of data this column will hold.

Description

• 

The CategoricalColumn(c) command creates a feature column to represent categorical data, data whose values are taken from some finite set known in advance, consisting of strings and integer values.

• 

This function is part of the DeepLearning package, so it can be used in the short form CategoricalColumn(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[CategoricalColumn](..).

Details

• 

The implementation of CategoricalColumn uses the tf.feature_column.categorical_column_with_vocabulary_list command from the TensorFlow Python API Documentation. Consult the TensorFlow API documentation for tf.feature_column.categorical_column_with_vocabulary_list for more information.

Examples

Define a feature which takes one or four color names.

withDeepLearning:

fcCategoricalColumncolor,red,white,blue,green

fcFeature ColumnVocabularyListCategoricalColumn(key='color', vocabulary_list=('red', 'white', 'blue', 'green'), dtype=tf.string, default_value=-1, num_oov_buckets=0)

(1)

Compatibility

• 

The DeepLearning[CategoricalColumn] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

DeepLearning

DNNClassifier

Feature Column