Module Expr Str Print NameLoad Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Call AttributeLoad Call NameLoad keyword Num keyword Num attr 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 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 Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad NameLoad Num SubscriptLoad NameLoad Index TupleLoad NameLoad Num keyword NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr Index NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Return BinOpDiv BinOpSub UnaryOpUSub BinOpMult NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num decorator_list Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad ListLoad Call NameLoad NameLoad Call NameLoad NameLoad keyword Str keyword NameLoad decorator_list For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A N/A 
========================================
Plot multi-class SGD on the iris dataset
========================================

Plot decision surface of multi-class SGD on iris dataset.
The hyperplanes corresponding to the three one-versus-all (OVA) classifiers
are represented by the dashed lines.

 N/A __doc__ N/A numpy np N/A matplotlib.pyplot plt sklearn datasets sklearn.linear_model SGDClassifier 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 colors bry N/A idx N/A N/A np arange N/A N/A X shape N/A 0 N/A N/A N/A N/A np random seed 13 N/A N/A N/A N/A np random shuffle idx N/A X N/A X N/A idx N/A y N/A y N/A idx N/A mean N/A N/A X mean axis 0 N/A std N/A N/A X std axis 0 N/A X N/A N/A X mean std N/A h 0.02 N/A clf N/A N/A N/A SGDClassifier alpha 0.001 n_iter 100 fit X 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 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 cs 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 tight N/A N/A i color N/A zip N/A clf classes_ colors N/A N/A idx N/A N/A np where N/A y i N/A N/A N/A plt scatter N/A X N/A N/A idx 0 N/A X N/A N/A idx 1 c color label N/A N/A iris target_names N/A i cmap N/A N/A plt cm Paired N/A N/A N/A plt title Decision surface of multi-class SGD N/A N/A N/A plt axis tight N/A N/A xmin xmax N/A N/A plt xlim N/A N/A ymin ymax N/A N/A plt ylim N/A coef N/A clf coef_ N/A intercept N/A clf intercept_ plot_hyperplane N/A N/A c color N/A N/A line N/A N/A x0 N/A N/A N/A N/A N/A N/A N/A x0 N/A coef N/A N/A c 0 N/A intercept N/A c N/A coef N/A N/A c 1 N/A N/A N/A N/A plt plot N/A xmin xmax N/A N/A line xmin N/A line xmax ls -- color color N/A N/A N/A i color N/A zip N/A clf classes_ colors N/A N/A N/A plot_hyperplane i color N/A N/A N/A plt legend N/A N/A N/A plt show