File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def cross_entropy(T, pY):
7777print ("Final train classification_rate:" , classification_rate (Ytrain , predict (pYtrain )))
7878print ("Final test classification_rate:" , classification_rate (Ytest , predict (pYtest )))
7979
80- legend1 , = plt .plot (train_costs , label = 'train cost' )
81- legend2 , = plt .plot (test_costs , label = 'test cost' )
82- plt .legend ([ legend1 , legend2 ] )
80+ plt .plot (train_costs , label = 'train cost' )
81+ plt .plot (test_costs , label = 'test cost' )
82+ plt .legend ()
8383plt .show ()
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def cross_entropy(T, pY):
7070print ("Final train classification_rate:" , classification_rate (Ytrain , predict (pYtrain )))
7171print ("Final test classification_rate:" , classification_rate (Ytest , predict (pYtest )))
7272
73- legend1 , = plt .plot (train_costs , label = 'train cost' )
74- legend2 , = plt .plot (test_costs , label = 'test cost' )
75- plt .legend ([ legend1 , legend2 ] )
73+ plt .plot (train_costs , label = 'train cost' )
74+ plt .plot (test_costs , label = 'test cost' )
75+ plt .legend ()
7676plt .show ()
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ def cross_entropy(T, pY):
5555print ("Final train classification_rate:" , classification_rate (Ytrain , np .round (pYtrain )))
5656print ("Final test classification_rate:" , classification_rate (Ytest , np .round (pYtest )))
5757
58- legend1 , = plt .plot (train_costs , label = 'train cost' )
59- legend2 , = plt .plot (test_costs , label = 'test cost' )
60- plt .legend ([ legend1 , legend2 ] )
58+ plt .plot (train_costs , label = 'train cost' )
59+ plt .plot (test_costs , label = 'test cost' )
60+ plt .legend ()
6161plt .show ()
6262
6363
You can’t perform that action at this time.
0 commit comments