class_docstr: The gradient boosted trees model can be used as a classifier for predictive
  tasks.
  
  The prediction is based on a collection of base learners i.e
  `decision tree classifiers <http://en.wikipedia.org/wiki/Decision_tree_learning>`_
  and combines them through a technique called `gradient boosting
  <http://en.wikipedia.org/wiki/Gradient_boosting>`_.
  
  Different from linear models like logistic regression or SVM, gradient
  boost trees can model non-linear interactions between the features and the
  target. This model is suitable for handling numerical features and
  categorical features with tens of categories but is less suitable for highly
  sparse features (text data), or with categorical variables that encode a
  large number of categories.
  
  This model cannot be constructed directly.  Instead, use
  :func:`turicreate.boosted_trees_classifier.create` to create an instance of
  this model.
  Additional details on parameter options and code samples are available in
  the documentation for the create function.
  
  See Also
  --------
  create
docstr: Return top-k predictions for the ``dataset``, using the trained model.
  Predictions are returned as an SFrame with three columns: `id`,
  `class`, and `probability`, `margin`,  or `rank`, depending on the ``output_type``
  parameter. Input dataset size must be the same as for training of the model.
  
  Parameters
  ----------
  dataset : SFrame
      A dataset that has the same columns that were used during training.
      If the target column exists in ``dataset`` it will be ignored
      while making predictions.
  
  output_type : {'probability', 'rank', 'margin'}, optional
      Choose the return type of the prediction:
  
      - `probability`: Probability associated with each label in the prediction.
      - `rank`       : Rank associated with each label in the prediction.
      - `margin`     : Margin associated with each label in the prediction.
  
  k : int, optional
      Number of classes to return for each input example.
  
  missing_value_action : str, optional
      Action to perform when missing values are encountered. Can be
      one of:
  
      - 'auto': By default the model will treat missing value as is.
      - 'impute': Proceed with evaluation by filling in the missing
        values with the mean of the training data. Missing
        values are also imputed if an entire column of data is
        missing during evaluation.
      - 'error': Do not proceed with evaluation and terminate with
        an error message.
  
  Returns
  -------
  out : SFrame
      An SFrame with model predictions.
  
  See Also
  --------
  predict, classify, evaluate
  
  Examples
  --------
  >>> pred = m.predict_topk(validation_data, k=3)
  >>> pred
  +--------+-------+-------------------+
  | id     | class |   probability     |
  +--------+-------+-------------------+
  |   0    |   4   |   0.995623886585  |
  |   0    |   9   |  0.0038311756216  |
  |   0    |   7   | 0.000301006948575 |
  |   1    |   1   |   0.928708016872  |
  |   1    |   3   |  0.0440889261663  |
  |   1    |   2   |  0.0176190119237  |
  |   2    |   3   |   0.996967732906  |
  |   2    |   2   |  0.00151345680933 |
  |   2    |   7   | 0.000637513934635 |
  |   3    |   1   |   0.998070061207  |
  |  ...   |  ...  |        ...        |
  +--------+-------+-------------------+
  [35688 rows x 3 columns]
docstr_tok: ["Return","top-k","predictions","for","the","``","dataset","``",",","using","the","trained","model",".","Predictions","are","returned","as","an","SFrame","with","three","columns",":","`","id","`",",","`","class","`",",","and","`","probability","`",",","`","margin","`",",","or","`","rank","`",",","depending","on","the","``","output_type","``","parameter",".","Input","dataset","size","must","be","the","same","as","for","training","of","the","model",".","Parameters","--","--","--","--","--","dataset",":","SFrame","A","dataset","that","has","the","same","columns","that","were","used","during","training",".","If","the","target","column","exists","in","``","dataset","``","it","will","be","ignored","while","making","predictions",".","output_type",":","{","'probability","'",",","'rank","'",",","'margin","'","}",",","optional","Choose","the","return","type","of","the","prediction",":","-","`","probability","`",":","Probability","associated","with","each","label","in","the","prediction",".","-","`","rank","`",":","Rank","associated","with","each","label","in","the","prediction",".","-","`","margin","`",":","Margin","associated","with","each","label","in","the","prediction",".","k",":","int",",","optional","Number","of","classes","to","return","for","each","input","example",".","missing_value_action",":","str",",","optional","Action","to","perform","when","missing","values","are","encountered",".","Can","be","one","of",":","-","'auto","'",":","By","default","the","model","will","treat","missing","value","as","is",".","-","'impute","'",":","Proceed","with","evaluation","by","filling","in","the","missing","values","with","the","mean","of","the","training","data",".","Missing","values","are","also","imputed","if","an","entire","column","of","data","is","missing","during","evaluation",".","-","'error","'",":","Do","not","proceed","with","evaluation","and","terminate","with","an","error","message",".","Returns","--","--","--","-","out",":","SFrame","An","SFrame","with","model","predictions",".","See","Also","--","--","--","--","predict",",","classify",",","evaluate","Examples","--","--","--","--",">",">",">","pred","=","m.predict_topk","(","validation_data",",","k=3",")",">",">",">","pred","+","--","--","--","--","+","--","--","--","-+","--","--","--","--","--","--","--","--","--","-+","|","id","|","class","|","probability","|","+","--","--","--","--","+","--","--","--","-+","--","--","--","--","--","--","--","--","--","-+","|","0","|","4","|","0.995623886585","|","|","0","|","9","|","0.0038311756216","|","|","0","|","7","|","0.000301006948575","|","|","1","|","1","|","0.928708016872","|","|","1","|","3","|","0.0440889261663","|","|","1","|","2","|","0.0176190119237","|","|","2","|","3","|","0.996967732906","|","|","2","|","2","|","0.00151345680933","|","|","2","|","7","|","0.000637513934635","|","|","3","|","1","|","0.998070061207","|","|","...","|","...","|","...","|","+","--","--","--","--","+","--","--","--","-+","--","--","--","--","--","--","--","--","--","-+","[","35688","rows","x","3","columns","]"]
code: def predict_topk(
      self,
      dataset,
      output_type="probability",
      k=3,
      missing_value_action="auto",
  ):
      """
      Return top-k predictions for the ``dataset``, using the trained model.
      Predictions are returned as an SFrame with three columns: `id`,
      `class`, and `probability`, `margin`,  or `rank`, depending on the ``output_type``
      parameter. Input dataset size must be the same as for training of the model.
  
      Parameters
      ----------
      dataset : SFrame
          A dataset that has the same columns that were used during training.
          If the target column exists in ``dataset`` it will be ignored
          while making predictions.
  
      output_type : {'probability', 'rank', 'margin'}, optional
          Choose the return type of the prediction:
  
          - `probability`: Probability associated with each label in the prediction.
          - `rank`       : Rank associated with each label in the prediction.
          - `margin`     : Margin associated with each label in the prediction.
  
      k : int, optional
          Number of classes to return for each input example.
  
      missing_value_action : str, optional
          Action to perform when missing values are encountered. Can be
          one of:
  
          - 'auto': By default the model will treat missing value as is.
          - 'impute': Proceed with evaluation by filling in the missing
            values with the mean of the training data. Missing
            values are also imputed if an entire column of data is
            missing during evaluation.
          - 'error': Do not proceed with evaluation and terminate with
            an error message.
  
      Returns
      -------
      out : SFrame
          An SFrame with model predictions.
  
      See Also
      --------
      predict, classify, evaluate
  
      Examples
      --------
      >>> pred = m.predict_topk(validation_data, k=3)
      >>> pred
      +--------+-------+-------------------+
      | id     | class |   probability     |
      +--------+-------+-------------------+
      |   0    |   4   |   0.995623886585  |
      |   0    |   9   |  0.0038311756216  |
      |   0    |   7   | 0.000301006948575 |
      |   1    |   1   |   0.928708016872  |
      |   1    |   3   |  0.0440889261663  |
      |   1    |   2   |  0.0176190119237  |
      |   2    |   3   |   0.996967732906  |
      |   2    |   2   |  0.00151345680933 |
      |   2    |   7   | 0.000637513934635 |
      |   3    |   1   |   0.998070061207  |
      |  ...   |  ...  |        ...        |
      +--------+-------+-------------------+
      [35688 rows x 3 columns]
      """
      _check_categorical_option_type(
          "output_type", output_type, ["rank", "margin", "probability"]
      )
      if missing_value_action == "auto":
          missing_value_action = (
              _sl.select_default_missing_value_policy(self, "predict")
          )
  
      # Low latency path
      if isinstance(dataset, list):
          return self.__proxy__.fast_predict_topk(
              dataset, missing_value_action, output_type, k
          )
      if isinstance(dataset, dict):
          return self.__proxy__.fast_predict_topk(
              [dataset], missing_value_action, output_type, k
          )
      # Fast path
      _raise_error_if_not_sframe(dataset, "dataset")
      return self.__proxy__.predict_topk(
          dataset, missing_value_action, output_type, k
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from turicreate.toolkits._supervised_learning import Classifier
  import turicreate.toolkits._supervised_learning
  from turicreate.toolkits._internal_utils import _toolkit_repr_print
  from turicreate.toolkits._internal_utils import _raise_error_evaluation_metric_is_valid
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sframe
  from turicreate.toolkits._internal_utils import _check_categorical_option_type
  from turicreate.toolkits._tree_model_mixin import TreeModelMixin
  from turicreate.util import _make_internal_url
label_desc: Use image node_id 8 for calling the BoostedTreesClassifier obj's underlying member method code with example usage: obj.predict_topk(dataset, output_type, k, missing_value_action) and returns: self, self, self