class_docstr: A trained model that is ready to use for sound classification or to export to CoreML.
  
  This model should not be constructed directly.
  
  See Also
  ----------
  create
class_docstr_tok: ["A","trained","model","that","is","ready","to","use","for","sound","classification","or","to","export","to","CoreML",".","This","model","should","not","be","constructed","directly",".","See","Also","--","--","--","--","--","create"]
docstr: Return top-k predictions for the ``dataset``.
  Predictions are returned as an SFrame with three columns: `id`,
  `class`, and `probability` or `rank` depending on the ``output_type``
  parameter.
  
  Parameters
  ----------
  dataset : SFrame | SArray | dict
      The audio data to be classified.
      If dataset is an SFrame, it must have a column with the same name as
      the feature 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.
  
  verbose : bool, optional
      If True, prints progress updates and model details.
  
  batch_size : int, optional
      If you are getting memory errors, try decreasing this value. If you
      have a powerful computer, increasing this value may improve performance.
  
  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  |
  | ...  |  ...  |        ...        |
  +------+-------+-------------------+
docstr_tok: ["Return","top-k","predictions","for","the","``","dataset","``",".","Predictions","are","returned","as","an","SFrame","with","three","columns",":","`","id","`",",","`","class","`",",","and","`","probability","`","or","`","rank","`","depending","on","the","``","output_type","``","parameter",".","Parameters","--","--","--","--","--","dataset",":","SFrame","|","SArray","|","dict","The","audio","data","to","be","classified",".","If","dataset","is","an","SFrame",",","it","must","have","a","column","with","the","same","name","as","the","feature","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",".","verbose",":","bool",",","optional","If","True",",","prints","progress","updates","and","model","details",".","batch_size",":","int",",","optional","If","you","are","getting","memory","errors",",","try","decreasing","this","value",".","If","you","have","a","powerful","computer",",","increasing","this","value","may","improve","performance",".","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","|","|","...","|","...","|","...","|","+","--","--","--","+","--","--","--","-+","--","--","--","--","--","--","--","--","--","-+"]
code: def predict_topk(
      self,
      dataset,
      output_type="probability",
      k=3,
      verbose=True,
      batch_size=64,
  ):
      """
      Return top-k predictions for the ``dataset``.
      Predictions are returned as an SFrame with three columns: `id`,
      `class`, and `probability` or `rank` depending on the ``output_type``
      parameter.
  
      Parameters
      ----------
      dataset : SFrame | SArray | dict
          The audio data to be classified.
          If dataset is an SFrame, it must have a column with the same name as
          the feature 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.
  
      verbose : bool, optional
          If True, prints progress updates and model details.
  
      batch_size : int, optional
          If you are getting memory errors, try decreasing this value. If you
          have a powerful computer, increasing this value may improve performance.
  
      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  |
      | ...  |  ...  |        ...        |
      +------+-------+-------------------+
      """
      if not isinstance(k, int):
          raise TypeError("'k' must be of type int.")
      _tk_utils._numeric_param_check_range("k", k, 1, _six.MAXSIZE)
      prob_vector = self.predict(
          dataset,
          output_type="probability_vector",
          verbose=verbose,
          batch_size=batch_size,
      )
      id_to_label = self._id_to_class_label
  
      if output_type == "probability":
          results = prob_vector.apply(
              lambda p: [
                  {"class": id_to_label[i], "probability": p[i]}
                  for i in reversed(_np.argsort(p)[-k:])
              ]
          )
      else:
          assert output_type == "rank"
          results = prob_vector.apply(
              lambda p: [
                  {"class": id_to_label[i], "rank": rank}
                  for rank, i in enumerate(
                      reversed(_np.argsort(p)[-k:])
                  )
              ]
          )
  
      results = _tc.SFrame({"X": results})
      results = results.add_row_number()
      results = results.stack("X", new_column_name="X")
      results = results.unpack("X", column_name_prefix="")
      return results
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import logging
  from math import ceil
  import numpy
  import six
  import turicreate
  import turicreate.toolkits._internal_utils
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._model import CustomModel
  from turicreate.toolkits._model import PythonProxy
  from turicreate.toolkits import _coreml_utils
  from turicreate._deps.minimal_package import _minimal_package_import_check
label_desc: Use image node_id 13 for calling the SoundClassifier obj's underlying member method code with example usage: obj.predict_topk(dataset, output_type, k, verbose, batch_size) and returns: results