def decision_tree_train(X, Y, class_weight='balanced', criterion='gini',
    max_depth=None, max_features=None, max_leaf_nodes=None,
    min_samples_leaf=1, min_samples_split=2, min_weight_fraction_leaf=0.0,
    presort=False, random_state=None, splitter='best'):
    """Trains and returns a decision tree classifier from sklearn. Very fast with 200k x 3 feats

    Args:
        X           : 2D Narray (numsamps x numfeats) feature data
        Y           : 1D iterable of class labels

        class_weight: dict {class_label:weight} (apriori expectation of likelihood in output)
                      "balanced" (values of y to inversely adjust weights to input frequency)
                      None (default, assume equal probability)
        criterion   : "gini" for Gini impurity and "entropy" for information gain
        splitter    : "best" selects best split and "random" chooses random split
        max_features: (int) limit number of features to consider at each split, float = percentage of features,
                      "auto"/"sqrt" = sqrt(numfeat) considered, "log2" = log2(numfeat), None = numfeat
        max_depth   : maximum depth of the tree
        min_samples_split: min number of samples that can cause an additional split
        min_samples_leaf : min num of samples required to be a leaf
        min_weight_fraction_leaf: min fraction of numsamp required to be a leaf
        max_leaf_nodes   : overrides max_depth, uses set # of nodes and searches for 'best' by relative reduction in impurity
        presort          : may speed up smaller datasets but slow down larger ones
        random_state     : (int) or default None, the random seed to use

    Returns:
        trained_classifier

    >>> X = [[0, 0], [1, 1]]
    >>> Y = [0, 1]
    >>> classifier = decision_tree_train(X, Y)

    >>> print(classifier.predict([[0, 0]]))
    [0]

    >>> print(classifier.predict([[1, 1]]))
    [1]

    >>> print(classifier.predict([[-0.8, -1],[0.8,1]]))
    [0 1]

    Test 200k example
    >>> numsamp = 200000
    >>> numfeat = 3
    >>> N.random.seed(0)
    >>> X = N.random.random((numsamp, numfeat))
    >>> Y = N.linspace(0,3.99999,numsamp).astype(int)
    >>> classifier = decision_tree_train(X, Y)
    >>> N.random.seed(0)
    >>> classifier.predict(N.random.random(numfeat).reshape(1, -1))
    array([0])

    Test 200k, binary classification
    >>> numsamp = 200000
    >>> numfeat = 3
    >>> N.random.seed(0)
    >>> X = N.random.random((numsamp, numfeat))
    >>> Y = (N.linspace(0,.9999999,numsamp) + 0.5).astype(int)
    >>> classifier = decision_tree_train(X, Y)
    >>> N.random.seed(0)
    >>> classifier.predict(N.random.random(numfeat).reshape(1, -1))
    array([0])
    """
    from sklearn.tree import DecisionTreeClassifier
    DT = DecisionTreeClassifier(class_weight=class_weight, criterion=
        criterion, max_depth=max_depth, max_features=max_features,
        max_leaf_nodes=max_leaf_nodes, min_samples_leaf=min_samples_leaf,
        min_samples_split=min_samples_split, min_weight_fraction_leaf=
        min_weight_fraction_leaf, presort=presort, random_state=
        random_state, splitter=splitter)
    DT.fit(X, Y)
    return DT
