Module Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Assign NameStore Str If CompareNotIn NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str body AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Index Str BinOpAdd Str NameLoad Import alias Assign TupleStore NameStore NameStore Call NameLoad keyword ListLoad ListLoad Num Num ListLoad Num Num keyword Num keyword Num FunctionDef arguments args NameParam NameParam defaults NameLoad body TryExcept body Import alias Import alias handlers ExceptHandler type NameLoad body Return NameLoad Assign NameStore Call NameLoad Expr Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Num Num keyword TupleLoad Num Num Assign NameStore Num Assign TupleStore NameStore NameStore TupleLoad BinOpSub Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Num BinOpAdd Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Num Assign TupleStore NameStore NameStore TupleLoad BinOpSub Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Num BinOpAdd Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If CompareNotEq NameLoad Num body Assign NameStore Call AttributeLoad Call NameLoad keyword NameLoad keyword Num attr NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ExtSlice Slice Index Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore CompareNotEq Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad NameLoad NameLoad keyword Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad keyword Str keyword Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr BinOpMod Str NameLoad Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str orelse Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad orelse Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num keyword SubscriptLoad Call AttributeLoad NameLoad attr ListLoad Str Str Index NameLoad keyword Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr TupleLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr TupleLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias alias Assign NameStore Call NameLoad keyword Num keyword Num keyword Num keyword Num Return Call NameLoad NameLoad keyword NameLoad decorator_list
N/A N/A numpy np N/A matplotlib.pyplot plt sklearn.datasets make_blobs sklearn.tree DecisionTreeClassifier sklearn.externals.six StringIO sklearn.tree export_graphviz scipy.misc imread scipy ndimage N/A os N/A GRAPHVIS_PATH C:\Program Files (x86)\Graphviz2.38\bin N/A N/A GRAPHVIS_PATH N/A N/A os environ N/A PATH N/A N/A N/A N/A os environ N/A PATH N/A ; GRAPHVIS_PATH N/A re N/A N/A X y N/A make_blobs centers N/A N/A 0 0 N/A 1 1 random_state 61526 n_samples 50 tree_image N/A N/A tree fout N/A None N/A N/A N/A N/A pydot N/A a_reliable_dot_rendering N/A N/A N/A ImportError N/A N/A None N/A dot_data N/A StringIO N/A N/A export_graphviz tree out_file dot_data N/A data N/A N/A re sub gini = 0\.[0-9]+\\n N/A N/A dot_data getvalue N/A data N/A N/A re sub samples = [0-9]+\\n data N/A data N/A N/A re sub \\nsamples = [0-9]+ data N/A graph N/A N/A pydot graph_from_dot_data data N/A N/A fout None N/A N/A fout tmp.png N/A N/A N/A graph write_png fout N/A N/A imread fout N/A plot_tree N/A N/A max_depth N/A 1 N/A N/A N/A fig ax N/A N/A plt subplots 1 2 figsize N/A 15 7 N/A h 0.02 N/A N/A x_min x_max N/A N/A N/A N/A N/A X N/A N/A N/A 0 min 0.5 N/A N/A N/A N/A X N/A N/A N/A 0 max 0.5 N/A N/A y_min y_max N/A N/A N/A N/A N/A X N/A N/A N/A 1 min 0.5 N/A N/A N/A N/A X N/A N/A N/A 1 max 0.5 N/A N/A xx yy N/A N/A np meshgrid N/A N/A np arange x_min x_max h N/A N/A np arange y_min y_max h N/A N/A max_depth 0 N/A N/A tree N/A N/A N/A DecisionTreeClassifier max_depth max_depth random_state 1 fit X y N/A Z N/A N/A N/A tree predict_proba N/A N/A np c_ N/A N/A N/A N/A xx ravel N/A N/A yy ravel N/A N/A N/A 1 N/A Z N/A N/A Z reshape N/A xx shape N/A faces N/A N/A N/A tree tree_ apply N/A N/A N/A N/A np c_ N/A N/A N/A N/A xx ravel N/A N/A yy ravel astype N/A np float32 N/A faces N/A N/A faces reshape N/A xx shape N/A border N/A N/A N/A ndimage laplace faces 0 N/A N/A N/A N/A ax N/A 0 contourf xx yy Z alpha 0.4 N/A N/A N/A N/A ax N/A 0 scatter N/A xx N/A border N/A yy N/A border marker . s 1 N/A N/A N/A N/A ax N/A 0 set_title N/A max_depth = %d max_depth N/A img N/A tree_image tree N/A N/A img None N/A N/A N/A N/A N/A ax N/A 1 imshow i N/A N/A N/A N/A ax N/A 1 axis off N/A N/A N/A N/A N/A ax N/A 1 set_visible False N/A N/A N/A N/A N/A ax N/A 0 set_title data set N/A N/A N/A N/A ax N/A 1 set_visible False N/A N/A N/A N/A ax N/A 0 scatter N/A X N/A N/A N/A 0 N/A X N/A N/A N/A 1 c N/A N/A N/A np array N/A b r N/A y s 60 N/A N/A N/A N/A ax N/A 0 set_xlim x_min x_max N/A N/A N/A N/A ax N/A 0 set_ylim y_min y_max N/A N/A N/A N/A ax N/A 0 set_xticks N/A N/A N/A N/A N/A ax N/A 0 set_yticks N/A N/A plot_tree_interactive N/A N/A N/A N/A IPython.html.widgets interactive IntSlider N/A slider N/A IntSlider min 0 max 8 step 1 value 0 N/A N/A interactive plot_tree max_depth slider N/A