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: For each example in the dataset, extract the leaf indices of
  each tree as features.
  
  For multiclass classification, each leaf index contains #num_class
  numbers.
  
  The returned feature vectors can be used as input to train another
  supervised learning model such as a
  :py:class:`~turicreate.logistic_classifier.LogisticClassifier`,
  or a :py:class:`~turicreate.svm_classifier.SVMClassifier`.
  
  Parameters
  ----------
  dataset : SFrame
      Dataset of new observations. Must include columns with the same
      names as the features used for model training, but does not require
      a target column. Additional columns are ignored.
  
  missing_value_action: str, optional
      Action to perform when missing values are encountered. This can be
      one of:
  
      - 'auto': Choose a model dependent missing value policy.
      - '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.
      - 'none': Treat missing value as is. Model must be able to handle
                missing value.
      - 'error' : Do not proceed with prediction and terminate with
                  an error message.
  
  Returns
  -------
  out : SArray
      An SArray of dtype array.array containing extracted features.
  
  Examples
  --------
  >>> data =  turicreate.SFrame(
      'https://static.turi.com/datasets/regression/houses.csv')
  
  >>> # Regression Tree Models
  >>> data['regression_tree_features'] = model.extract_features(data)
  
  >>> # Classification Tree Models
  >>> data['classification_tree_features'] = model.extract_features(data)
docstr_tok: ["For","each","example","in","the","dataset",",","extract","the","leaf","indices","of","each","tree","as","features",".","For","multiclass","classification",",","each","leaf","index","contains","#","num_class","numbers",".","The","returned","feature","vectors","can","be","used","as","input","to","train","another","supervised","learning","model","such","as","a",":","py",":","class",":","`","~turicreate.logistic_classifier.LogisticClassifier","`",",","or","a",":","py",":","class",":","`","~turicreate.svm_classifier.SVMClassifier","`",".","Parameters","--","--","--","--","--","dataset",":","SFrame","Dataset","of","new","observations",".","Must","include","columns","with","the","same","names","as","the","features","used","for","model","training",",","but","does","not","require","a","target","column",".","Additional","columns","are","ignored",".","missing_value_action",":","str",",","optional","Action","to","perform","when","missing","values","are","encountered",".","This","can","be","one","of",":","-","'auto","'",":","Choose","a","model","dependent","missing","value","policy",".","-","'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",".","-","'none","'",":","Treat","missing","value","as","is",".","Model","must","be","able","to","handle","missing","value",".","-","'error","'",":","Do","not","proceed","with","prediction","and","terminate","with","an","error","message",".","Returns","--","--","--","-","out",":","SArray","An","SArray","of","dtype","array.array","containing","extracted","features",".","Examples","--","--","--","--",">",">",">","data","=","turicreate.SFrame","(","'https",":","\/\/static.turi.com\/datasets\/regression\/houses.csv","'",")",">",">",">","#","Regression","Tree","Models",">",">",">","data","[","'regression_tree_features","'","]","=","model.extract_features","(","data",")",">",">",">","#","Classification","Tree","Models",">",">",">","data","[","'classification_tree_features","'","]","=","model.extract_features","(","data",")"]
code: def extract_features(self, dataset, missing_value_action="auto"):
      """
      For each example in the dataset, extract the leaf indices of
      each tree as features.
  
      For multiclass classification, each leaf index contains #num_class
      numbers.
  
      The returned feature vectors can be used as input to train another
      supervised learning model such as a
      :py:class:`~turicreate.logistic_classifier.LogisticClassifier`,
      or a :py:class:`~turicreate.svm_classifier.SVMClassifier`.
  
      Parameters
      ----------
      dataset : SFrame
          Dataset of new observations. Must include columns with the same
          names as the features used for model training, but does not require
          a target column. Additional columns are ignored.
  
      missing_value_action: str, optional
          Action to perform when missing values are encountered. This can be
          one of:
  
          - 'auto': Choose a model dependent missing value policy.
          - '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.
          - 'none': Treat missing value as is. Model must be able to handle
                    missing value.
          - 'error' : Do not proceed with prediction and terminate with
                      an error message.
  
      Returns
      -------
      out : SArray
          An SArray of dtype array.array containing extracted features.
  
      Examples
      --------
      >>> data =  turicreate.SFrame(
          'https://static.turi.com/datasets/regression/houses.csv')
  
      >>> # Regression Tree Models
      >>> data['regression_tree_features'] = model.extract_features(data)
  
      >>> # Classification Tree Models
      >>> data['classification_tree_features'] = model.extract_features(data)
      """
      _raise_error_if_not_sframe(dataset, "dataset")
      if missing_value_action == "auto":
          missing_value_action = select_default_missing_value_policy(
              self, "extract_features"
          )
  
      return self.__proxy__.extract_features(
          dataset, missing_value_action
      )
  
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 2 for calling the TreeModelMixin obj's underlying member method code with example usage: obj.extract_features(dataset, missing_value_action) and returns: self