Module Expr Str Print NameLoad Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index CompareLt Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index CompareLt Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Num Assign NameStore TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Assign NameStore TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Assign NameStore TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Assign NameStore TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword Str attr NameLoad NameLoad NameLoad 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 Assign NameStore ListLoad Str Str Str Str Assign NameStore Dict Num Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Num Num Str Expr Call AttributeLoad NameLoad attr
N/A N/A 
=====================================================================
Decision boundary of label propagation versus SVM on the Iris dataset
=====================================================================

Comparison for decision boundary generated on iris dataset
between Label Propagation and SVM.

This demonstrates Label Propagation learning a good boundary
even with a small amount of labeled data.

 N/A __doc__ N/A numpy np N/A matplotlib.pyplot plt sklearn datasets sklearn svm sklearn.semi_supervised label_propagation N/A rng N/A N/A N/A np random RandomState 0 N/A iris N/A N/A datasets load_iris N/A X N/A N/A iris data N/A N/A N/A 2 N/A y N/A iris target N/A h 0.02 N/A y_30 N/A N/A np copy y N/A N/A y_30 N/A N/A N/A N/A rng rand N/A len y 0.3 -1 N/A y_50 N/A N/A np copy y N/A N/A y_50 N/A N/A N/A N/A rng rand N/A len y 0.5 -1 N/A ls30 N/A N/A N/A N/A N/A label_propagation LabelSpreading fit X y_30 y_30 N/A ls50 N/A N/A N/A N/A N/A label_propagation LabelSpreading fit X y_50 y_50 N/A ls100 N/A N/A N/A N/A N/A label_propagation LabelSpreading fit X y y N/A rbf_svc N/A N/A N/A N/A N/A svm SVC kernel rbf fit X y y 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 1 N/A N/A N/A N/A X N/A N/A N/A 0 max 1 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 1 N/A N/A N/A N/A X N/A N/A N/A 1 max 1 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 titles N/A Label Spreading 30% data Label Spreading 50% data Label Spreading 100% data SVC with rbf kernel N/A color_map N/A -1 0 1 2 N/A 1 1 1 N/A 0 0 0.9 N/A 1 0 0 N/A 0.8 0.6 0 N/A N/A i N/A clf y_train N/A enumerate N/A ls30 ls50 ls100 rbf_svc N/A N/A N/A N/A plt subplot 2 2 N/A i 1 N/A Z N/A N/A clf predict N/A N/A np c_ N/A N/A N/A N/A xx ravel N/A N/A yy ravel N/A Z N/A N/A Z reshape N/A xx shape N/A N/A N/A plt contourf xx yy Z cmap N/A N/A plt cm Paired N/A N/A N/A plt axis off N/A colors N/A N/A color_map N/A y N/A y y_train N/A N/A N/A plt scatter N/A X N/A N/A N/A 0 N/A X N/A N/A N/A 1 c colors cmap N/A N/A plt cm Paired N/A N/A N/A plt title N/A titles N/A i N/A N/A N/A plt text 0.9 0 Unlabeled points are colored white N/A N/A N/A plt show