class_docstr: Accessor to ``sklearn.model_selection``.
class_docstr_tok: ["Accessor","to","``","sklearn.model_selection","``","."]
docstr: Call ``sklearn.cross_validation.train_test_split`` using automatic mapping.
  
  Parameters
  ----------
  reset_index : bool
      logical value whether to reset index, default False
  kwargs : keywords passed to ``cross_validation.train_test_split``
  
  Returns
  -------
  train, test : tuple of ``ModelFrame``
docstr_tok: ["Call","``","sklearn.cross_validation.train_test_split","``","using","automatic","mapping",".","Parameters","--","--","--","--","--","reset_index",":","bool","logical","value","whether","to","reset","index",",","default","False","kwargs",":","keywords","passed","to","``","cross_validation.train_test_split","``","Returns","--","--","--","-","train",",","test",":","tuple","of","``","ModelFrame","``"]
code: def train_test_split(self, reset_index=False, *args, **kwargs):
      """
      Call ``sklearn.cross_validation.train_test_split`` using automatic mapping.
  
      Parameters
      ----------
      reset_index : bool
          logical value whether to reset index, default False
      kwargs : keywords passed to ``cross_validation.train_test_split``
  
      Returns
      -------
      train, test : tuple of ``ModelFrame``
      """
      func = self._module.train_test_split
  
      def _init(klass, data, index, **kwargs):
          if reset_index:
              return klass(data, **kwargs)
          else:
              return klass(data, index=index, **kwargs)
  
      data = self._data
      idx = self._df.index
      if self._df.has_target():
          target = self._target
          tr_d, te_d, tr_l, te_l, tr_i, te_i = func(
              data.values, target.values, idx.values, *args, **kwargs
          )
  
          # Create DataFrame here to retain data and target names
          tr_d = _init(pd.DataFrame, tr_d, tr_i, columns=data.columns)
          te_d = _init(pd.DataFrame, te_d, te_i, columns=data.columns)
          tr_l = _init(pd.Series, tr_l, tr_i, name=target.name)
          te_l = _init(pd.Series, te_l, te_i, name=target.name)
  
          train_df = self._constructor(data=tr_d, target=tr_l)
          test_df = self._constructor(data=te_d, target=te_l)
          return train_df, test_df
      else:
          tr_d, te_d, tr_i, te_i = func(
              data.values, idx.values, *args, **kwargs
          )
  
          # Create DataFrame here to retain data and target names
          tr_d = _init(pd.DataFrame, tr_d, tr_i, columns=data.columns)
          te_d = _init(pd.DataFrame, te_d, te_i, columns=data.columns)
  
          train_df = self._constructor(data=tr_d)
          train_df.target_name = self._df.target_name
          test_df = self._constructor(data=te_d)
          test_df.target_name = self._df.target_name
          return train_df, test_df
  
file_path: pandas-ml/pandas_ml/skaccessors/model_selection.py
imports: import warnings
  import pandas
  from pandas_ml.core.accessor import _AccessorMethods
label_desc: Use image node_id 4 for calling the ModelSelectionMethods obj's underlying member method code with example usage: obj.train_test_split(reset_index) and returns: train_df,  test_df, train_df,  test_df, klass, klass