Module Import alias identifier Import alias identifier Import alias identifier ImportFrom alias If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore BinOpMod NameLoad Num Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad Num Num Expr Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num keyword ListLoad keyword ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Slice attr Num Num attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad NameLoad attr Num Num Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Print Call AttributeLoad Str attr BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign NameStore Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Print Call AttributeLoad Str attr BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad Num
N/A N/A scipy.io sio N/A matplotlib.pyplot plt N/A numpy np sklearn.linear_model LogisticRegression N/A N/A __name__ __main__ N/A N/A data N/A N/A sio loadmat ex3data1.mat N/A y N/A data N/A y N/A X N/A data N/A X N/A y N/A y 10 N/A n_sampels 100 N/A sampels N/A N/A N/A np random choice N/A len X n_sampels N/A fig N/A N/A plt figure figsize N/A 8 8 N/A N/A N/A fig subplots_adjust left 0 right 1 bottom 0 top 1 hspace 0.05 wspace 0.05 N/A N/A i j N/A enumerate sampels N/A N/A ax N/A N/A fig add_subplot 10 10 N/A i 1 xticks N/A yticks N/A N/A N/A N/A ax imshow N/A N/A N/A N/A X N/A N/A j N/A reshape 20 20 T cmap N/A N/A plt cm binary interpolation nearest N/A N/A N/A ax text 0 7 N/A str N/A y N/A N/A j 0 N/A N/A N/A plt show N/A y N/A N/A y ravel N/A lr N/A LogisticRegression C 100 N/A N/A N/A lr fit X y N/A N/A N/A Training Set Accuracy: {} format N/A N/A N/A lr score X y 100 N/A lr N/A LogisticRegression C 10 N/A N/A N/A lr fit X y N/A N/A N/A Training Set Accuracy: {} format N/A N/A N/A lr score X y 100