class_docstr: A trained model using C++ implementation that is ready to use for classification or export to
  CoreML.
  
  This model should not be constructed directly.
class_docstr_tok: ["A","trained","model","using","C++","implementation","that","is","ready","to","use","for","classification","or","export","to","CoreML",".","This","model","should","not","be","constructed","directly","."]
docstr: Return top-k predictions for the ``dataset``, using the trained model.
  Predictions are returned as an SFrame with three columns: `prediction_id`,
  `class`, and `probability`, or `rank`, depending on the ``output_type``
  parameter.
  
  Parameters
  ----------
  dataset : SFrame
      Dataset of new observations. Must include columns with the same
      names as the features and session id used for model training, but
      does not require a target column. Additional columns are ignored.
  
  output_type : {'probability', 'rank'}, 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.
  
  k : int, optional
      Number of classes to return for each input example.
  
  output_frequency : {'per_row', 'per_window'}, optional
      The frequency of the predictions which is one of:
  
      - 'per_row': Each prediction is returned ``prediction_window`` times.
      - 'per_window': Return a single prediction for each
        ``prediction_window`` rows in ``dataset`` per ``session_id``.
  
  Returns
  -------
  out : SFrame
      An SFrame with model predictions.
  
  See Also
  --------
  predict, classify, evaluate
  
  Examples
  --------
  >>> pred = m.predict_topk(validation_data, k=3)
  >>> pred
  +---------------+-------+-------------------+
  |     row_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  |
  |      ...      |  ...  |        ...        |
  +---------------+-------+-------------------+
docstr_tok: ["Return","top-k","predictions","for","the","``","dataset","``",",","using","the","trained","model",".","Predictions","are","returned","as","an","SFrame","with","three","columns",":","`","prediction_id","`",",","`","class","`",",","and","`","probability","`",",","or","`","rank","`",",","depending","on","the","``","output_type","``","parameter",".","Parameters","--","--","--","--","--","dataset",":","SFrame","Dataset","of","new","observations",".","Must","include","columns","with","the","same","names","as","the","features","and","session","id","used","for","model","training",",","but","does","not","require","a","target","column",".","Additional","columns","are","ignored",".","output_type",":","{","'probability","'",",","'rank","'","}",",","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",".","k",":","int",",","optional","Number","of","classes","to","return","for","each","input","example",".","output_frequency",":","{","'per_row","'",",","'per_window","'","}",",","optional","The","frequency","of","the","predictions","which","is","one","of",":","-","'per_row","'",":","Each","prediction","is","returned","``","prediction_window","``","times",".","-","'per_window","'",":","Return","a","single","prediction","for","each","``","prediction_window","``","rows","in","``","dataset","``","per","``","session_id","``",".","Returns","--","--","--","-","out",":","SFrame","An","SFrame","with","model","predictions",".","See","Also","--","--","--","--","predict",",","classify",",","evaluate","Examples","--","--","--","--",">",">",">","pred","=","m.predict_topk","(","validation_data",",","k=3",")",">",">",">","pred","+","--","--","--","--","--","--","--","-+","--","--","--","-+","--","--","--","--","--","--","--","--","--","-+","|","row_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","|","|","...","|","...","|","...","|","+","--","--","--","--","--","--","--","-+","--","--","--","-+","--","--","--","--","--","--","--","--","--","-+"]
code: def predict_topk(
      self,
      dataset,
      output_type="probability",
      k=3,
      output_frequency="per_row",
  ):
      """
      Return top-k predictions for the ``dataset``, using the trained model.
      Predictions are returned as an SFrame with three columns: `prediction_id`,
      `class`, and `probability`, or `rank`, depending on the ``output_type``
      parameter.
  
      Parameters
      ----------
      dataset : SFrame
          Dataset of new observations. Must include columns with the same
          names as the features and session id used for model training, but
          does not require a target column. Additional columns are ignored.
  
      output_type : {'probability', 'rank'}, 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.
  
      k : int, optional
          Number of classes to return for each input example.
  
      output_frequency : {'per_row', 'per_window'}, optional
          The frequency of the predictions which is one of:
  
          - 'per_row': Each prediction is returned ``prediction_window`` times.
          - 'per_window': Return a single prediction for each
            ``prediction_window`` rows in ``dataset`` per ``session_id``.
  
      Returns
      -------
      out : SFrame
          An SFrame with model predictions.
  
      See Also
      --------
      predict, classify, evaluate
  
      Examples
      --------
      >>> pred = m.predict_topk(validation_data, k=3)
      >>> pred
      +---------------+-------+-------------------+
      |     row_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  |
      |      ...      |  ...  |        ...        |
      +---------------+-------+-------------------+
      """
      if not isinstance(k, int):
          raise TypeError("k must be of type int")
      _tkutl._numeric_param_check_range("k", k, 1, _six.MAXSIZE)
      return self.__proxy__.predict_topk(
          dataset, output_type, k, output_frequency
      )
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import time
  import six
  from turicreate import SFrame
  import turicreate.toolkits._internal_utils
  from turicreate.toolkits import _coreml_utils
  import turicreate.toolkits._feature_engineering._internal_utils
  from turicreate.toolkits._main import ToolkitError
  from turicreate._deps.minimal_package import _minimal_package_import_check
  from turicreate.toolkits._model import Model
label_desc: Use image node_id 9 for calling the ActivityClassifier obj's underlying member method code with example usage: obj.predict_topk(dataset, output_type, k, output_frequency) and returns: self