Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

column_crossed

Construct a Crossed Column


Description

Returns a column for performing crosses of categorical features. Crossed features will be hashed according to hash_bucket_size.

Usage

column_crossed(keys, hash_bucket_size, hash_key = NULL)

Arguments

keys

An iterable identifying the features to be crossed. Each element can be either:

  • string: Will use the corresponding feature which must be of string type.

  • categorical column: Will use the transformed tensor produced by this column. Does not support hashed categorical columns.

hash_bucket_size

The number of buckets (> 1).

hash_key

Optional: specify the hash_key that will be used by the FingerprintCat64 function to combine the crosses fingerprints on SparseCrossOp.

Value

A crossed column.

Raises

  • ValueError: If len(keys) < 2.

  • ValueError: If any of the keys is neither a string nor categorical column.

  • ValueError: If any of the keys is _HashedCategoricalColumn.

  • ValueError: If hash_bucket_size < 1.

See Also


tfestimators

Interface to 'TensorFlow' Estimators

v1.9.1
Apache License 2.0
Authors
JJ Allaire [aut], Yuan Tang [aut] (<https://orcid.org/0000-0001-5243-233X>), Kevin Ushey [aut], Kevin Kuo [aut, cre] (<https://orcid.org/0000-0001-7803-7901>), Daniel Falbel [ctb, cph], RStudio [cph, fnd], Google Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.