File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 53
53
sparsity_l1_LR = np .mean (coef_l1_LR == 0 ) * 100
54
54
sparsity_l2_LR = np .mean (coef_l2_LR == 0 ) * 100
55
55
56
- print "C=%f " % C
57
- print "Sparsity with L1 penalty: %f " % sparsity_l1_LR
58
- print "score with L1 penalty: %f " % clf_l1_LR .score (X , y )
59
- print "Sparsity with L2 penalty: %f " % sparsity_l2_LR
60
- print "score with L2 penalty: %f " % clf_l2_LR .score (X , y )
56
+ print "C=%d " % C
57
+ print "Sparsity with L1 penalty: %.2f%% " % sparsity_l1_LR
58
+ print "score with L1 penalty: %.4f " % clf_l1_LR .score (X , y )
59
+ print "Sparsity with L2 penalty: %.2f%% " % sparsity_l2_LR
60
+ print "score with L2 penalty: %.4f " % clf_l2_LR .score (X , y )
61
61
62
62
l1_plot = pl .subplot (3 , 2 , 2 * i + 1 )
63
63
l2_plot = pl .subplot (3 , 2 , 2 * (i + 1 ))
You can’t perform that action at this time.
0 commit comments