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: Print a string description of the model, when the model name is entered
  in the terminal.
docstr_tok: ["Print","a","string","description","of","the","model",",","when","the","model","name","is","entered","in","the","terminal","."]
code: def __repr__(self):
      """
      Print a string description of the model, when the model name is entered
      in the terminal.
      """
  
      (sections, section_titles) = self._get_summary_struct()
      return _toolkit_repr_print(
          self, sections, section_titles, width=30
      )
  
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 5 for calling the SVMClassifier obj's underlying member method code with example usage: obj.__repr__() and returns: _toolkit_repr_print