nodes: 0, module; 1, function_definition; 2, function_name:predict; 3, parameters; 4, block; 5, identifier:self; 6, identifier:dataset; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, identifier:output_type; 14, string; 15, comment:"""
          Return predictions for ``dataset``, using the trained model.
  
          Parameters
          ----------
          dataset : SFrame
              dataset of new observations. Must include columns with the same
              names as the features used for model training, but does not require
              a target column. Additional columns are ignored.
  
          output_type : {'class', 'probability_vector'}, optional
              Form of the predictions which are one of:
  
              - 'probability_vector': Prediction probability associated with each
                class as a vector. The probability of the first class (sorted
                alphanumerically by name of the class in the training set) is in
                position 0 of the vector, the second in position 1 and so on.
              - 'class': Class prediction. For multi-class classification, this
                returns the class with maximum probability.
  
          Returns
          -------
          out : SArray
              An SArray with model predictions.
  
          See Also
          ----------
          create, evaluate, classify
  
  
          Examples
          --------
          >>> import turicreate as tc
          >>> dataset = tc.SFrame({'rating': [1, 5], 'text': ['hate it', 'love it']})
          >>> m = tc.text_classifier.create(dataset, 'rating', features=['text'])
          >>> m.predict(dataset)
  
          """; 16, assignment; 17, assignment; 18, assignment; 19, call; 20, string_content:class; 21, identifier:m; 22, subscript; 23, identifier:target; 24, subscript; 25, identifier:f; 26, identifier:_BOW_FEATURE_EXTRACTOR; 27, attribute; 28, argument_list; 29, attribute; 30, string; 31, attribute; 32, string; 33, identifier:m; 34, identifier:predict; 35, call; 36, keyword_argument; 37, identifier:self; 38, identifier:__proxy__; 39, string_content:classifier; 40, identifier:self; 41, identifier:__proxy__; 42, string_content:target; 43, identifier:f; 44, argument_list; 45, identifier:output_type; 46, identifier:output_type; 47, identifier:dataset; 48, identifier:target
code: def predict(self, dataset, output_type='class'):
          """
          Return predictions for ``dataset``, using the trained model.
  
          Parameters
          ----------
          dataset : SFrame
              dataset of new observations. Must include columns with the same
              names as the features used for model training, but does not require
              a target column. Additional columns are ignored.
  
          output_type : {'class', 'probability_vector'}, optional
              Form of the predictions which are one of:
  
              - 'probability_vector': Prediction probability associated with each
                class as a vector. The probability of the first class (sorted
                alphanumerically by name of the class in the training set) is in
                position 0 of the vector, the second in position 1 and so on.
              - 'class': Class prediction. For multi-class classification, this
                returns the class with maximum probability.
  
          Returns
          -------
          out : SArray
              An SArray with model predictions.
  
          See Also
          ----------
          create, evaluate, classify
  
  
          Examples
          --------
          >>> import turicreate as tc
          >>> dataset = tc.SFrame({'rating': [1, 5], 'text': ['hate it', 'love it']})
          >>> m = tc.text_classifier.create(dataset, 'rating', features=['text'])
          >>> m.predict(dataset)
  
          """
          m = self.__proxy__['classifier']
          target = self.__proxy__['target']
          f = _BOW_FEATURE_EXTRACTOR
          return m.predict(f(dataset, target), output_type=output_type)