Did I find the right examples for you? yes no

All Samples(9)  |  Call(7)  |  Derive(0)  |  Import(2)

src/s/o/social_media_brand_disambiguator-HEAD/learn1_experiments.py   social_media_brand_disambiguator(Download)
 
        with open("dectree.dot", 'w') as f:
            f = tree.export_graphviz(clf, out_file=f, feature_names=vectorizer.get_feature_names())
        os.system("dot -Tpdf dectree.dot -o dectree.pdf")  # turn dot into PDF for visual
            # diagnosis

src/g/a/gadsdc-HEAD/14-tree/tree.py   gadsdc(Download)
 
dot_data = StringIO.StringIO()
tree.export_graphviz(clf, out_file=dot_data)
graph = pydot.graph_from_dot_data(dot_data.getvalue())
graph.write_pdf('iris_dectree.pdf')

src/g/a/GADS-HEAD/code/abalone_tree.py   GADS(Download)
def create_pdf(clf):
    """Save dec tree graph as pdf."""
    dot_data = StringIO.StringIO() 
    tree.export_graphviz(clf, out_file=dot_data)
    graph = pydot.graph_from_dot_data(dot_data.getvalue())

src/p/y/pyksc-HEAD/src/scripts/tree_infogain.py   pyksc(Download)
from sklearn.metrics import f1_score, precision_score, recall_score
from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import export_graphviz
 
import argparse
                                       importances[indices[f]]))
 
    export_graphviz(forest, 'bala.dot')
 
def create_parser(prog_name):

src/s/c/scikit-learn-0.14.1/sklearn/tree/tests/test_export.py   scikit-learn(Download)
 
from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import export_graphviz
from sklearn.externals.six import StringIO
 
    # Test export code
    out = StringIO()
    export_graphviz(clf, out_file=out)
    contents1 = out.getvalue()
    contents2 = "digraph Tree {\n" \
    # Test with feature_names
    out = StringIO()
    out = export_graphviz(clf, out_file=out, feature_names=["feature0", "feature1"])
    contents1 = out.getvalue()
    contents2 = "digraph Tree {\n" \
    # Test max_depth
    out = StringIO()
    export_graphviz(clf, out_file=out, max_depth=0)
    contents1 = out.getvalue()
    contents2 = "digraph Tree {\n" \