Beispiel #1
0
 def get_encoders(self):
     if self.type == 'tuple':
         return (Unique('a'), )
     elif self.type == 'len1':
         return (Unique('a'))
     elif self.type == 'single':
         return Unique('a')
Beispiel #2
0
 def get_encoders(self):
     return (
         Unique('id'),
         Unique('first_name'),
         Unique('last_name'),
         Boolean('subscriber'),
         Enum(DateTime('signup_at', 'dayofweek')),
     )
Beispiel #3
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')
     )
 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))
Beispiel #5
0
 def get_encoders(self):
     return (
         Unique('a'),
         Unique('b'),
     )
Beispiel #6
0
 def get_encoders(self):
     return (Unique('a'), Unique('b'), Token('words'))