class_docstr: Logistic regression models a discrete target variable as a function of
  several feature variables.
  
  The :class:`~turicreate.logistic_classifier.logisticClassifier` uses
  a discrete target variable :math:`y` instead of a scalar. For each
  observation, the probability that :math:`y=1` (instead of 0) is modeled as
  the logistic function of a linear combination of the feature values.
  
  Given a set of features :math:`x_i`, and a label :math:`y_i \in \{0,1\}`,
  logistic regression interprets the probability that the label is in one class
  as a logistic function of a linear combination of the features.
  
      .. math::
        f_i(\theta) =  p(y_i = 1 | x) = \frac{1}{1 + \exp(-\theta^T x)}
  
  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 logistic regression module
  supports l1 and l2 regularization, which are added to the loss function.
  
  The composite objective being optimized for is the following;
  
      .. math::
         \min_{\theta} \sum_{i = 1}^{n} f_i(\theta) + \lambda_1 ||\theta||_1 + \lambda_2 ||\theta||^{2}_{2}
  
  where :math:`\lambda_1` is the ``l1_penalty`` and :math:`\lambda_2` is the
  ``l2_penalty``.
  
  For multi-class models, we perform multinomial logistic regression, which
  is an extension of the binary logistic regression model discussed above.
  
  This model cannot be constructed directly.  Instead, use
  :func:`turicreate.logistic_classifier.create` to create an instance of this
  model. A detailed list of parameter options and code samples are available
  in the documentation for the create function.
  
  Examples
  --------
  .. sourcecode:: python
  
      # Load the data (From an S3 bucket)
      >>> data =  turicreate.SFrame('https://static.turi.com/datasets/regression/houses.csv')
  
      # Make sure the target is discrete
      >>> data['is_expensive'] = data['price'] > 30000
  
      # Make a logistic regression model
      >>> model = turicreate.logistic_classifier.create(data, target='is_expensive', features=['bath', 'bedroom', 'size'])
  
      # Extract the coefficients
      >>> coefficients = model.coefficients
  
      # Make predictions (as margins, probability, or class)
      >>> predictions = model.predict(data)
      >>> predictions = model.predict(data, output_type='probability')
      >>> predictions = model.predict(data, output_type='margin')
  
      # Evaluate the model
      >>> results = model.evaluate(data)
  
  See Also
  --------
  create
class_docstr_tok: ["Logistic","regression","models","a","discrete","target","variable","as","a","function","of","several","feature","variables",".","The",":","class",":","`","~turicreate.logistic_classifier.logisticClassifier","`","uses","a","discrete","target","variable",":","math",":","`","y","`","instead","of","a","scalar",".","For","each","observation",",","the","probability","that",":","math",":","`","y=1","`","(","instead","of","0",")","is","modeled","as","the","logistic","function","of","a","linear","combination","of","the","feature","values",".","Given","a","set","of","features",":","math",":","`","x_i","`",",","and","a","label",":","math",":","`","y_i","\\in","\\","{","0,1\\","}","`",",","logistic","regression","interprets","the","probability","that","the","label","is","in","one","class","as","a","logistic","function","of","a","linear","combination","of","the","features",".","..","math",":",":","f_i","(","\\theta",")","=","p","(","y_i","=","1","|","x",")","=","\\frac","{","1","}","{","1","+","\\exp","(","-\\theta^T","x",")","}","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","logistic","regression","module","supports","l1","and","l2","regularization",",","which","are","added","to","the","loss","function",".","The","composite","objective","being","optimized","for","is","the","following",";","..","math",":",":","\\min_","{","\\theta","}","\\sum_","{","i","=","1","}","^","{","n","}","f_i","(","\\theta",")","+","\\lambda_1","||\\theta||_1","+","\\lambda_2","||\\theta||^","{","2","}","_","{","2","}","where",":","math",":","`","\\lambda_1","`","is","the","``","l1_penalty","``","and",":","math",":","`","\\lambda_2","`","is","the","``","l2_penalty","``",".","For","multi-class","models",",","we","perform","multinomial","logistic","regression",",","which","is","an","extension","of","the","binary","logistic","regression","model","discussed","above",".","This","model","can","not","be","constructed","directly",".","Instead",",","use",":","func",":","`","turicreate.logistic_classifier.create","`","to","create","an","instance","of","this","model",".","A","detailed","list","of","parameter","options","and","code","samples","are","available","in","the","documentation","for","the","create","function",".","Examples","--","--","--","--","..","sourcecode",":",":","python","#","Load","the","data","(","From","an","S3","bucket",")",">",">",">","data","=","turicreate.SFrame","(","'https",":","\/\/static.turi.com\/datasets\/regression\/houses.csv","'",")","#","Make","sure","the","target","is","discrete",">",">",">","data","[","'is_expensive","'","]","=","data","[","'price","'","]",">","30000","#","Make","a","logistic","regression","model",">",">",">","model","=","turicreate.logistic_classifier.create","(","data",",","target='is_expensive","'",",","features=","[","'bath","'",",","'bedroom","'",",","'size","'","]",")","#","Extract","the","coefficients",">",">",">","coefficients","=","model.coefficients","#","Make","predictions","(","as","margins",",","probability",",","or","class",")",">",">",">","predictions","=","model.predict","(","data",")",">",">",">","predictions","=","model.predict","(","data",",","output_type='probability","'",")",">",">",">","predictions","=","model.predict","(","data",",","output_type='margin","'",")","#","Evaluate","the","model",">",">",">","results","=","model.evaluate","(","data",")","See","Also","--","--","--","--","create"]
docstr: Return the value of a given field. The list of all queryable fields is
  detailed below, and can be obtained programmatically with the
  :func:`~turicreate.logistic_classifier.LogisticClassifier._list_fields`
  method.
  
  +------------------------+-------------------------------------------------------------+
  |      Field             | Description                                                 |
  +========================+=============================================================+
  | coefficients           | Regression coefficients                                     |
  +------------------------+-------------------------------------------------------------+
  | convergence_threshold  | Desired solver accuracy                                     |
  +------------------------+-------------------------------------------------------------+
  | feature_rescaling      | Bool indicating l2-rescaling of features                    |
  +------------------------+-------------------------------------------------------------+
  | features               | Feature column names                                        |
  +------------------------+-------------------------------------------------------------+
  | l1_penalty             | l1 regularization weight                                    |
  +------------------------+-------------------------------------------------------------+
  | l2_penalty             | l2 regularization weight                                    |
  +------------------------+-------------------------------------------------------------+
  | lbfgs_memory_level     | LBFGS memory level                                          |
  +------------------------+-------------------------------------------------------------+
  | max_iterations         | Maximum number of solver iterations                         |
  +------------------------+-------------------------------------------------------------+
  | num_coefficients       | Number of coefficients in the model                         |
  +------------------------+-------------------------------------------------------------+
  | num_examples           | Number of examples used for training                        |
  +------------------------+-------------------------------------------------------------+
  | num_features           | Number of dataset columns used for training                 |
  +------------------------+-------------------------------------------------------------+
  | num_unpacked_features  | Number of features (including expanded list/dict features)  |
  +------------------------+-------------------------------------------------------------+
  | solver                 | Type of solver                                              |
  +------------------------+-------------------------------------------------------------+
  | step_size              | Initial step size for the solver                            |
  +------------------------+-------------------------------------------------------------+
  | target                 | Target column name                                          |
  +------------------------+-------------------------------------------------------------+
  | training_iterations    | Number of solver iterations                                 |
  +------------------------+-------------------------------------------------------------+
  | training_loss          | Maximized Log-likelihood                                    |
  +------------------------+-------------------------------------------------------------+
  | training_solver_status | Solver status after training                                |
  +------------------------+-------------------------------------------------------------+
  | training_time          | Training time (excludes preprocessing)                      |
  +------------------------+-------------------------------------------------------------+
  | unpacked_features      | Feature names (including expanded list/dict features)       |
  +------------------------+-------------------------------------------------------------+
  
  Parameters
  ----------
  field : string
      Name of the field to be retrieved.
  
  Returns
  -------
  out
      Value of the requested fields.
docstr_tok: ["Return","the","value","of","a","given","field",".","The","list","of","all","queryable","fields","is","detailed","below",",","and","can","be","obtained","programmatically","with","the",":","func",":","`","~turicreate.logistic_classifier.LogisticClassifier._list_fields","`","method",".","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","Field","|","Description","|","+========================+=============================================================+","|","coefficients","|","Regression","coefficients","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","convergence_threshold","|","Desired","solver","accuracy","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","feature_rescaling","|","Bool","indicating","l2-rescaling","of","features","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","features","|","Feature","column","names","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","l1_penalty","|","l1","regularization","weight","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","l2_penalty","|","l2","regularization","weight","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","lbfgs_memory_level","|","LBFGS","memory","level","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","max_iterations","|","Maximum","number","of","solver","iterations","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","num_coefficients","|","Number","of","coefficients","in","the","model","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","num_examples","|","Number","of","examples","used","for","training","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","num_features","|","Number","of","dataset","columns","used","for","training","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","num_unpacked_features","|","Number","of","features","(","including","expanded","list\/dict","features",")","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","solver","|","Type","of","solver","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","step_size","|","Initial","step","size","for","the","solver","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","target","|","Target","column","name","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","training_iterations","|","Number","of","solver","iterations","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","training_loss","|","Maximized","Log-likelihood","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","training_solver_status","|","Solver","status","after","training","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","training_time","|","Training","time","(","excludes","preprocessing",")","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","unpacked_features","|","Feature","names","(","including","expanded","list\/dict","features",")","|","+","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","Parameters","--","--","--","--","--","field",":","string","Name","of","the","field","to","be","retrieved",".","Returns","--","--","--","-","out","Value","of","the","requested","fields","."]
code: def _get(self, field):
      """
      Return the value of a given field. The list of all queryable fields is
      detailed below, and can be obtained programmatically with the
      :func:`~turicreate.logistic_classifier.LogisticClassifier._list_fields`
      method.
  
      +------------------------+-------------------------------------------------------------+
      |      Field             | Description                                                 |
      +========================+=============================================================+
      | coefficients           | Regression coefficients                                     |
      +------------------------+-------------------------------------------------------------+
      | convergence_threshold  | Desired solver accuracy                                     |
      +------------------------+-------------------------------------------------------------+
      | feature_rescaling      | Bool indicating l2-rescaling of features                    |
      +------------------------+-------------------------------------------------------------+
      | features               | Feature column names                                        |
      +------------------------+-------------------------------------------------------------+
      | l1_penalty             | l1 regularization weight                                    |
      +------------------------+-------------------------------------------------------------+
      | l2_penalty             | l2 regularization weight                                    |
      +------------------------+-------------------------------------------------------------+
      | lbfgs_memory_level     | LBFGS memory level                                          |
      +------------------------+-------------------------------------------------------------+
      | max_iterations         | Maximum number of solver iterations                         |
      +------------------------+-------------------------------------------------------------+
      | num_coefficients       | Number of coefficients in the model                         |
      +------------------------+-------------------------------------------------------------+
      | num_examples           | Number of examples used for training                        |
      +------------------------+-------------------------------------------------------------+
      | num_features           | Number of dataset columns used for training                 |
      +------------------------+-------------------------------------------------------------+
      | num_unpacked_features  | Number of features (including expanded list/dict features)  |
      +------------------------+-------------------------------------------------------------+
      | solver                 | Type of solver                                              |
      +------------------------+-------------------------------------------------------------+
      | step_size              | Initial step size for the solver                            |
      +------------------------+-------------------------------------------------------------+
      | target                 | Target column name                                          |
      +------------------------+-------------------------------------------------------------+
      | training_iterations    | Number of solver iterations                                 |
      +------------------------+-------------------------------------------------------------+
      | training_loss          | Maximized Log-likelihood                                    |
      +------------------------+-------------------------------------------------------------+
      | training_solver_status | Solver status after training                                |
      +------------------------+-------------------------------------------------------------+
      | training_time          | Training time (excludes preprocessing)                      |
      +------------------------+-------------------------------------------------------------+
      | unpacked_features      | Feature names (including expanded list/dict features)       |
      +------------------------+-------------------------------------------------------------+
  
      Parameters
      ----------
      field : string
          Name of the field to be retrieved.
  
      Returns
      -------
      out
          Value of the requested fields.
      """
      return super(_Classifier, self)._get(field)
  
file_path: turicreate/src/python/turicreate/toolkits/classifier/logistic_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_if_not_sframe, _check_categorical_option_type, _raise_error_evaluation_metric_is_valid, _summarize_coefficients
label_desc: Use image node_id 7 for calling the LogisticClassifier obj's underlying member method code with example usage: obj._get(field) and returns: super