Merge pull request #27588 from neighlyd:patch-1
PiperOrigin-RevId: 243122021
This commit is contained in:
commit
c43ab94a05
@ -1589,7 +1589,7 @@ def categorical_column_with_vocabulary_file_v2(key,
|
|||||||
and `''` for string, which will be dropped by this feature column.
|
and `''` for string, which will be dropped by this feature column.
|
||||||
|
|
||||||
Example with `num_oov_buckets`:
|
Example with `num_oov_buckets`:
|
||||||
File '/us/states.txt' contains 50 lines, each with a 2-character U.S. state
|
File `'/us/states.txt'` contains 50 lines, each with a 2-character U.S. state
|
||||||
abbreviation. All inputs with values in that file are assigned an ID 0-49,
|
abbreviation. All inputs with values in that file are assigned an ID 0-49,
|
||||||
corresponding to its line number. All other values are hashed and assigned an
|
corresponding to its line number. All other values are hashed and assigned an
|
||||||
ID 50-54.
|
ID 50-54.
|
||||||
@ -1604,10 +1604,10 @@ def categorical_column_with_vocabulary_file_v2(key,
|
|||||||
```
|
```
|
||||||
|
|
||||||
Example with `default_value`:
|
Example with `default_value`:
|
||||||
File '/us/states.txt' contains 51 lines - the first line is 'XX', and the
|
File `'/us/states.txt'` contains 51 lines - the first line is `'XX'`, and the
|
||||||
other 50 each have a 2-character U.S. state abbreviation. Both a literal 'XX'
|
other 50 each have a 2-character U.S. state abbreviation. Both a literal
|
||||||
in input, and other values missing from the file, will be assigned ID 0. All
|
`'XX'` in input, and other values missing from the file, will be assigned
|
||||||
others are assigned the corresponding line number 1-50.
|
ID 0. All others are assigned the corresponding line number 1-50.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
states = categorical_column_with_vocabulary_file(
|
states = categorical_column_with_vocabulary_file(
|
||||||
|
Loading…
Reference in New Issue
Block a user