@@ -38,7 +38,8 @@ def lr_model(clf, X):
3838pyplot .xlabel ("feature value" )
3939pyplot .ylabel ("class" )
4040pyplot .grid (True , linestyle = '-' , color = '0.75' )
41- pyplot .savefig (os .path .join (CHART_DIR , "log_reg_example_data.png" ), bbox_inches = "tight" )
41+ pyplot .savefig (
42+ os .path .join (CHART_DIR , "log_reg_example_data.png" ), bbox_inches = "tight" )
4243
4344
4445def lin_model (clf , X ):
@@ -69,7 +70,8 @@ def lin_model(clf, X):
6970pyplot .ylabel ("class" )
7071pyplot .title ("linear fit on additional data" )
7172pyplot .grid (True , linestyle = '-' , color = '0.75' )
72- pyplot .savefig (os .path .join (CHART_DIR , "log_reg_log_linear_fit.png" ), bbox_inches = "tight" )
73+ pyplot .savefig (
74+ os .path .join (CHART_DIR , "log_reg_log_linear_fit.png" ), bbox_inches = "tight" )
7375
7476pyplot .figure (figsize = (10 , 4 ))
7577pyplot .xlim ((- 5 , 20 ))
@@ -79,7 +81,8 @@ def lin_model(clf, X):
7981pyplot .xlabel ("feature value" )
8082pyplot .ylabel ("class" )
8183pyplot .grid (True , linestyle = '-' , color = '0.75' )
82- pyplot .savefig (os .path .join (CHART_DIR , "log_reg_example_fitted.png" ), bbox_inches = "tight" )
84+ pyplot .savefig (
85+ os .path .join (CHART_DIR , "log_reg_example_fitted.png" ), bbox_inches = "tight" )
8386
8487X = np .arange (0 , 1 , 0.001 )
8588pyplot .figure (figsize = (10 , 4 ))
@@ -97,4 +100,5 @@ def lin_model(clf, X):
97100pyplot .xlabel ("P" )
98101pyplot .ylabel ("log(odds) = log(P / (1-P))" )
99102pyplot .grid (True , linestyle = '-' , color = '0.75' )
100- pyplot .savefig (os .path .join (CHART_DIR , "log_reg_log_odds.png" ), bbox_inches = "tight" )
103+ pyplot .savefig (
104+ os .path .join (CHART_DIR , "log_reg_log_odds.png" ), bbox_inches = "tight" )
0 commit comments