@@ -80,7 +80,7 @@ def get_colors(colors, inds):
80
80
81
81
ns = np .concatenate ((n1s , n2s + n1s [- 1 ]))
82
82
ls = ["-" , "--" ]
83
- algorithms = ["XOR Forest" , "N-XOR Forest" , "Lifelong Forest" , "Naive Forest" ]
83
+ algorithms = ["XOR Forest" , "N-XOR Forest" , "Progressive Learning Forest (PLF) " , "Random Forest (RF) " ]
84
84
85
85
86
86
TASK1 = "XOR"
@@ -92,23 +92,6 @@ def get_colors(colors, inds):
92
92
colors = sns .color_palette ("Set1" , n_colors = 2 )
93
93
94
94
ax1 = fig .add_subplot (gs [7 :13 , 2 :8 ])
95
- # for i, algo in enumerate(algorithms):
96
- ax1 .plot (
97
- n1s ,
98
- mean_error [0 , : len (n1s )],
99
- label = algorithms [0 ],
100
- c = colors [1 ],
101
- ls = ls [np .sum (0 > 1 ).astype (int )],
102
- lw = 3 ,
103
- )
104
- ax1 .plot (
105
- ns [len (n1s ) :],
106
- mean_error [2 , len (n1s ) :],
107
- label = algorithms [1 ],
108
- c = colors [1 ],
109
- ls = ls [1 ],
110
- lw = 3 ,
111
- )
112
95
113
96
ax1 .plot (
114
97
ns ,
@@ -134,7 +117,7 @@ def get_colors(colors, inds):
134
117
ax1 .set_xlabel ("Total Sample Size" , fontsize = fontsize )
135
118
ax1 .tick_params (labelsize = labelsize )
136
119
ax1 .set_yticks ([0.1 , 0.3 , 0.5 ])
137
- ax1 .set_xticks ([250 , 750 , 1500 ])
120
+ ax1 .set_xticks ([50 , 750 , 1500 ])
138
121
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
139
122
ax1 .set_title ("XOR" , fontsize = 30 )
140
123
@@ -149,43 +132,25 @@ def get_colors(colors, inds):
149
132
#######################
150
133
mean_error = unpickle ("plots/mean_xor_nxor.pickle" )
151
134
152
- algorithms = ["XOR Forest" , "N-XOR Forest" , "Lifelong Forest" , "Naive Forest" ]
135
+ algorithms = ["XOR Forest" , "N-XOR Forest" , "Progressive Learning Forest (PLF) " , "Random Forest (RF) " ]
153
136
154
137
TASK1 = "XOR"
155
138
TASK2 = "N-XOR"
156
139
157
140
ax1 = fig .add_subplot (gs [7 :13 , 10 :16 ])
158
- ax1 .plot (
159
- n1s ,
160
- mean_error [0 , : len (n1s )],
161
- label = algorithms [0 ],
162
- c = colors [1 ],
163
- ls = ls [np .sum (0 > 1 ).astype (int )],
164
- lw = 3 ,
165
- )
166
- ax1 .plot (
167
- ns [len (n1s ) :],
168
- mean_error [2 , len (n1s ) :],
169
- label = algorithms [1 ],
170
- c = colors [1 ],
171
- ls = ls [1 ],
172
- lw = 3 ,
173
- )
174
141
175
142
ax1 .plot (
176
143
ns [len (n1s ) :],
177
144
mean_error [3 , len (n1s ) :],
178
145
label = algorithms [2 ],
179
146
c = colors [0 ],
180
- ls = ls [1 ],
181
147
lw = 3 ,
182
148
)
183
149
ax1 .plot (
184
150
ns [len (n1s ) :],
185
151
mean_error [5 , len (n1s ) :],
186
152
label = algorithms [3 ],
187
153
c = "g" ,
188
- ls = ls [1 ],
189
154
lw = 3 ,
190
155
)
191
156
@@ -196,7 +161,7 @@ def get_colors(colors, inds):
196
161
ax1 .tick_params (labelsize = labelsize )
197
162
ax1 .set_yticks ([0.1 , 0.5 , 0.9 ])
198
163
# ax1.set_yticks([0.15, 0.2])
199
- ax1 .set_xticks ([250 , 750 , 1500 ])
164
+ ax1 .set_xticks ([50 , 750 , 1500 ])
200
165
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
201
166
202
167
# ax1.set_ylim(0.11, 0.21)
@@ -214,7 +179,7 @@ def get_colors(colors, inds):
214
179
215
180
##################
216
181
mean_te = unpickle ("plots/mean_te_xor_nxor.pickle" )
217
- algorithms = ["Lifelong BTE" , "Lifelong FTE" , "Naive BTE" , "Naive FTE" ]
182
+ algorithms = ["PLF BTE" , "PLF FTE" , "RF BTE" , "RF FTE" ]
218
183
219
184
TASK1 = "XOR"
220
185
TASK2 = "N-XOR"
@@ -243,7 +208,7 @@ def get_colors(colors, inds):
243
208
ax1 .set_xlabel ("Total Sample Size" , fontsize = fontsize )
244
209
ax1 .tick_params (labelsize = labelsize )
245
210
ax1 .set_yticks ([0.05 , 1 , 2.5 ])
246
- ax1 .set_xticks ([250 , 750 , 1500 ])
211
+ ax1 .set_xticks ([50 , 750 , 1500 ])
247
212
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
248
213
right_side = ax1 .spines ["right" ]
249
214
right_side .set_visible (False )
@@ -270,13 +235,12 @@ def get_colors(colors, inds):
270
235
mean_te [1 , len (n1s ) :],
271
236
label = algorithms [1 ],
272
237
c = colors [0 ],
273
- ls = ls [1 ],
274
238
lw = 3 ,
275
239
)
276
240
277
241
ax1 .plot (ns , mean_te [2 ], label = algorithms [2 ], c = "g" , ls = ls [0 ], lw = 3 )
278
242
ax1 .plot (
279
- ns [len (n1s ) :], mean_te [3 , len (n1s ) :], label = algorithms [3 ], c = "g" , ls = ls [ 1 ], lw = 3
243
+ ns [len (n1s ) :], mean_te [3 , len (n1s ) :], label = algorithms [3 ], c = "g" , lw = 3
280
244
)
281
245
282
246
ax1 .set_ylabel ("Forward/Backward \n Transfer Efficiency (FTE/BTE)" , fontsize = fontsize )
@@ -285,7 +249,7 @@ def get_colors(colors, inds):
285
249
ax1 .set_xlabel ("Total Sample Size" , fontsize = fontsize )
286
250
ax1 .tick_params (labelsize = labelsize )
287
251
ax1 .set_yticks ([0.2 , 0.6 , 1 , 1.2 ])
288
- ax1 .set_xticks ([250 , 750 , 1500 ])
252
+ ax1 .set_xticks ([50 , 750 , 1500 ])
289
253
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
290
254
right_side = ax1 .spines ["right" ]
291
255
right_side .set_visible (False )
0 commit comments