class_docstr: A trained model that is ready to use for classification or export to CoreML.
  
  This model should not be constructed directly.
class_docstr_tok: ["A","trained","model","that","is","ready","to","use","for","classification","or","export","to","CoreML",".","This","model","should","not","be","constructed","directly","."]
docstr: Return predictions for ``dataset``, using the trained logistic
  regression model. Predictions can be generated as class labels,
  probabilities that the target value is True, or margins (i.e. the
  distance of the observations from the hyperplane separating the
  classes). `probability_vector` returns a vector of probabilities by
  each class.
  
  For each new example in ``dataset``, the margin---also known as the
  linear predictor---is the inner product of the example and the model
  coefficients. The probability is obtained by passing the margin through
  the logistic function. Predicted classes are obtained by thresholding
  the predicted probabilities at 0.5. If you would like to threshold
  predictions at a different probability level, you can use the
  Turi Create evaluation toolkit.
  
  Parameters
  ----------
  dataset : SFrame | SArray | turicreate.Image | array
      The images to be classified or extracted features.
      If dataset is an SFrame, it must have 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 : {'probability', 'margin', 'class', 'probability_vector'}, optional
      Form of the predictions which are one of:
  
      - 'probability': Prediction probability associated with the True
        class (not applicable for multi-class classification)
      - '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.
  
  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 : SArray
      An SArray with model predictions. If `dataset` is a single image, the
      return value will be a single prediction.
  
  See Also
  ----------
  create, evaluate, classify
  
  Examples
  ----------
  >>> probability_predictions = model.predict(data, output_type='probability')
  >>> margin_predictions = model.predict(data, output_type='margin')
  >>> class_predictions = model.predict(data, output_type='class')
docstr_tok: ["Return","predictions","for","``","dataset","``",",","using","the","trained","logistic","regression","model",".","Predictions","can","be","generated","as","class","labels",",","probabilities","that","the","target","value","is","True",",","or","margins","(","i.e",".","the","distance","of","the","observations","from","the","hyperplane","separating","the","classes",")",".","`","probability_vector","`","returns","a","vector","of","probabilities","by","each","class",".","For","each","new","example","in","``","dataset","``",",","the","margin","--","-also","known","as","the","linear","predictor","--","-is","the","inner","product","of","the","example","and","the","model","coefficients",".","The","probability","is","obtained","by","passing","the","margin","through","the","logistic","function",".","Predicted","classes","are","obtained","by","thresholding","the","predicted","probabilities","at","0.5",".","If","you","would","like","to","threshold","predictions","at","a","different","probability","level",",","you","can","use","the","Turi","Create","evaluation","toolkit",".","Parameters","--","--","--","--","--","dataset",":","SFrame","|","SArray","|","turicreate.Image","|","array","The","images","to","be","classified","or","extracted","features",".","If","dataset","is","an","SFrame",",","it","must","have","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",":","{","'probability","'",",","'margin","'",",","'class","'",",","'probability_vector","'","}",",","optional","Form","of","the","predictions","which","are","one","of",":","-","'probability","'",":","Prediction","probability","associated","with","the","True","class","(","not","applicable","for","multi-class","classification",")","-","'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",".","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",":","SArray","An","SArray","with","model","predictions",".","If","`","dataset","`","is","a","single","image",",","the","return","value","will","be","a","single","prediction",".","See","Also","--","--","--","--","--","create",",","evaluate",",","classify","Examples","--","--","--","--","--",">",">",">","probability_predictions","=","model.predict","(","data",",","output_type='probability","'",")",">",">",">","margin_predictions","=","model.predict","(","data",",","output_type='margin","'",")",">",">",">","class_predictions","=","model.predict","(","data",",","output_type='class","'",")"]
code: def predict(self, dataset, output_type="class", batch_size=64):
      """
      Return predictions for ``dataset``, using the trained logistic
      regression model. Predictions can be generated as class labels,
      probabilities that the target value is True, or margins (i.e. the
      distance of the observations from the hyperplane separating the
      classes). `probability_vector` returns a vector of probabilities by
      each class.
  
      For each new example in ``dataset``, the margin---also known as the
      linear predictor---is the inner product of the example and the model
      coefficients. The probability is obtained by passing the margin through
      the logistic function. Predicted classes are obtained by thresholding
      the predicted probabilities at 0.5. If you would like to threshold
      predictions at a different probability level, you can use the
      Turi Create evaluation toolkit.
  
      Parameters
      ----------
      dataset : SFrame | SArray | turicreate.Image | array
          The images to be classified or extracted features.
          If dataset is an SFrame, it must have 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 : {'probability', 'margin', 'class', 'probability_vector'}, optional
          Form of the predictions which are one of:
  
          - 'probability': Prediction probability associated with the True
            class (not applicable for multi-class classification)
          - '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.
  
      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 : SArray
          An SArray with model predictions. If `dataset` is a single image, the
          return value will be a single prediction.
  
      See Also
      ----------
      create, evaluate, classify
  
      Examples
      ----------
      >>> probability_predictions = model.predict(data, output_type='probability')
      >>> margin_predictions = model.predict(data, output_type='margin')
      >>> class_predictions = model.predict(data, output_type='class')
  
      """
      from array import array
  
      if not isinstance(
          dataset, (_tc.SFrame, _tc.SArray, _tc.Image, array)
      ):
          raise TypeError(
              "dataset must be either an SFrame, SArray or turicreate.Image"
          )
      if batch_size < 1:
          raise ValueError(
              "'batch_size' must be greater than or equal to 1"
          )
  
      dataset, unpack = self._canonize_input(dataset)
  
      extracted_features = self._extract_features(
          dataset, batch_size=batch_size
      )
      return unpack(
          self.classifier.predict(
              extracted_features, output_type=output_type
          )
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  import time
  from turicreate.toolkits._model import CustomModel
  import turicreate.toolkits._internal_utils
  from turicreate.toolkits import _coreml_utils
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._model import PythonProxy
  from turicreate._deps.minimal_package import _minimal_package_import_check
  from .._internal_utils import _mac_ver
  from ..None import _pre_trained_models
  from ..None import _image_feature_extractor
  from ..image_analysis import image_analysis
  from ._evaluation import Evaluation
label_desc: Use image node_id 10 for calling the ImageClassifier obj's underlying member method code with example usage: obj.predict(dataset, output_type, batch_size) and returns: unpack