示例#1
0
 def get_encoders(self):
     return (
         Unique('a', twin=True),
         Unique('b', twin=True),
         Token('c', twin=True, sequence_length=3),
         Unique('user_id'),
         Pass('price')
     )
示例#2
0
 def get_encoders(self):
     return (
         # An encoder to tokenize product names into max 15 tokens that
         # occur in the corpus at least 10 times in the corpus. We also
         # want the estimator to spend 5x as many resources on name vs
         # department since there are so many more words in english
         # than their are grocery store departments.
         Token('product_name',
               sequence_length=15,
               minimum_occurrences=10,
               embed_scale=5),
         # An encoder to translate department names into unique
         # identifiers that occur at least 50 times
         Unique('department', minimum_occurrences=50))
示例#3
0
文件: pipelines.py 项目: zmyer/lore
 def get_encoders(self):
     return (Unique('a'), Unique('b'), Token('words'))
示例#4
0
 def get_encoders(self):
     return (OneHot('a', minimum_occurrences=1001,
                    compressed=True), OneHot('b'), Token('words'))