65
65
"name" : " stdout" ,
66
66
"output_type" : " stream" ,
67
67
"text" : [
68
- " Data fetching...\n " ,
69
- " Data scaling...\n "
68
+ " Data fetching...\n "
70
69
]
71
70
}
72
71
],
76
75
" \n " ,
77
76
" # Load data from https://www.openml.org/d/554\n " ,
78
77
" print('Data fetching...')\n " ,
79
- " X, y = fetch_openml('mnist_784', version=1, return_X_y=True, as_frame=False, data_home=data_home)\n " ,
80
- " \n " ,
78
+ " X, y = fetch_openml('mnist_784', version=1, return_X_y=True, as_frame=False, data_home=data_home)"
79
+ ]
80
+ },
81
+ {
82
+ "cell_type" : " code" ,
83
+ "execution_count" : 3 ,
84
+ "metadata" : {},
85
+ "outputs" : [
86
+ {
87
+ "name" : " stdout" ,
88
+ "output_type" : " stream" ,
89
+ "text" : [
90
+ " Data scaling...\n "
91
+ ]
92
+ }
93
+ ],
94
+ "source" : [
81
95
" random_state = check_random_state(0)\n " ,
82
96
" permutation = random_state.permutation(X.shape[0])\n " ,
83
97
" X = X[permutation]\n " ,
106
120
},
107
121
{
108
122
"cell_type" : " code" ,
109
- "execution_count" : 3 ,
123
+ "execution_count" : 4 ,
110
124
"metadata" : {
111
125
"pycharm" : {
112
126
"name" : " #%%\n "
119
133
"text" : [
120
134
" Model fit...\n " ,
121
135
" Model score...\n " ,
122
- " Sparsity with L1 penalty: 61.53 %\n " ,
123
- " Test score with L1 penalty: 0.8325 \n "
136
+ " Sparsity with L1 penalty: 77.93 %\n " ,
137
+ " Test score with L1 penalty: 0.8298 \n "
124
138
]
125
139
}
126
140
],
158
172
},
159
173
{
160
174
"cell_type" : " code" ,
161
- "execution_count" : 4 ,
175
+ "execution_count" : 5 ,
162
176
"metadata" : {
163
177
"pycharm" : {
164
178
"name" : " #%%\n "
184
198
},
185
199
{
186
200
"cell_type" : " code" ,
187
- "execution_count" : 5 ,
201
+ "execution_count" : 6 ,
188
202
"metadata" : {
189
203
"pycharm" : {
190
204
"name" : " #%%\n "
201
215
" '../data/sklearn-mnist-1/__commits',\n " ,
202
216
" '../data/sklearn-mnist-1/__schema']\n " ,
203
217
" \n " ,
204
- " Key: Sparsity_with_L1_penalty, Value: 61.530612244897966 \n " ,
218
+ " Key: Sparsity_with_L1_penalty, Value: 77.93367346938776 \n " ,
205
219
" Key: TILEDB_ML_MODEL_ML_FRAMEWORK, Value: SKLEARN\n " ,
206
220
" Key: TILEDB_ML_MODEL_ML_FRAMEWORK_VERSION, Value: 1.0.2\n " ,
207
221
" Key: TILEDB_ML_MODEL_PREVIEW, Value: LogisticRegression(C=0.01, penalty='l1', solver='saga', tol=0.1)\n " ,
208
222
" Key: TILEDB_ML_MODEL_PYTHON_VERSION, Value: 3.7.13\n " ,
209
223
" Key: TILEDB_ML_MODEL_STAGE, Value: STAGING\n " ,
210
- " Key: score, Value: 0.8325 \n "
224
+ " Key: score, Value: 0.8298 \n "
211
225
]
212
226
}
213
227
],
236
250
},
237
251
{
238
252
"cell_type" : " code" ,
239
- "execution_count" : 6 ,
253
+ "execution_count" : 7 ,
240
254
"metadata" : {
241
255
"pycharm" : {
242
256
"name" : " #%%\n "
247
261
"name" : " stdout" ,
248
262
"output_type" : " stream" ,
249
263
"text" : [
250
- " Key: Sparsity_with_L1_penalty, Value: 61.530612244897966 \n " ,
264
+ " Key: Sparsity_with_L1_penalty, Value: 77.93367346938776 \n " ,
251
265
" Key: TILEDB_ML_MODEL_ML_FRAMEWORK, Value: SKLEARN\n " ,
252
266
" Key: TILEDB_ML_MODEL_ML_FRAMEWORK_VERSION, Value: 1.0.2\n " ,
253
267
" Key: TILEDB_ML_MODEL_PREVIEW, Value: LogisticRegression(C=0.01, penalty='l1', solver='saga', tol=0.1)\n " ,
254
268
" Key: TILEDB_ML_MODEL_PYTHON_VERSION, Value: 3.7.13\n " ,
255
269
" Key: TILEDB_ML_MODEL_STAGE, Value: STAGING\n " ,
256
270
" Key: new_meta, Value: [\" Any kind of info\" ]\n " ,
257
- " Key: score, Value: 0.8325 \n "
271
+ " Key: score, Value: 0.8298 \n "
258
272
]
259
273
}
260
274
],
281
295
},
282
296
{
283
297
"cell_type" : " code" ,
284
- "execution_count" : 7 ,
298
+ "execution_count" : 8 ,
285
299
"metadata" : {
286
300
"pycharm" : {
287
301
"name" : " #%%\n "
293
307
"output_type" : " stream" ,
294
308
"text" : [
295
309
" Model score...\n " ,
296
- " Sparsity with L1 penalty: 61.53 %\n " ,
297
- " Test score with L1 penalty: 0.8325 \n " ,
310
+ " Sparsity with L1 penalty: 77.93 %\n " ,
311
+ " Test score with L1 penalty: 0.8298 \n " ,
298
312
" Model fit...\n " ,
299
313
" Model score...\n " ,
300
- " Sparsity with L1 penalty: 46.21 %\n " ,
301
- " Test score with L1 penalty: 0.7401 \n " ,
314
+ " Sparsity with L1 penalty: 44.07 %\n " ,
315
+ " Test score with L1 penalty: 0.7194 \n " ,
302
316
" \n " ,
303
317
" ['../data/sklearn-mnist-1/__fragment_meta',\n " ,
304
318
" '../data/sklearn-mnist-1/__meta',\n " ,
311
325
" number of fragments: 2\n " ,
312
326
" \n " ,
313
327
" ===== FRAGMENT NUMBER 0 =====\n " ,
314
- " timestamp range: (1660134739235, 1660134739235 )\n " ,
328
+ " timestamp range: (1664858394611, 1664858394611 )\n " ,
315
329
" number of unconsolidated metadata: 2\n " ,
316
- " version: 14 \n " ,
330
+ " version: 15 \n " ,
317
331
" \n " ,
318
332
" ===== FRAGMENT NUMBER 1 =====\n " ,
319
- " timestamp range: (1660134745067, 1660134745067 )\n " ,
333
+ " timestamp range: (1664858399506, 1664858399506 )\n " ,
320
334
" number of unconsolidated metadata: 2\n " ,
321
- " version: 14 \n "
335
+ " version: 15 \n "
322
336
]
323
337
}
324
338
],
390
404
},
391
405
{
392
406
"cell_type" : " code" ,
393
- "execution_count" : 8 ,
407
+ "execution_count" : 9 ,
394
408
"metadata" : {
395
409
"pycharm" : {
396
410
"name" : " #%%\n "
402
416
"output_type" : " stream" ,
403
417
"text" : [
404
418
" Fit...\n " ,
405
- " Test score: 0.7698 \n "
419
+ " Test score: 0.7755 \n "
406
420
]
407
421
}
408
422
],
436
450
},
437
451
{
438
452
"cell_type" : " code" ,
439
- "execution_count" : 9 ,
453
+ "execution_count" : 10 ,
440
454
"metadata" : {
441
455
"pycharm" : {
442
456
"name" : " #%%\n "
449
463
" '../data/tiledb-sklearn-mnist/sklearn-mnist-2'"
450
464
]
451
465
},
452
- "execution_count" : 9 ,
466
+ "execution_count" : 10 ,
453
467
"metadata" : {},
454
468
"output_type" : " execute_result"
455
469
}
470
484
},
471
485
{
472
486
"cell_type" : " code" ,
473
- "execution_count" : 10 ,
487
+ "execution_count" : 11 ,
474
488
"metadata" : {
475
489
"pycharm" : {
476
490
"name" : " #%%\n "
512
526
},
513
527
"nbformat" : 4 ,
514
528
"nbformat_minor" : 4
515
- }
529
+ }
0 commit comments