def _setup(results, classify, incl_unc=[]):
    'helper function for setting up CART or PRIM\n\n    Parameters\n    ----------\n    results : tuple of DataFrame and dict with numpy arrays\n              the return from :meth:`perform_experiments`.\n    classify : string, function or callable\n               either a string denoting the outcome of interest to\n               use or a function.\n    incl_unc : list of strings\n\n    Notes\n    -----\n    CART, PRIM, and feature scoring only work for a 1D numpy array\n    for the dependent variable\n\n    Raises\n    ------\n    TypeError\n        if classify is not a string or a callable.\n\n    '
    (x, outcomes) = results
    if incl_unc:
        drop_names = (set(x.columns.values.tolist()) - set(incl_unc))
        x = x.drop(drop_names, axis=1)
    if isinstance(classify, str):
        y = outcomes[classify]
        mode = RuleInductionType.REGRESSION
    elif callable(classify):
        y = classify(outcomes)
        mode = RuleInductionType.BINARY
    else:
        raise TypeError('unknown type for classify')
    assert (y.ndim == 1)
    return (x, y, mode)
helper function for setting up CART or PRIM

Parameters
----------
results : tuple of DataFrame and dict with numpy arrays
          the return from :meth:`perform_experiments`.
classify : string, function or callable
           either a string denoting the outcome of interest to
           use or a function.
incl_unc : list of strings

Notes
-----
CART, PRIM, and feature scoring only work for a 1D numpy array
for the dependent variable

Raises
------
TypeError
    if classify is not a string or a callable.
def _setup(results, classify, incl_unc=[]):
    'helper function for setting up CART or PRIM\n\n    Parameters\n    ----------\n    results : tuple of DataFrame and dict with numpy arrays\n              the return from :meth:`perform_experiments`.\n    classify : string, function or callable\n               either a string denoting the outcome of interest to\n               use or a function.\n    incl_unc : list of strings\n\n    Notes\n    -----\n    CART, PRIM, and feature scoring only work for a 1D numpy array\n    for the dependent variable\n\n    Raises\n    ------\n    TypeError\n        if classify is not a string or a callable.\n\n    '
    (x, outcomes) = results
    if incl_unc:
        drop_names = (set(x.columns.values.tolist()) - set(incl_unc))
        x = x.drop(drop_names, axis=1)
    if isinstance(classify, str):
        y = outcomes[classify]
        mode = RuleInductionType.REGRESSION
    elif callable(classify):
        y = classify(outcomes)
        mode = RuleInductionType.BINARY
    else:
        raise TypeError('unknown type for classify')
    assert (y.ndim == 1)
    return (x, y, mode)