@@ -28,13 +28,13 @@ def plot_group_kfold():
28
28
colors = ["grey" if x == 2 else "white" for x in mask [:, i ]]
29
29
# not selected has no hatch
30
30
31
- boxes = axes .barh (bottom = range (n_iter ), width = [1 - 0.1 ] * n_iter ,
31
+ boxes = axes .barh (y = range (n_iter ), width = [1 - 0.1 ] * n_iter ,
32
32
left = i * n_samples_per_fold , height = .6 , color = colors ,
33
33
hatch = "//" , edgecolor = "k" , align = 'edge' )
34
34
for j in np .where (mask [:, i ] == 0 )[0 ]:
35
35
boxes [j ].set_hatch ("" )
36
36
37
- axes .barh (bottom = [n_iter ] * n_folds , width = [1 - 0.1 ] * n_folds ,
37
+ axes .barh (y = [n_iter ] * n_folds , width = [1 - 0.1 ] * n_folds ,
38
38
left = np .arange (n_folds ) * n_samples_per_fold , height = .6 ,
39
39
color = "w" , edgecolor = 'k' , align = "edge" )
40
40
@@ -80,7 +80,7 @@ def plot_shuffle_split():
80
80
colors = ["grey" if x == 2 else "white" for x in mask [:, i ]]
81
81
# not selected has no hatch
82
82
83
- boxes = axes .barh (bottom = range (n_iter ), width = [1 - 0.1 ] * n_iter ,
83
+ boxes = axes .barh (y = range (n_iter ), width = [1 - 0.1 ] * n_iter ,
84
84
left = i * n_samples_per_fold , height = .6 , color = colors ,
85
85
hatch = "//" , edgecolor = 'k' , align = 'edge' )
86
86
for j in np .where (mask [:, i ] == 0 )[0 ]:
@@ -116,11 +116,11 @@ def plot_stratified_cross_validation():
116
116
for i in range (n_folds ):
117
117
colors = ["w" ] * n_folds
118
118
colors [i ] = "grey"
119
- axes .barh (bottom = range (n_folds ), width = [n_samples_per_fold - 1 ] *
119
+ axes .barh (y = range (n_folds ), width = [n_samples_per_fold - 1 ] *
120
120
n_folds , left = i * n_samples_per_fold , height = .6 ,
121
121
color = colors , hatch = "//" , edgecolor = 'k' , align = 'edge' )
122
122
123
- axes .barh (bottom = [n_folds ] * n_folds , width = [n_samples_per_fold - 1 ] *
123
+ axes .barh (y = [n_folds ] * n_folds , width = [n_samples_per_fold - 1 ] *
124
124
n_folds , left = np .arange (3 ) * n_samples_per_fold , height = .6 ,
125
125
color = "w" , edgecolor = 'k' , align = 'edge' )
126
126
@@ -153,24 +153,24 @@ def plot_stratified_cross_validation():
153
153
n_subsplit = n_samples_per_fold / 3.
154
154
for i in range (n_folds ):
155
155
test_bars = ax .barh (
156
- bottom = [i ] * n_folds , width = [n_subsplit - 1 ] * n_folds ,
156
+ y = [i ] * n_folds , width = [n_subsplit - 1 ] * n_folds ,
157
157
left = np .arange (n_folds ) * n_samples_per_fold + i * n_subsplit ,
158
158
height = .6 , color = "grey" , hatch = "//" , edgecolor = 'k' , align = 'edge' )
159
159
160
160
w = 2 * n_subsplit - 1
161
- ax .barh (bottom = [0 ] * n_folds , width = [w ] * n_folds , left = np .arange (n_folds )
161
+ ax .barh (y = [0 ] * n_folds , width = [w ] * n_folds , left = np .arange (n_folds )
162
162
* n_samples_per_fold + (0 + 1 ) * n_subsplit , height = .6 , color = "w" ,
163
163
hatch = "//" , edgecolor = 'k' , align = 'edge' )
164
- ax .barh (bottom = [1 ] * (n_folds + 1 ), width = [w / 2. , w , w , w / 2. ],
164
+ ax .barh (y = [1 ] * (n_folds + 1 ), width = [w / 2. , w , w , w / 2. ],
165
165
left = np .maximum (0 , np .arange (n_folds + 1 ) * n_samples_per_fold -
166
166
n_subsplit ), height = .6 , color = "w" , hatch = "//" ,
167
167
edgecolor = 'k' , align = 'edge' )
168
- training_bars = ax .barh (bottom = [2 ] * n_folds , width = [w ] * n_folds ,
168
+ training_bars = ax .barh (y = [2 ] * n_folds , width = [w ] * n_folds ,
169
169
left = np .arange (n_folds ) * n_samples_per_fold ,
170
170
height = .6 , color = "w" , hatch = "//" , edgecolor = 'k' ,
171
171
align = 'edge' )
172
172
173
- ax .barh (bottom = [n_folds ] * n_folds , width = [n_samples_per_fold - 1 ] *
173
+ ax .barh (y = [n_folds ] * n_folds , width = [n_samples_per_fold - 1 ] *
174
174
n_folds , left = np .arange (n_folds ) * n_samples_per_fold , height = .6 ,
175
175
color = "w" , edgecolor = 'k' , align = 'edge' )
176
176
@@ -199,7 +199,7 @@ def plot_cross_validation():
199
199
colors = ["w" ] * n_folds
200
200
colors [i ] = "grey"
201
201
bars = plt .barh (
202
- bottom = range (n_folds ), width = [n_samples_per_fold - 0.1 ] * n_folds ,
202
+ y = range (n_folds ), width = [n_samples_per_fold - 0.1 ] * n_folds ,
203
203
left = i * n_samples_per_fold , height = .6 , color = colors , hatch = "//" ,
204
204
edgecolor = 'k' , align = 'edge' )
205
205
axes .invert_yaxis ()
0 commit comments