class_docstr: Implements common methods among tree models:
  - BoostedTreesClassifier
  - BoostedTreesRegression
  - RandomForestClassifier
  - RandomForestRegression
  - DecisionTreeClassifier
  - DecisionTreeRegression
class_docstr_tok: ["Implements","common","methods","among","tree","models",":","-","BoostedTreesClassifier","-","BoostedTreesRegression","-","RandomForestClassifier","-","RandomForestRegression","-","DecisionTreeClassifier","-","DecisionTreeRegression"]
docstr: A simple pure python wrapper around a single (or ensemble) of Turi
  create decision trees.
  
  The tree can be obtained directly from the `trees_json` parameter in
  any GLC tree model objects (boosted trees, random forests, and decision
  trees).
  
  Examples
  --------
  .. sourcecode:: python
  
      # Train a tree ensemble.
      >>> url = 'https://static.turi.com/datasets/xgboost/mushroom.csv'
      >>> data = tc.SFrame.read_csv(url)
  
      >>> train, test = data.random_split(0.8)
      >>> model = tc.boosted_trees_classifier.create(train,
      ...                  target='label', validation_set = None)
  
      # Obtain the model as a tree object.
      >>> tree = model._get_tree()
  
      >>> tree = DecisionTree(model, tree_id = 0)
docstr_tok: ["A","simple","pure","python","wrapper","around","a","single","(","or","ensemble",")","of","Turi","create","decision","trees",".","The","tree","can","be","obtained","directly","from","the","`","trees_json","`","parameter","in","any","GLC","tree","model","objects","(","boosted","trees",",","random","forests",",","and","decision","trees",")",".","Examples","--","--","--","--","..","sourcecode",":",":","python","#","Train","a","tree","ensemble",".",">",">",">","url","=","'https",":","\/\/static.turi.com\/datasets\/xgboost\/mushroom.csv'",">",">",">","data","=","tc.SFrame.read_csv","(","url",")",">",">",">","train",",","test","=","data.random_split","(","0.8",")",">",">",">","model","=","tc.boosted_trees_classifier.create","(","train",",","...","target='label","'",",","validation_set","=","None",")","#","Obtain","the","model","as","a","tree","object",".",">",">",">","tree","=","model._get_tree","(",")",">",">",">","tree","=","DecisionTree","(","model",",","tree_id","=","0",")"]
code: def _get_tree(self, tree_id=0):
      """
      A simple pure python wrapper around a single (or ensemble) of Turi
      create decision trees.
  
      The tree can be obtained directly from the `trees_json` parameter in
      any GLC tree model objects (boosted trees, random forests, and decision
      trees).
  
      Examples
      --------
      .. sourcecode:: python
  
          # Train a tree ensemble.
          >>> url = 'https://static.turi.com/datasets/xgboost/mushroom.csv'
          >>> data = tc.SFrame.read_csv(url)
  
          >>> train, test = data.random_split(0.8)
          >>> model = tc.boosted_trees_classifier.create(train,
          ...                  target='label', validation_set = None)
  
          # Obtain the model as a tree object.
          >>> tree = model._get_tree()
  
          >>> tree = DecisionTree(model, tree_id = 0)
  
      """
      from . import _decision_tree
  
      return _decision_tree.DecisionTree.from_model(self, tree_id)
  
file_path: turicreate/src/python/turicreate/toolkits/_tree_model_mixin.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sframe
  from turicreate.toolkits._supervised_learning import select_default_missing_value_policy
  from turicreate.toolkits import _coreml_utils
label_desc: Use image node_id 6 for calling the TreeModelMixin obj's underlying member method code with example usage: obj._get_tree(tree_id) and returns: _decision_tree