class_docstr: Support Vector Machines can be used to predict binary target variable using
  several feature variables.
  
  The :py:class:`~turicreate.svm.SVMClassifier` model predicts a binary target
  variable given one or more feature variables. In an SVM model, the examples
  are represented as points in space, mapped so that the examples from the
  two classes being classified are divided by linear separator.
  
  Given a set of features :math:`x_i`, and a label :math:`y_i \in \{0,1\}`,
  SVM minimizes the loss function:
  
      .. math::
        f_i(\theta) =  \max(1 - \theta^T x, 0)
  
  An intercept term is added by appending a column of 1's to the features.
  Regularization is often required to prevent over fitting by penalizing
  models with extreme parameter values. The composite objective being
  optimized for is the following:
  
      .. math::
         \min_{\theta} \sum_{i = 1}^{n} f_i(\theta) + \lambda ||\theta||^{2}_{2}
  
  where :math:`\lambda` is the ``penalty`` parameter.
  
  This model cannot be constructed directly.  Instead, use
  :func:`turicreate.svm_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.
  
  Examples
  --------
  
  .. sourcecode:: python
  
      # Load the data (From an S3 bucket)
      >>> import turicreate as tc
      >>> data =  tc.SFrame('https://static.turi.com/datasets/regression/houses.csv')
  
      # Make sure the target is binary 0/1
      >>> data['is_expensive'] = data['price'] > 30000
  
      # Make a logistic regression model
      >>> model = tc.svm_classifier.create(data, target='is_expensive'
                                      , features=['bath', 'bedroom', 'size'])
  
      # Extract the coefficients
      >>> coefficients = model.coefficients # an SFrame
  
      # Make predictions (as margins, or class)
      >>> predictions = model.progressredict(data)    # Predicts 0/1
      >>> predictions = model.progressredict(data, output_type='margin')
  
      # Evaluate the model
      >>> results = model.progressvaluate(data)               # a dictionary
  
  See Also
  --------
  create
class_docstr_tok: ["Support","Vector","Machines","can","be","used","to","predict","binary","target","variable","using","several","feature","variables",".","The",":","py",":","class",":","`","~turicreate.svm.SVMClassifier","`","model","predicts","a","binary","target","variable","given","one","or","more","feature","variables",".","In","an","SVM","model",",","the","examples","are","represented","as","points","in","space",",","mapped","so","that","the","examples","from","the","two","classes","being","classified","are","divided","by","linear","separator",".","Given","a","set","of","features",":","math",":","`","x_i","`",",","and","a","label",":","math",":","`","y_i","\\in","\\","{","0,1\\","}","`",",","SVM","minimizes","the","loss","function",":","..","math",":",":","f_i","(","\\theta",")","=","\\max","(","1","-","\\theta^T","x",",","0",")","An","intercept","term","is","added","by","appending","a","column","of","1","'s","to","the","features",".","Regularization","is","often","required","to","prevent","over","fitting","by","penalizing","models","with","extreme","parameter","values",".","The","composite","objective","being","optimized","for","is","the","following",":","..","math",":",":","\\min_","{","\\theta","}","\\sum_","{","i","=","1","}","^","{","n","}","f_i","(","\\theta",")","+","\\lambda","||\\theta||^","{","2","}","_","{","2","}","where",":","math",":","`","\\lambda","`","is","the","``","penalty","``","parameter",".","This","model","can","not","be","constructed","directly",".","Instead",",","use",":","func",":","`","turicreate.svm_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",".","Examples","--","--","--","--","..","sourcecode",":",":","python","#","Load","the","data","(","From","an","S3","bucket",")",">",">",">","import","turicreate","as","tc",">",">",">","data","=","tc.SFrame","(","'https",":","\/\/static.turi.com\/datasets\/regression\/houses.csv","'",")","#","Make","sure","the","target","is","binary","0\/1",">",">",">","data","[","'is_expensive","'","]","=","data","[","'price","'","]",">","30000","#","Make","a","logistic","regression","model",">",">",">","model","=","tc.svm_classifier.create","(","data",",","target='is_expensive'",",","features=","[","'bath","'",",","'bedroom","'",",","'size","'","]",")","#","Extract","the","coefficients",">",">",">","coefficients","=","model.coefficients","#","an","SFrame","#","Make","predictions","(","as","margins",",","or","class",")",">",">",">","predictions","=","model.progressredict","(","data",")","#","Predicts","0\/1",">",">",">","predictions","=","model.progressredict","(","data",",","output_type='margin","'",")","#","Evaluate","the","model",">",">",">","results","=","model.progressvaluate","(","data",")","#","a","dictionary","See","Also","--","--","--","--","create"]
docstr: Evaluate the model by making predictions of target values and comparing
  these to actual values.
  
  Two metrics are used to evaluate SVM. The confusion table contains the
  cross-tabulation of actual and predicted classes for the target
  variable. classifier accuracy is the fraction of examples whose
  predicted and actual classes match.
  
  Parameters
  ----------
  dataset : SFrame
      Dataset of new observations. Must include columns with the same
      names as the target and features used for model training. Additional
      columns are ignored.
  
  metric : str, optional
      Name of the evaluation metric.  Possible values are:
  
      - 'auto'             : Returns all available metrics.
      - 'accuracy '        : Classification accuracy (micro average).
      - 'precision'        : Precision score (micro average)
      - 'recall'           : Recall score (micro average)
      - 'f1_score'         : F1 score (micro average)
      - 'confusion_matrix' : An SFrame with counts of possible prediction/true
                             label combinations.
  
  missing_value_action : str, optional
      Action to perform when missing values are encountered. This can be
      one of:
  
      - 'auto': Default to 'impute'
      - '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 : dict
      Dictionary of evaluation results where the key is the name of the
      evaluation metric (e.g. `accuracy`) and the value is the evaluation
      score.
  
  See Also
  ----------
  create, predict, classify
  
  Examples
  ----------
  .. sourcecode:: python
  
    >>> data =  turicreate.SFrame('https://static.turi.com/datasets/regression/houses.csv')
  
    >>> data['is_expensive'] = data['price'] > 30000
    >>> model = turicreate.svm_classifier.create(data,           ...                                        target='is_expensive',           ...                                        features=['bath', 'bedroom', 'size'])
    >>> results = model.progressvaluate(data)
    >>> print results['accuracy']
docstr_tok: ["Evaluate","the","model","by","making","predictions","of","target","values","and","comparing","these","to","actual","values",".","Two","metrics","are","used","to","evaluate","SVM",".","The","confusion","table","contains","the","cross-tabulation","of","actual","and","predicted","classes","for","the","target","variable",".","classifier","accuracy","is","the","fraction","of","examples","whose","predicted","and","actual","classes","match",".","Parameters","--","--","--","--","--","dataset",":","SFrame","Dataset","of","new","observations",".","Must","include","columns","with","the","same","names","as","the","target","and","features","used","for","model","training",".","Additional","columns","are","ignored",".","metric",":","str",",","optional","Name","of","the","evaluation","metric",".","Possible","values","are",":","-","'auto","'",":","Returns","all","available","metrics",".","-","'accuracy","'",":","Classification","accuracy","(","micro","average",")",".","-","'precision","'",":","Precision","score","(","micro","average",")","-","'recall","'",":","Recall","score","(","micro","average",")","-","'f1_score","'",":","F1","score","(","micro","average",")","-","'confusion_matrix","'",":","An","SFrame","with","counts","of","possible","prediction\/true","label","combinations",".","missing_value_action",":","str",",","optional","Action","to","perform","when","missing","values","are","encountered",".","This","can","be","one","of",":","-","'auto","'",":","Default","to","'impute'","-","'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",":","dict","Dictionary","of","evaluation","results","where","the","key","is","the","name","of","the","evaluation","metric","(","e.g",".","`","accuracy","`",")","and","the","value","is","the","evaluation","score",".","See","Also","--","--","--","--","--","create",",","predict",",","classify","Examples","--","--","--","--","--","..","sourcecode",":",":","python",">",">",">","data","=","turicreate.SFrame","(","'https",":","\/\/static.turi.com\/datasets\/regression\/houses.csv","'",")",">",">",">","data","[","'is_expensive","'","]","=","data","[","'price","'","]",">","30000",">",">",">","model","=","turicreate.svm_classifier.create","(","data",",","...","target='is_expensive","'",",","...","features=","[","'bath","'",",","'bedroom","'",",","'size","'","]",")",">",">",">","results","=","model.progressvaluate","(","data",")",">",">",">","print","results","[","'accuracy","'","]"]
code: def evaluate(
      self,
      dataset,
      metric="auto",
      missing_value_action="auto",
      with_predictions=False,
  ):
      """
          Evaluate the model by making predictions of target values and comparing
          these to actual values.
  
          Two metrics are used to evaluate SVM. The confusion table contains the
          cross-tabulation of actual and predicted classes for the target
          variable. classifier accuracy is the fraction of examples whose
          predicted and actual classes match.
  
          Parameters
          ----------
          dataset : SFrame
              Dataset of new observations. Must include columns with the same
              names as the target and features used for model training. Additional
              columns are ignored.
  
          metric : str, optional
              Name of the evaluation metric.  Possible values are:
  
              - 'auto'             : Returns all available metrics.
              - 'accuracy '        : Classification accuracy (micro average).
              - 'precision'        : Precision score (micro average)
              - 'recall'           : Recall score (micro average)
              - 'f1_score'         : F1 score (micro average)
              - 'confusion_matrix' : An SFrame with counts of possible prediction/true
                                     label combinations.
  
          missing_value_action : str, optional
              Action to perform when missing values are encountered. This can be
              one of:
  
              - 'auto': Default to 'impute'
              - '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 : dict
              Dictionary of evaluation results where the key is the name of the
              evaluation metric (e.g. `accuracy`) and the value is the evaluation
              score.
  
          See Also
          ----------
          create, predict, classify
  
          Examples
          ----------
          .. sourcecode:: python
  
            >>> data =  turicreate.SFrame('https://static.turi.com/datasets/regression/houses.csv')
  
            >>> data['is_expensive'] = data['price'] > 30000
            >>> model = turicreate.svm_classifier.create(data, \
            ...                                        target='is_expensive', \
            ...                                        features=['bath', 'bedroom', 'size'])
            >>> results = model.progressvaluate(data)
            >>> print results['accuracy']
          """
      _raise_error_evaluation_metric_is_valid(
          metric,
          [
              "auto",
              "accuracy",
              "confusion_matrix",
              "precision",
              "recall",
              "f1_score",
          ],
      )
      return super(_Classifier, self).evaluate(
          dataset,
          missing_value_action=missing_value_action,
          metric=metric,
          with_predictions=with_predictions,
      )
  
file_path: turicreate/src/python/turicreate/toolkits/classifier/svm_classifier.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate.toolkits._supervised_learning
  from turicreate.toolkits._supervised_learning import Classifier
  from turicreate.toolkits._internal_utils import _toolkit_repr_print, _toolkit_get_topk_bottomk, _raise_error_evaluation_metric_is_valid, _check_categorical_option_type, _summarize_coefficients
label_desc: Use image node_id 10 for calling the SVMClassifier obj's underlying member method code with example usage: obj.evaluate(dataset, metric, missing_value_action, with_predictions) and returns: super