darabos commited on
Commit
cc95e47
·
unverified ·
1 Parent(s): e64f2d7

Revert "Revert "Abhik update""

Browse files
.gitignore CHANGED
@@ -14,11 +14,12 @@ node_modules
14
  dist
15
  build
16
  *.egg-info
17
-
18
- examples/.*
19
-
20
  # Playwright
21
  test-results
22
  playwright-report
23
  /blob-report/
24
  /playwright/.cache/
 
 
 
 
 
14
  dist
15
  build
16
  *.egg-info
 
 
 
17
  # Playwright
18
  test-results
19
  playwright-report
20
  /blob-report/
21
  /playwright/.cache/
22
+ /examples/.joblib-cache
23
+ /lynxkite-app/src
24
+ /lynxkite-app/src
25
+ /lynxkite-app/web
examples/.crdt/Image table.lynxkite.json.crdt DELETED
Binary file (31.8 kB)
 
examples/.crdt/requirements.txt.crdt DELETED
Binary file (251 Bytes)
 
examples/Cheminformatics/Model_NN_SAR.lynxkite.json ADDED
@@ -0,0 +1,627 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "edges": [
3
+ {
4
+ "id": "MSE loss 2 Optimizer 2",
5
+ "source": "MSE loss 2",
6
+ "sourceHandle": "output",
7
+ "target": "Optimizer 2",
8
+ "targetHandle": "loss"
9
+ },
10
+ {
11
+ "id": "Linear 1 Activation 1",
12
+ "source": "Linear 1",
13
+ "sourceHandle": "output",
14
+ "target": "Activation 1",
15
+ "targetHandle": "x"
16
+ },
17
+ {
18
+ "id": "Input: tensor 1 Linear 1",
19
+ "source": "Input: tensor 1",
20
+ "sourceHandle": "output",
21
+ "target": "Linear 1",
22
+ "targetHandle": "x"
23
+ },
24
+ {
25
+ "id": "Output 1 MSE loss 2",
26
+ "source": "Output 1",
27
+ "sourceHandle": "x",
28
+ "target": "MSE loss 2",
29
+ "targetHandle": "x"
30
+ },
31
+ {
32
+ "id": "Input: tensor 3 output MSE loss 2 y",
33
+ "source": "Input: tensor 3",
34
+ "sourceHandle": "output",
35
+ "target": "MSE loss 2",
36
+ "targetHandle": "y"
37
+ },
38
+ {
39
+ "id": "Activation 2 output Linear 3 x",
40
+ "source": "Activation 2",
41
+ "sourceHandle": "output",
42
+ "target": "Linear 3",
43
+ "targetHandle": "x"
44
+ },
45
+ {
46
+ "id": "Linear 2 output Activation 2 x",
47
+ "source": "Linear 2",
48
+ "sourceHandle": "output",
49
+ "target": "Activation 2",
50
+ "targetHandle": "x"
51
+ },
52
+ {
53
+ "id": "Activation 1 output Linear 2 x",
54
+ "source": "Activation 1",
55
+ "sourceHandle": "output",
56
+ "target": "Linear 2",
57
+ "targetHandle": "x"
58
+ },
59
+ {
60
+ "id": "Linear 3 output Output 1 x",
61
+ "source": "Linear 3",
62
+ "sourceHandle": "output",
63
+ "target": "Output 1",
64
+ "targetHandle": "x"
65
+ }
66
+ ],
67
+ "env": "PyTorch model",
68
+ "nodes": [
69
+ {
70
+ "data": {
71
+ "__execution_delay": 0.0,
72
+ "collapsed": null,
73
+ "display": null,
74
+ "error": null,
75
+ "input_metadata": null,
76
+ "meta": {
77
+ "color": "green",
78
+ "doc": null,
79
+ "inputs": [
80
+ {
81
+ "name": "loss",
82
+ "position": "bottom",
83
+ "type": {
84
+ "type": "tensor"
85
+ }
86
+ }
87
+ ],
88
+ "name": "Optimizer",
89
+ "outputs": [],
90
+ "params": [
91
+ {
92
+ "default": "AdamW",
93
+ "name": "type",
94
+ "type": {
95
+ "enum": [
96
+ "AdamW",
97
+ "Adafactor",
98
+ "Adagrad",
99
+ "SGD",
100
+ "Lion",
101
+ "Paged AdamW",
102
+ "Galore AdamW"
103
+ ]
104
+ }
105
+ },
106
+ {
107
+ "default": 0.0001,
108
+ "name": "lr",
109
+ "type": {
110
+ "type": "<class 'float'>"
111
+ }
112
+ }
113
+ ],
114
+ "type": "basic"
115
+ },
116
+ "params": {
117
+ "lr": "1e-4",
118
+ "type": "AdamW"
119
+ },
120
+ "status": "done",
121
+ "title": "Optimizer"
122
+ },
123
+ "dragHandle": ".bg-primary",
124
+ "height": 250.0,
125
+ "id": "Optimizer 2",
126
+ "position": {
127
+ "x": 359.75221367487865,
128
+ "y": -1035.651758716572
129
+ },
130
+ "type": "basic",
131
+ "width": 232.0
132
+ },
133
+ {
134
+ "data": {
135
+ "__execution_delay": 0.0,
136
+ "collapsed": null,
137
+ "display": null,
138
+ "error": null,
139
+ "input_metadata": null,
140
+ "meta": {
141
+ "color": "orange",
142
+ "doc": null,
143
+ "inputs": [
144
+ {
145
+ "name": "x",
146
+ "position": "bottom",
147
+ "type": {
148
+ "type": "<class 'inspect._empty'>"
149
+ }
150
+ }
151
+ ],
152
+ "name": "Activation",
153
+ "outputs": [
154
+ {
155
+ "name": "output",
156
+ "position": "top",
157
+ "type": {
158
+ "type": "None"
159
+ }
160
+ }
161
+ ],
162
+ "params": [
163
+ {
164
+ "default": "ReLU",
165
+ "name": "type",
166
+ "type": {
167
+ "enum": [
168
+ "ReLU",
169
+ "Leaky_ReLU",
170
+ "Tanh",
171
+ "Mish"
172
+ ]
173
+ }
174
+ }
175
+ ],
176
+ "type": "basic"
177
+ },
178
+ "params": {
179
+ "type": "ReLU"
180
+ },
181
+ "status": "done",
182
+ "title": "Activation"
183
+ },
184
+ "dragHandle": ".bg-primary",
185
+ "height": 200.0,
186
+ "id": "Activation 1",
187
+ "position": {
188
+ "x": 107.16774910271872,
189
+ "y": 29.248160148324928
190
+ },
191
+ "type": "basic",
192
+ "width": 200.0
193
+ },
194
+ {
195
+ "data": {
196
+ "__execution_delay": 0.0,
197
+ "collapsed": false,
198
+ "display": null,
199
+ "error": null,
200
+ "input_metadata": null,
201
+ "meta": {
202
+ "color": "gray",
203
+ "doc": null,
204
+ "inputs": [],
205
+ "name": "Input: tensor",
206
+ "outputs": [
207
+ {
208
+ "name": "output",
209
+ "position": "top",
210
+ "type": {
211
+ "type": "tensor"
212
+ }
213
+ }
214
+ ],
215
+ "params": [
216
+ {
217
+ "default": null,
218
+ "name": "name",
219
+ "type": {
220
+ "type": "None"
221
+ }
222
+ }
223
+ ],
224
+ "type": "basic"
225
+ },
226
+ "params": {
227
+ "name": "Y"
228
+ },
229
+ "status": "done",
230
+ "title": "Input: tensor"
231
+ },
232
+ "dragHandle": ".bg-primary",
233
+ "height": 139.0,
234
+ "id": "Input: tensor 3",
235
+ "position": {
236
+ "x": 481.1300839293847,
237
+ "y": -506.99731614815676
238
+ },
239
+ "type": "basic",
240
+ "width": 200.0
241
+ },
242
+ {
243
+ "data": {
244
+ "__execution_delay": null,
245
+ "collapsed": true,
246
+ "display": null,
247
+ "error": null,
248
+ "input_metadata": null,
249
+ "meta": {
250
+ "color": "orange",
251
+ "doc": null,
252
+ "inputs": [
253
+ {
254
+ "name": "x",
255
+ "position": "bottom",
256
+ "type": {
257
+ "type": "<class 'inspect._empty'>"
258
+ }
259
+ },
260
+ {
261
+ "name": "y",
262
+ "position": "bottom",
263
+ "type": {
264
+ "type": "<class 'inspect._empty'>"
265
+ }
266
+ }
267
+ ],
268
+ "name": "MSE loss",
269
+ "outputs": [
270
+ {
271
+ "name": "output",
272
+ "position": "top",
273
+ "type": {
274
+ "type": "None"
275
+ }
276
+ }
277
+ ],
278
+ "params": [],
279
+ "type": "basic"
280
+ },
281
+ "params": {},
282
+ "status": "done",
283
+ "title": "MSE loss"
284
+ },
285
+ "dragHandle": ".bg-primary",
286
+ "height": 200.0,
287
+ "id": "MSE loss 2",
288
+ "position": {
289
+ "x": 375.21624462193034,
290
+ "y": -721.0552036572305
291
+ },
292
+ "type": "basic",
293
+ "width": 200.0
294
+ },
295
+ {
296
+ "data": {
297
+ "__execution_delay": 0.0,
298
+ "collapsed": null,
299
+ "display": null,
300
+ "error": null,
301
+ "input_metadata": null,
302
+ "meta": {
303
+ "color": "blue",
304
+ "doc": null,
305
+ "inputs": [
306
+ {
307
+ "name": "x",
308
+ "position": "bottom",
309
+ "type": {
310
+ "type": "<class 'inspect._empty'>"
311
+ }
312
+ }
313
+ ],
314
+ "name": "Linear",
315
+ "outputs": [
316
+ {
317
+ "name": "output",
318
+ "position": "top",
319
+ "type": {
320
+ "type": "None"
321
+ }
322
+ }
323
+ ],
324
+ "params": [
325
+ {
326
+ "default": 1024.0,
327
+ "name": "output_dim",
328
+ "type": {
329
+ "type": "<class 'int'>"
330
+ }
331
+ }
332
+ ],
333
+ "type": "basic"
334
+ },
335
+ "params": {
336
+ "output_dim": "512"
337
+ },
338
+ "status": "done",
339
+ "title": "Linear"
340
+ },
341
+ "dragHandle": ".bg-primary",
342
+ "height": 189.0,
343
+ "id": "Linear 1",
344
+ "position": {
345
+ "x": 97.74092186450935,
346
+ "y": 295.8245818413917
347
+ },
348
+ "type": "basic",
349
+ "width": 199.0
350
+ },
351
+ {
352
+ "data": {
353
+ "__execution_delay": 0.0,
354
+ "collapsed": false,
355
+ "display": null,
356
+ "error": null,
357
+ "input_metadata": null,
358
+ "meta": {
359
+ "color": "gray",
360
+ "doc": null,
361
+ "inputs": [],
362
+ "name": "Input: tensor",
363
+ "outputs": [
364
+ {
365
+ "name": "output",
366
+ "position": "top",
367
+ "type": {
368
+ "type": "tensor"
369
+ }
370
+ }
371
+ ],
372
+ "params": [
373
+ {
374
+ "default": null,
375
+ "name": "name",
376
+ "type": {
377
+ "type": "None"
378
+ }
379
+ }
380
+ ],
381
+ "type": "basic"
382
+ },
383
+ "params": {
384
+ "name": "X"
385
+ },
386
+ "status": "done",
387
+ "title": "Input: tensor"
388
+ },
389
+ "dragHandle": ".bg-primary",
390
+ "height": 200.0,
391
+ "id": "Input: tensor 1",
392
+ "position": {
393
+ "x": 112.88665152726267,
394
+ "y": 556.2776495505054
395
+ },
396
+ "type": "basic",
397
+ "width": 200.0
398
+ },
399
+ {
400
+ "data": {
401
+ "__execution_delay": null,
402
+ "collapsed": true,
403
+ "display": null,
404
+ "error": null,
405
+ "input_metadata": null,
406
+ "meta": {
407
+ "color": "gray",
408
+ "doc": null,
409
+ "inputs": [
410
+ {
411
+ "name": "x",
412
+ "position": "bottom",
413
+ "type": {
414
+ "type": "tensor"
415
+ }
416
+ }
417
+ ],
418
+ "name": "Output",
419
+ "outputs": [
420
+ {
421
+ "name": "x",
422
+ "position": "top",
423
+ "type": {
424
+ "type": "tensor"
425
+ }
426
+ }
427
+ ],
428
+ "params": [
429
+ {
430
+ "default": null,
431
+ "name": "name",
432
+ "type": {
433
+ "type": "None"
434
+ }
435
+ }
436
+ ],
437
+ "type": "basic"
438
+ },
439
+ "params": {},
440
+ "status": "done",
441
+ "title": "Output"
442
+ },
443
+ "dragHandle": ".bg-primary",
444
+ "height": 197.0,
445
+ "id": "Output 1",
446
+ "position": {
447
+ "x": 113.20764742636189,
448
+ "y": -597.8875261840049
449
+ },
450
+ "type": "basic",
451
+ "width": 223.0
452
+ },
453
+ {
454
+ "data": {
455
+ "__execution_delay": 0.0,
456
+ "collapsed": null,
457
+ "display": null,
458
+ "error": null,
459
+ "input_metadata": null,
460
+ "meta": {
461
+ "color": "blue",
462
+ "doc": null,
463
+ "inputs": [
464
+ {
465
+ "name": "x",
466
+ "position": "bottom",
467
+ "type": {
468
+ "type": "<class 'inspect._empty'>"
469
+ }
470
+ }
471
+ ],
472
+ "name": "Linear",
473
+ "outputs": [
474
+ {
475
+ "name": "output",
476
+ "position": "top",
477
+ "type": {
478
+ "type": "None"
479
+ }
480
+ }
481
+ ],
482
+ "params": [
483
+ {
484
+ "default": 1024.0,
485
+ "name": "output_dim",
486
+ "type": {
487
+ "type": "<class 'int'>"
488
+ }
489
+ }
490
+ ],
491
+ "type": "basic"
492
+ },
493
+ "params": {
494
+ "output_dim": "256"
495
+ },
496
+ "status": "done",
497
+ "title": "Linear"
498
+ },
499
+ "dragHandle": ".bg-primary",
500
+ "height": 145.0,
501
+ "id": "Linear 2",
502
+ "position": {
503
+ "x": 106.38595770243691,
504
+ "y": -130.36601726399965
505
+ },
506
+ "type": "basic",
507
+ "width": 216.0
508
+ },
509
+ {
510
+ "data": {
511
+ "__execution_delay": 0.0,
512
+ "collapsed": false,
513
+ "display": null,
514
+ "error": null,
515
+ "input_metadata": null,
516
+ "meta": {
517
+ "color": "blue",
518
+ "doc": null,
519
+ "inputs": [
520
+ {
521
+ "name": "x",
522
+ "position": "bottom",
523
+ "type": {
524
+ "type": "<class 'inspect._empty'>"
525
+ }
526
+ }
527
+ ],
528
+ "name": "Linear",
529
+ "outputs": [
530
+ {
531
+ "name": "output",
532
+ "position": "top",
533
+ "type": {
534
+ "type": "None"
535
+ }
536
+ }
537
+ ],
538
+ "params": [
539
+ {
540
+ "default": 1024.0,
541
+ "name": "output_dim",
542
+ "type": {
543
+ "type": "<class 'int'>"
544
+ }
545
+ }
546
+ ],
547
+ "type": "basic"
548
+ },
549
+ "params": {
550
+ "output_dim": "1"
551
+ },
552
+ "status": "done",
553
+ "title": "Linear"
554
+ },
555
+ "dragHandle": ".bg-primary",
556
+ "height": 200.0,
557
+ "id": "Linear 3",
558
+ "position": {
559
+ "x": 101.9036406331553,
560
+ "y": -469.350895187653
561
+ },
562
+ "type": "basic",
563
+ "width": 200.0
564
+ },
565
+ {
566
+ "data": {
567
+ "__execution_delay": null,
568
+ "collapsed": false,
569
+ "display": null,
570
+ "error": null,
571
+ "input_metadata": null,
572
+ "meta": {
573
+ "color": "orange",
574
+ "doc": null,
575
+ "inputs": [
576
+ {
577
+ "name": "x",
578
+ "position": "bottom",
579
+ "type": {
580
+ "type": "<class 'inspect._empty'>"
581
+ }
582
+ }
583
+ ],
584
+ "name": "Activation",
585
+ "outputs": [
586
+ {
587
+ "name": "output",
588
+ "position": "top",
589
+ "type": {
590
+ "type": "None"
591
+ }
592
+ }
593
+ ],
594
+ "params": [
595
+ {
596
+ "default": "ReLU",
597
+ "name": "type",
598
+ "type": {
599
+ "enum": [
600
+ "ReLU",
601
+ "Leaky_ReLU",
602
+ "Tanh",
603
+ "Mish"
604
+ ]
605
+ }
606
+ }
607
+ ],
608
+ "type": "basic"
609
+ },
610
+ "params": {
611
+ "type": "ReLU"
612
+ },
613
+ "status": "done",
614
+ "title": "Activation"
615
+ },
616
+ "dragHandle": ".bg-primary",
617
+ "height": 157.0,
618
+ "id": "Activation 2",
619
+ "position": {
620
+ "x": 104.83352865023335,
621
+ "y": -301.90235110428654
622
+ },
623
+ "type": "basic",
624
+ "width": 208.0
625
+ }
626
+ ]
627
+ }
examples/Cheminformatics/Model_test.lynxkite.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "edges": [],
3
+ "env": "PyTorch model",
4
+ "nodes": [
5
+ {
6
+ "data": {
7
+ "__execution_delay": 0.0,
8
+ "collapsed": null,
9
+ "display": null,
10
+ "error": null,
11
+ "input_metadata": null,
12
+ "meta": {
13
+ "color": "blue",
14
+ "doc": null,
15
+ "inputs": [
16
+ {
17
+ "name": "x",
18
+ "position": "bottom",
19
+ "type": {
20
+ "type": "<class 'inspect._empty'>"
21
+ }
22
+ }
23
+ ],
24
+ "name": "LSTM",
25
+ "outputs": [
26
+ {
27
+ "name": "output",
28
+ "position": "top",
29
+ "type": {
30
+ "type": "None"
31
+ }
32
+ }
33
+ ],
34
+ "params": [
35
+ {
36
+ "default": 1024.0,
37
+ "name": "input_size",
38
+ "type": {
39
+ "type": "<class 'int'>"
40
+ }
41
+ },
42
+ {
43
+ "default": 1024.0,
44
+ "name": "hidden_size",
45
+ "type": {
46
+ "type": "<class 'int'>"
47
+ }
48
+ },
49
+ {
50
+ "default": 0.0,
51
+ "name": "dropout",
52
+ "type": {
53
+ "type": "<class 'float'>"
54
+ }
55
+ }
56
+ ],
57
+ "type": "basic"
58
+ },
59
+ "params": {
60
+ "dropout": "0.1",
61
+ "hidden_size": 1024.0,
62
+ "input_size": 1024.0
63
+ },
64
+ "status": "done",
65
+ "title": "LSTM"
66
+ },
67
+ "dragHandle": ".bg-primary",
68
+ "height": 313.0,
69
+ "id": "LSTM 1",
70
+ "position": {
71
+ "x": 122.5,
72
+ "y": 98.0
73
+ },
74
+ "type": "basic",
75
+ "width": 360.0
76
+ }
77
+ ]
78
+ }
examples/Cheminformatics/Neural QSAR Model.lynxkite.json ADDED
@@ -0,0 +1,3193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "edges": [
3
+ {
4
+ "id": "Model inference 1 View vectors 1",
5
+ "source": "Model inference 1",
6
+ "sourceHandle": "output",
7
+ "target": "View vectors 1",
8
+ "targetHandle": "bundle"
9
+ },
10
+ {
11
+ "id": "Import Parquet 2 output Train/test split 2 bundle",
12
+ "source": "Import Parquet 2",
13
+ "sourceHandle": "output",
14
+ "target": "Train/test split 2",
15
+ "targetHandle": "bundle"
16
+ },
17
+ {
18
+ "id": "Train/test split 2 output Define model 2 bundle",
19
+ "source": "Train/test split 2",
20
+ "sourceHandle": "output",
21
+ "target": "Define model 2",
22
+ "targetHandle": "bundle"
23
+ },
24
+ {
25
+ "id": "Define model 2 output Train model 1 bundle",
26
+ "source": "Define model 2",
27
+ "sourceHandle": "output",
28
+ "target": "Train model 1",
29
+ "targetHandle": "bundle"
30
+ },
31
+ {
32
+ "id": "Train model 1 output View loss 1 bundle",
33
+ "source": "Train model 1",
34
+ "sourceHandle": "output",
35
+ "target": "View loss 1",
36
+ "targetHandle": "bundle"
37
+ },
38
+ {
39
+ "id": "Train model 1 output Model inference 1 bundle",
40
+ "source": "Train model 1",
41
+ "sourceHandle": "output",
42
+ "target": "Model inference 1",
43
+ "targetHandle": "bundle"
44
+ },
45
+ {
46
+ "id": "Model inference 1 output View tables 1 bundle",
47
+ "source": "Model inference 1",
48
+ "sourceHandle": "output",
49
+ "target": "View tables 1",
50
+ "targetHandle": "bundle"
51
+ }
52
+ ],
53
+ "env": "LynxKite Graph Analytics",
54
+ "nodes": [
55
+ {
56
+ "_data": {
57
+ "__execution_delay": 0.0,
58
+ "collapsed": null,
59
+ "display": null,
60
+ "error": null,
61
+ "input_metadata": [
62
+ {
63
+ "dataframes": {
64
+ "df": {
65
+ "columns": [
66
+ "x",
67
+ "y"
68
+ ]
69
+ },
70
+ "df_test": {
71
+ "columns": [
72
+ "x",
73
+ "y"
74
+ ]
75
+ },
76
+ "df_train": {
77
+ "columns": [
78
+ "x",
79
+ "y"
80
+ ]
81
+ },
82
+ "training": {
83
+ "columns": [
84
+ "training_loss"
85
+ ]
86
+ }
87
+ },
88
+ "other": {
89
+ "model": {
90
+ "model": {
91
+ "inputs": [
92
+ "Input__tensor_1_output"
93
+ ],
94
+ "loss_inputs": [
95
+ "Output_1_x",
96
+ "Input__tensor_3_output"
97
+ ],
98
+ "outputs": [
99
+ "Output_1_x"
100
+ ],
101
+ "trained": true
102
+ },
103
+ "type": "model"
104
+ }
105
+ },
106
+ "relations": []
107
+ }
108
+ ],
109
+ "meta": {
110
+ "inputs": {
111
+ "bundle": {
112
+ "name": "bundle",
113
+ "position": "left",
114
+ "type": {
115
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
116
+ }
117
+ }
118
+ },
119
+ "name": "Model inference",
120
+ "outputs": {
121
+ "output": {
122
+ "name": "output",
123
+ "position": "right",
124
+ "type": {
125
+ "type": "None"
126
+ }
127
+ }
128
+ },
129
+ "params": {
130
+ "input_mapping": {
131
+ "default": null,
132
+ "name": "input_mapping",
133
+ "type": {
134
+ "type": "<class 'lynxkite_graph_analytics.lynxkite_ops.ModelInferenceInputMapping'>"
135
+ }
136
+ },
137
+ "model_name": {
138
+ "default": "model",
139
+ "name": "model_name",
140
+ "type": {
141
+ "type": "<class 'str'>"
142
+ }
143
+ },
144
+ "output_mapping": {
145
+ "default": null,
146
+ "name": "output_mapping",
147
+ "type": {
148
+ "type": "<class 'lynxkite_graph_analytics.lynxkite_ops.ModelOutputMapping'>"
149
+ }
150
+ }
151
+ },
152
+ "type": "basic"
153
+ },
154
+ "params": {
155
+ "input_mapping": "{\"map\":{\"Input__tensor_1_output\":{\"df\":\"df_test\",\"column\":\"x\"}}}",
156
+ "model_name": "model",
157
+ "output_mapping": "{\"map\":{\"Output_1_x\":{\"df\":\"df_test\",\"column\":\"pred\"}}}"
158
+ },
159
+ "status": "done",
160
+ "title": "Model inference"
161
+ },
162
+ "data": {
163
+ "__execution_delay": 0.0,
164
+ "collapsed": null,
165
+ "display": null,
166
+ "error": null,
167
+ "input_metadata": [
168
+ {
169
+ "dataframes": {
170
+ "df": {
171
+ "columns": [
172
+ "x",
173
+ "y"
174
+ ]
175
+ },
176
+ "df_test": {
177
+ "columns": [
178
+ "index",
179
+ "x",
180
+ "y"
181
+ ]
182
+ },
183
+ "df_train": {
184
+ "columns": [
185
+ "index",
186
+ "x",
187
+ "y"
188
+ ]
189
+ },
190
+ "training": {
191
+ "columns": [
192
+ "training_loss"
193
+ ]
194
+ }
195
+ },
196
+ "other": {
197
+ "model": {
198
+ "model": {
199
+ "inputs": [
200
+ "Input__tensor_1_output"
201
+ ],
202
+ "loss_inputs": [
203
+ "Input__tensor_3_output",
204
+ "Output_1_x"
205
+ ],
206
+ "outputs": [
207
+ "Output_1_x"
208
+ ],
209
+ "trained": true
210
+ },
211
+ "type": "model"
212
+ }
213
+ },
214
+ "relations": []
215
+ }
216
+ ],
217
+ "meta": {
218
+ "color": "orange",
219
+ "doc": [
220
+ {
221
+ "kind": "text",
222
+ "value": "Executes a trained model."
223
+ }
224
+ ],
225
+ "inputs": [
226
+ {
227
+ "name": "bundle",
228
+ "position": "left",
229
+ "type": {
230
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
231
+ }
232
+ }
233
+ ],
234
+ "name": "Model inference",
235
+ "outputs": [
236
+ {
237
+ "name": "output",
238
+ "position": "right",
239
+ "type": {
240
+ "type": "None"
241
+ }
242
+ }
243
+ ],
244
+ "params": [
245
+ {
246
+ "default": "model",
247
+ "name": "model_name",
248
+ "type": {
249
+ "type": "<class 'str'>"
250
+ }
251
+ },
252
+ {
253
+ "default": null,
254
+ "name": "input_mapping",
255
+ "type": {
256
+ "type": "<class 'lynxkite_graph_analytics.ml_ops.ModelInferenceInputMapping'>"
257
+ }
258
+ },
259
+ {
260
+ "default": null,
261
+ "name": "output_mapping",
262
+ "type": {
263
+ "type": "<class 'lynxkite_graph_analytics.ml_ops.ModelOutputMapping'>"
264
+ }
265
+ }
266
+ ],
267
+ "type": "basic"
268
+ },
269
+ "params": {
270
+ "input_mapping": "{\"map\":{\"Input__tensor_1_output\":{\"df\":\"df_test\",\"column\":\"x\"}}}",
271
+ "model_name": "model",
272
+ "output_mapping": "{\"map\":{\"Output_1_x\":{\"df\":\"df_test\",\"column\":\"pred\"}}}"
273
+ },
274
+ "status": "done",
275
+ "title": "Model inference"
276
+ },
277
+ "dragHandle": ".bg-primary",
278
+ "height": 362.0,
279
+ "id": "Model inference 1",
280
+ "position": {
281
+ "x": 1819.9055941495726,
282
+ "y": -172.25483582354178
283
+ },
284
+ "type": "basic",
285
+ "width": 563.0
286
+ },
287
+ {
288
+ "_data": {
289
+ "__execution_delay": null,
290
+ "collapsed": false,
291
+ "display": {
292
+ "series": [
293
+ {
294
+ "data": [
295
+ 5.194248676300049,
296
+ 4.732226848602295,
297
+ 4.301504611968994,
298
+ 3.9289824962615967,
299
+ 3.6416826248168945,
300
+ 3.4493889808654785,
301
+ 3.339247703552246,
302
+ 3.2848846912384033,
303
+ 3.2611656188964844,
304
+ 3.251643180847168,
305
+ 3.2479231357574463,
306
+ 3.2463886737823486,
307
+ 3.245635986328125,
308
+ 3.245159149169922,
309
+ 3.2447798252105713,
310
+ 3.2444353103637695,
311
+ 3.2441060543060303,
312
+ 3.2437832355499268,
313
+ 3.243464469909668,
314
+ 3.243149518966675,
315
+ 3.2428362369537354,
316
+ 3.242525339126587,
317
+ 3.2422165870666504,
318
+ 3.241910457611084,
319
+ 3.2416069507598877,
320
+ 3.2413055896759033,
321
+ 3.2410058975219727,
322
+ 3.240708112716675,
323
+ 3.2404117584228516,
324
+ 3.2401177883148193,
325
+ 3.239825487136841,
326
+ 3.239534616470337,
327
+ 3.239245653152466,
328
+ 3.2389581203460693,
329
+ 3.238672971725464,
330
+ 3.238389015197754,
331
+ 3.2381069660186768,
332
+ 3.237826108932495,
333
+ 3.2375471591949463,
334
+ 3.237269878387451,
335
+ 3.2369940280914307,
336
+ 3.236720085144043,
337
+ 3.2364470958709717,
338
+ 3.236175775527954,
339
+ 3.2359063625335693,
340
+ 3.2356388568878174,
341
+ 3.235372304916382,
342
+ 3.235107183456421,
343
+ 3.2348432540893555,
344
+ 3.234581232070923,
345
+ 3.2343204021453857,
346
+ 3.2340610027313232,
347
+ 3.233802556991577,
348
+ 3.233546257019043,
349
+ 3.233290910720825,
350
+ 3.233036518096924,
351
+ 3.2327840328216553,
352
+ 3.2325327396392822,
353
+ 3.232283115386963,
354
+ 3.232034921646118,
355
+ 3.2317872047424316,
356
+ 3.2315409183502197,
357
+ 3.2312965393066406,
358
+ 3.231052875518799,
359
+ 3.2308101654052734,
360
+ 3.2305691242218018,
361
+ 3.2303292751312256,
362
+ 3.230090379714966,
363
+ 3.2298526763916016,
364
+ 3.2296159267425537,
365
+ 3.2293803691864014,
366
+ 3.2291462421417236,
367
+ 3.228912591934204,
368
+ 3.2286808490753174,
369
+ 3.228449821472168,
370
+ 3.228219985961914,
371
+ 3.2279903888702393,
372
+ 3.2277631759643555,
373
+ 3.22753643989563,
374
+ 3.2273104190826416,
375
+ 3.2270853519439697,
376
+ 3.2268614768981934,
377
+ 3.226637363433838,
378
+ 3.2264153957366943,
379
+ 3.2261929512023926,
380
+ 3.2259714603424072,
381
+ 3.2257511615753174,
382
+ 3.2255313396453857,
383
+ 3.2253129482269287,
384
+ 3.225095272064209,
385
+ 3.224879264831543,
386
+ 3.224663734436035,
387
+ 3.2244486808776855,
388
+ 3.2242350578308105,
389
+ 3.224022388458252,
390
+ 3.223810911178589,
391
+ 3.223599672317505,
392
+ 3.2233896255493164,
393
+ 3.2231807708740234,
394
+ 3.2229726314544678,
395
+ 3.222764730453491,
396
+ 3.2225584983825684,
397
+ 3.2223527431488037,
398
+ 3.2221477031707764,
399
+ 3.2219433784484863,
400
+ 3.2217350006103516,
401
+ 3.2210605144500732,
402
+ 3.2179861068725586,
403
+ 3.1490979194641113,
404
+ 2.5611555576324463,
405
+ 2.1667709350585938,
406
+ 1.941397786140442,
407
+ 1.8211313486099243,
408
+ 1.7602094411849976,
409
+ 1.7300406694412231,
410
+ 1.7150671482086182,
411
+ 1.707504153251648,
412
+ 1.703554630279541,
413
+ 1.7013800144195557,
414
+ 1.7000809907913208,
415
+ 1.6992148160934448,
416
+ 1.6985713243484497,
417
+ 1.6980407238006592,
418
+ 1.6975696086883545,
419
+ 1.6971304416656494,
420
+ 1.69670832157135,
421
+ 1.696295976638794,
422
+ 1.6958922147750854,
423
+ 1.6954957246780396,
424
+ 1.6951044797897339,
425
+ 1.6947181224822998,
426
+ 1.694334626197815,
427
+ 1.6939517259597778,
428
+ 1.6935737133026123,
429
+ 1.6931995153427124,
430
+ 1.6928293704986572,
431
+ 1.6924631595611572,
432
+ 1.6921008825302124,
433
+ 1.6917426586151123,
434
+ 1.6913865804672241,
435
+ 1.6910340785980225,
436
+ 1.690685510635376,
437
+ 1.690340518951416,
438
+ 1.6899985074996948,
439
+ 1.689659595489502,
440
+ 1.6893242597579956,
441
+ 1.6889920234680176,
442
+ 1.6886632442474365,
443
+ 1.688332438468933,
444
+ 1.6879974603652954,
445
+ 1.6876615285873413,
446
+ 1.687328815460205,
447
+ 1.6869547367095947,
448
+ 1.6862459182739258,
449
+ 1.6816266775131226,
450
+ 1.5337661504745483,
451
+ 0.8366889357566833,
452
+ 0.46365517377853394,
453
+ 0.2645129859447479,
454
+ 0.16432315111160278,
455
+ 0.11595670133829117,
456
+ 0.09297489374876022,
457
+ 0.08202926814556122,
458
+ 0.07672866433858871,
459
+ 0.07407510280609131,
460
+ 0.07266353815793991,
461
+ 0.07183551043272018,
462
+ 0.07128453254699707,
463
+ 0.07086450606584549,
464
+ 0.07050899416208267,
465
+ 0.0701858326792717,
466
+ 0.06987988203763962,
467
+ 0.0695839673280716,
468
+ 0.06929467618465424,
469
+ 0.06901033222675323,
470
+ 0.0687265694141388,
471
+ 0.0684463381767273,
472
+ 0.06816895306110382,
473
+ 0.06789495050907135,
474
+ 0.0676238089799881,
475
+ 0.06735056638717651,
476
+ 0.06708052009344101,
477
+ 0.06681209057569504,
478
+ 0.06654231995344162,
479
+ 0.06627301871776581,
480
+ 0.06600192189216614,
481
+ 0.06573258340358734,
482
+ 0.06545879691839218,
483
+ 0.06518517434597015,
484
+ 0.06490959227085114,
485
+ 0.06463567167520523,
486
+ 0.0643647089600563,
487
+ 0.06409519165754318,
488
+ 0.06382837891578674,
489
+ 0.06356203556060791,
490
+ 0.06330081075429916,
491
+ 0.06304193288087845,
492
+ 0.06278356909751892,
493
+ 0.06252720952033997,
494
+ 0.06227334961295128,
495
+ 0.06202361360192299,
496
+ 0.0617777444422245,
497
+ 0.06153156980872154,
498
+ 0.061283886432647705,
499
+ 0.061029158532619476,
500
+ 0.06077418848872185,
501
+ 0.060523588210344315,
502
+ 0.06027815118432045,
503
+ 0.06003476679325104,
504
+ 0.059792377054691315,
505
+ 0.059549830853939056,
506
+ 0.05930154025554657,
507
+ 0.05905551835894585,
508
+ 0.05881192907691002,
509
+ 0.0585709884762764,
510
+ 0.05833115428686142,
511
+ 0.05809348449110985,
512
+ 0.0578579381108284,
513
+ 0.05762450024485588,
514
+ 0.05739405006170273,
515
+ 0.05716623365879059,
516
+ 0.056934017688035965,
517
+ 0.05670491233468056,
518
+ 0.05647972598671913,
519
+ 0.05625642091035843,
520
+ 0.05603497847914696,
521
+ 0.05581538379192352,
522
+ 0.05559813603758812,
523
+ 0.05538330227136612,
524
+ 0.055170174688100815,
525
+ 0.054959800094366074,
526
+ 0.05475304275751114,
527
+ 0.054547909647226334,
528
+ 0.05434436723589897,
529
+ 0.05414241552352905,
530
+ 0.053942013531923294,
531
+ 0.053743164986371994,
532
+ 0.05354584753513336,
533
+ 0.05335003510117531,
534
+ 0.05315623804926872,
535
+ 0.05296580120921135,
536
+ 0.052776746451854706,
537
+ 0.052589051425457,
538
+ 0.05240271985530853,
539
+ 0.05221769958734512,
540
+ 0.05203401669859886,
541
+ 0.05185163766145706,
542
+ 0.05167055502533913,
543
+ 0.05149075761437416,
544
+ 0.05131221190094948,
545
+ 0.051134925335645676,
546
+ 0.05095922574400902,
547
+ 0.05078546702861786,
548
+ 0.05061294883489609,
549
+ 0.05044237896800041,
550
+ 0.050274644047021866,
551
+ 0.05010804161429405,
552
+ 0.04994256794452667,
553
+ 0.049778200685977936,
554
+ 0.04961492121219635,
555
+ 0.049452755600214005,
556
+ 0.04929284378886223,
557
+ 0.04913467913866043,
558
+ 0.04897753894329071,
559
+ 0.04882141575217247,
560
+ 0.04866630584001541,
561
+ 0.04851251095533371,
562
+ 0.04836169257760048,
563
+ 0.04821375384926796,
564
+ 0.04806669428944588,
565
+ 0.04792052507400513,
566
+ 0.04777522012591362,
567
+ 0.04763077199459076,
568
+ 0.04748716205358505,
569
+ 0.047344379127025604,
570
+ 0.04720241203904152,
571
+ 0.04706142097711563,
572
+ 0.04692186415195465,
573
+ 0.04678306728601456,
574
+ 0.04664503037929535,
575
+ 0.04650787264108658,
576
+ 0.04637163504958153,
577
+ 0.046236440539360046,
578
+ 0.04610292613506317,
579
+ 0.04597007483243942,
580
+ 0.045837946236133575,
581
+ 0.04570755362510681,
582
+ 0.04557782784104347,
583
+ 0.04544825479388237,
584
+ 0.0453183650970459,
585
+ 0.045189570635557175,
586
+ 0.04506213217973709,
587
+ 0.04493529349565506,
588
+ 0.044809043407440186,
589
+ 0.044683389365673065,
590
+ 0.04455830156803131,
591
+ 0.04443386197090149,
592
+ 0.04431009292602539,
593
+ 0.04418685659766197,
594
+ 0.04406414180994034,
595
+ 0.043941959738731384,
596
+ 0.043820276856422424,
597
+ 0.04369909688830376,
598
+ 0.043578337877988815,
599
+ 0.04345747083425522,
600
+ 0.04333708435297012,
601
+ 0.04321715980768204,
602
+ 0.04309769719839096,
603
+ 0.0429786778986454,
604
+ 0.04286010563373566,
605
+ 0.04274197295308113,
606
+ 0.042624276131391525,
607
+ 0.042507000267505646,
608
+ 0.04239014536142349,
609
+ 0.04227370768785477,
610
+ 0.042157672345638275,
611
+ 0.042042046785354614,
612
+ 0.04192682355642319,
613
+ 0.0418119840323925,
614
+ 0.041697535663843155,
615
+ 0.04158347100019455,
616
+ 0.04146978259086609,
617
+ 0.041356466710567474,
618
+ 0.041243527084589005,
619
+ 0.041130952537059784,
620
+ 0.04101872816681862,
621
+ 0.040906865149736404,
622
+ 0.04079534858465195,
623
+ 0.04068418964743614,
624
+ 0.0405733622610569,
625
+ 0.040462885051965714,
626
+ 0.04035273939371109,
627
+ 0.04024292156100273,
628
+ 0.040133725851774216,
629
+ 0.040025271475315094,
630
+ 0.03991713374853134,
631
+ 0.03980930522084236,
632
+ 0.039701659232378006,
633
+ 0.039593927562236786,
634
+ 0.039486486464738846,
635
+ 0.03937936946749687,
636
+ 0.039272651076316833,
637
+ 0.039166223257780075,
638
+ 0.039060063660144806,
639
+ 0.038954153656959534,
640
+ 0.0388483963906765,
641
+ 0.038742903620004654,
642
+ 0.0386376827955246,
643
+ 0.03853272274136543,
644
+ 0.03842802718281746,
645
+ 0.03832358866930008,
646
+ 0.03821941092610359,
647
+ 0.0381154865026474,
648
+ 0.038011811673641205,
649
+ 0.0379084013402462,
650
+ 0.037805236876010895,
651
+ 0.03770232945680618,
652
+ 0.03759966045618057,
653
+ 0.037497248500585556,
654
+ 0.03739452734589577,
655
+ 0.03729122132062912,
656
+ 0.03718816488981247,
657
+ 0.03708536550402641,
658
+ 0.03698281571269035,
659
+ 0.03688051551580429,
660
+ 0.036778464913368225,
661
+ 0.03667666018009186,
662
+ 0.03657510131597519,
663
+ 0.03647379204630852,
664
+ 0.036372724920511246,
665
+ 0.03627190366387367,
666
+ 0.036171332001686096,
667
+ 0.036071084439754486,
668
+ 0.03597136586904526,
669
+ 0.03587188571691513,
670
+ 0.03577264025807381,
671
+ 0.035673633217811584,
672
+ 0.03557485342025757,
673
+ 0.03547630459070206,
674
+ 0.03537798300385475,
675
+ 0.035279903560876846,
676
+ 0.035182058811187744,
677
+ 0.03508443757891655,
678
+ 0.03498705103993416,
679
+ 0.034889888018369675,
680
+ 0.034792978316545486,
681
+ 0.03469628840684891,
682
+ 0.03459983691573143,
683
+ 0.034503620117902756,
684
+ 0.034407634288072586,
685
+ 0.03431188315153122,
686
+ 0.034216366708278656,
687
+ 0.0341210775077343,
688
+ 0.03402603417634964,
689
+ 0.033931225538253784,
690
+ 0.03383665531873703,
691
+ 0.03374231979250908,
692
+ 0.03364821895956993,
693
+ 0.033554356545209885,
694
+ 0.03346073254942894,
695
+ 0.03336735814809799,
696
+ 0.033274225890636444,
697
+ 0.0331813283264637,
698
+ 0.03308868035674095,
699
+ 0.03299626335501671,
700
+ 0.03290409594774246,
701
+ 0.032812174409627914,
702
+ 0.032720498740673065,
703
+ 0.032629065215587616,
704
+ 0.03253787383437157,
705
+ 0.03244693577289581,
706
+ 0.03235623985528946,
707
+ 0.032265804708004,
708
+ 0.03217560797929764,
709
+ 0.03208566829562187,
710
+ 0.03199596703052521,
711
+ 0.03190653398633003,
712
+ 0.031817350536584854,
713
+ 0.031728409230709076,
714
+ 0.03163974732160568,
715
+ 0.03155132010579109,
716
+ 0.03146316111087799,
717
+ 0.03137525916099548,
718
+ 0.03128761053085327,
719
+ 0.031200233846902847,
720
+ 0.03111310862004757,
721
+ 0.031026242300868034,
722
+ 0.030939649790525436,
723
+ 0.030853310599923134,
724
+ 0.030767245218157768,
725
+ 0.030681440606713295,
726
+ 0.03059590980410576,
727
+ 0.030510643497109413,
728
+ 0.03042564168572426,
729
+ 0.030340921133756638,
730
+ 0.03025646135210991,
731
+ 0.030172280967235565,
732
+ 0.03008836880326271,
733
+ 0.030004747211933136,
734
+ 0.029921378940343857,
735
+ 0.029838303104043007,
736
+ 0.029755493625998497,
737
+ 0.029672972857952118,
738
+ 0.029590733349323273,
739
+ 0.029508762061595917,
740
+ 0.029427088797092438,
741
+ 0.029345687478780746,
742
+ 0.029264571145176888,
743
+ 0.02918374352157116,
744
+ 0.029103199020028114,
745
+ 0.02902294509112835,
746
+ 0.028942979872226715,
747
+ 0.028863299638032913,
748
+ 0.02878391183912754,
749
+ 0.02870481088757515,
750
+ 0.028626007959246635,
751
+ 0.028547491878271103,
752
+ 0.028469275683164597,
753
+ 0.02839135006070137,
754
+ 0.02831372618675232,
755
+ 0.02823638916015625,
756
+ 0.028159350156784058,
757
+ 0.02808261476457119,
758
+ 0.0280061773955822,
759
+ 0.027930041775107384,
760
+ 0.027854204177856445,
761
+ 0.027778668329119682,
762
+ 0.027703437954187393,
763
+ 0.02762851119041443,
764
+ 0.02755388431251049,
765
+ 0.027479562908411026,
766
+ 0.027405548840761185,
767
+ 0.027331842109560966,
768
+ 0.027258435264229774,
769
+ 0.02718534506857395,
770
+ 0.027112558484077454,
771
+ 0.02704007923603058,
772
+ 0.026967914775013924,
773
+ 0.026896055787801743,
774
+ 0.02682451158761978,
775
+ 0.026753274723887444,
776
+ 0.026682356372475624,
777
+ 0.02661174349486828,
778
+ 0.0265414509922266,
779
+ 0.026471465826034546,
780
+ 0.02640179730951786,
781
+ 0.026332441717386246,
782
+ 0.0262634065002203,
783
+ 0.026194684207439423,
784
+ 0.026126278564333916,
785
+ 0.02605818584561348,
786
+ 0.025990411639213562,
787
+ 0.025922955945134163,
788
+ 0.025855818763375282,
789
+ 0.02578899636864662,
790
+ 0.025722496211528778,
791
+ 0.025656312704086304,
792
+ 0.02559044398367405,
793
+ 0.02552489936351776,
794
+ 0.02545967325568199,
795
+ 0.02539476379752159
796
+ ],
797
+ "type": "line"
798
+ }
799
+ ],
800
+ "title": {
801
+ "text": "Training loss"
802
+ },
803
+ "xAxis": {
804
+ "type": "category"
805
+ },
806
+ "yAxis": {
807
+ "type": "value"
808
+ }
809
+ },
810
+ "error": null,
811
+ "input_metadata": [
812
+ {
813
+ "dataframes": {
814
+ "df": {
815
+ "columns": [
816
+ "x",
817
+ "y"
818
+ ]
819
+ },
820
+ "df_test": {
821
+ "columns": [
822
+ "x",
823
+ "y"
824
+ ]
825
+ },
826
+ "df_train": {
827
+ "columns": [
828
+ "x",
829
+ "y"
830
+ ]
831
+ },
832
+ "training": {
833
+ "columns": [
834
+ "training_loss"
835
+ ]
836
+ }
837
+ },
838
+ "other": {
839
+ "model": {
840
+ "model": {
841
+ "inputs": [
842
+ "Input__tensor_1_output"
843
+ ],
844
+ "loss_inputs": [
845
+ "Output_1_x",
846
+ "Input__tensor_3_output"
847
+ ],
848
+ "outputs": [
849
+ "Output_1_x"
850
+ ],
851
+ "trained": true
852
+ },
853
+ "type": "model"
854
+ }
855
+ },
856
+ "relations": []
857
+ }
858
+ ],
859
+ "meta": {
860
+ "inputs": {
861
+ "bundle": {
862
+ "name": "bundle",
863
+ "position": "left",
864
+ "type": {
865
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
866
+ }
867
+ }
868
+ },
869
+ "name": "View loss",
870
+ "outputs": {},
871
+ "params": {},
872
+ "type": "visualization"
873
+ },
874
+ "params": {},
875
+ "status": "done",
876
+ "title": "View loss"
877
+ },
878
+ "data": {
879
+ "__execution_delay": null,
880
+ "collapsed": false,
881
+ "display": {
882
+ "series": [
883
+ {
884
+ "data": [
885
+ 67.413818359375,
886
+ 67.11187744140625,
887
+ 66.81317901611328,
888
+ 66.5162353515625,
889
+ 66.21949768066406,
890
+ 65.92274475097656,
891
+ 65.62549591064453,
892
+ 65.32546997070312,
893
+ 65.02108764648438,
894
+ 64.71121978759766,
895
+ 64.39421081542969,
896
+ 64.06808471679688,
897
+ 63.73294448852539,
898
+ 63.3873405456543,
899
+ 63.02961730957031,
900
+ 62.65884017944336,
901
+ 62.27304458618164,
902
+ 61.87138366699219,
903
+ 61.452850341796875,
904
+ 61.01667404174805,
905
+ 60.56078338623047,
906
+ 60.08305740356445,
907
+ 59.582435607910156,
908
+ 59.05806350708008,
909
+ 58.50962829589844,
910
+ 57.935184478759766,
911
+ 57.33393096923828,
912
+ 56.705013275146484,
913
+ 56.0476188659668,
914
+ 55.360347747802734,
915
+ 54.6429443359375,
916
+ 53.89464569091797,
917
+ 53.113922119140625,
918
+ 52.30055618286133,
919
+ 51.4543571472168,
920
+ 50.57438278198242,
921
+ 49.660362243652344,
922
+ 48.712093353271484,
923
+ 47.72883224487305,
924
+ 46.7108039855957,
925
+ 45.65839767456055,
926
+ 44.572303771972656,
927
+ 43.45291519165039,
928
+ 42.30076217651367,
929
+ 41.11710739135742,
930
+ 39.90336990356445,
931
+ 38.66173553466797,
932
+ 37.39354705810547,
933
+ 36.100341796875,
934
+ 34.78422546386719,
935
+ 33.44749450683594,
936
+ 32.092674255371094,
937
+ 30.722511291503906,
938
+ 29.340362548828125,
939
+ 27.94980239868164,
940
+ 26.553958892822266,
941
+ 25.156696319580078,
942
+ 23.762224197387695,
943
+ 22.374366760253906,
944
+ 20.997533798217773,
945
+ 19.63677978515625,
946
+ 18.296897888183594,
947
+ 16.982328414916992,
948
+ 15.697725296020508,
949
+ 14.44817066192627,
950
+ 13.238905906677246,
951
+ 12.074806213378906,
952
+ 10.960868835449219,
953
+ 9.901790618896484,
954
+ 8.901801109313965,
955
+ 7.964723110198975,
956
+ 7.09385347366333,
957
+ 6.291915416717529,
958
+ 5.561134338378906,
959
+ 4.903149127960205,
960
+ 4.318702220916748,
961
+ 3.808044672012329,
962
+ 3.370572566986084,
963
+ 3.004401922225952,
964
+ 2.706446886062622,
965
+ 2.472712278366089,
966
+ 2.2981722354888916,
967
+ 2.176875591278076,
968
+ 2.102105140686035,
969
+ 2.066572666168213,
970
+ 2.0626060962677,
971
+ 2.082454204559326,
972
+ 2.1185786724090576,
973
+ 2.163982629776001,
974
+ 2.212440252304077,
975
+ 2.2587029933929443,
976
+ 2.298664093017578,
977
+ 2.3294262886047363,
978
+ 2.349210023880005,
979
+ 2.3572983741760254,
980
+ 2.353860855102539,
981
+ 2.339801073074341,
982
+ 2.3165128231048584,
983
+ 2.285783290863037,
984
+ 2.2495362758636475,
985
+ 2.209678888320923,
986
+ 2.1679699420928955,
987
+ 2.1260528564453125,
988
+ 2.0852770805358887,
989
+ 2.046765089035034,
990
+ 2.0113227367401123,
991
+ 1.9795072078704834,
992
+ 1.951624870300293,
993
+ 1.9277347326278687,
994
+ 1.9077317714691162,
995
+ 1.8913639783859253,
996
+ 1.8782825469970703,
997
+ 1.8680652379989624,
998
+ 1.860246181488037,
999
+ 1.8543577194213867,
1000
+ 1.8499524593353271,
1001
+ 1.8466061353683472,
1002
+ 1.8439419269561768,
1003
+ 1.841636061668396,
1004
+ 1.8394237756729126,
1005
+ 1.8370988368988037,
1006
+ 1.8345081806182861,
1007
+ 1.8315527439117432,
1008
+ 1.8281805515289307,
1009
+ 1.824377179145813,
1010
+ 1.82016122341156,
1011
+ 1.815576195716858,
1012
+ 1.8106868267059326,
1013
+ 1.8055685758590698,
1014
+ 1.8002979755401611,
1015
+ 1.794956088066101,
1016
+ 1.789618968963623,
1017
+ 1.7843579053878784,
1018
+ 1.7792333364486694,
1019
+ 1.7742924690246582,
1020
+ 1.7695715427398682,
1021
+ 1.7650917768478394,
1022
+ 1.7608625888824463,
1023
+ 1.7568891048431396,
1024
+ 1.7531644105911255,
1025
+ 1.7496731281280518,
1026
+ 1.7463945150375366,
1027
+ 1.74330472946167,
1028
+ 1.74037504196167,
1029
+ 1.7375787496566772,
1030
+ 1.7348928451538086,
1031
+ 1.7322945594787598,
1032
+ 1.7297621965408325,
1033
+ 1.7272769212722778,
1034
+ 1.724826455116272,
1035
+ 1.7223998308181763,
1036
+ 1.7199890613555908,
1037
+ 1.717591404914856,
1038
+ 1.7152045965194702,
1039
+ 1.7128314971923828,
1040
+ 1.7104763984680176,
1041
+ 1.7081413269042969,
1042
+ 1.7058302164077759,
1043
+ 1.7035484313964844,
1044
+ 1.7013014554977417,
1045
+ 1.6990923881530762,
1046
+ 1.6969245672225952,
1047
+ 1.6948007345199585,
1048
+ 1.6927225589752197,
1049
+ 1.6906906366348267,
1050
+ 1.688704490661621,
1051
+ 1.686761498451233,
1052
+ 1.6848597526550293,
1053
+ 1.6829967498779297,
1054
+ 1.6811716556549072,
1055
+ 1.6793829202651978,
1056
+ 1.6776278018951416,
1057
+ 1.675904393196106,
1058
+ 1.6742106676101685,
1059
+ 1.6725448369979858,
1060
+ 1.6709049940109253,
1061
+ 1.66929030418396,
1062
+ 1.6676996946334839,
1063
+ 1.6661325693130493,
1064
+ 1.6645885705947876,
1065
+ 1.6630669832229614,
1066
+ 1.661568284034729,
1067
+ 1.6600923538208008,
1068
+ 1.658638834953308,
1069
+ 1.6572073698043823,
1070
+ 1.6558005809783936,
1071
+ 1.6544150114059448,
1072
+ 1.6530519723892212,
1073
+ 1.651710867881775,
1074
+ 1.6503913402557373,
1075
+ 1.6490938663482666,
1076
+ 1.6478174924850464,
1077
+ 1.6465617418289185,
1078
+ 1.6453264951705933,
1079
+ 1.6441117525100708,
1080
+ 1.6429158449172974,
1081
+ 1.6417392492294312,
1082
+ 1.6405810117721558,
1083
+ 1.6394413709640503,
1084
+ 1.6383187770843506,
1085
+ 1.6372123956680298,
1086
+ 1.6361225843429565,
1087
+ 1.6350492238998413,
1088
+ 1.6339921951293945,
1089
+ 1.6329513788223267,
1090
+ 1.6319255828857422,
1091
+ 1.6309150457382202,
1092
+ 1.6299195289611816,
1093
+ 1.628938913345337,
1094
+ 1.6279730796813965,
1095
+ 1.6270231008529663,
1096
+ 1.6260874271392822,
1097
+ 1.6251659393310547,
1098
+ 1.6242592334747314,
1099
+ 1.6233665943145752,
1100
+ 1.6224875450134277,
1101
+ 1.6216225624084473,
1102
+ 1.6207715272903442,
1103
+ 1.6199339628219604,
1104
+ 1.6191091537475586,
1105
+ 1.6182971000671387,
1106
+ 1.6174976825714111,
1107
+ 1.6167107820510864,
1108
+ 1.615936279296875,
1109
+ 1.61517333984375,
1110
+ 1.6144218444824219,
1111
+ 1.6136815547943115,
1112
+ 1.6129528284072876,
1113
+ 1.6122353076934814,
1114
+ 1.6115286350250244,
1115
+ 1.6108324527740479,
1116
+ 1.6101465225219727,
1117
+ 1.6094708442687988,
1118
+ 1.6088050603866577,
1119
+ 1.608149766921997,
1120
+ 1.6075048446655273,
1121
+ 1.606868863105774,
1122
+ 1.6062421798706055,
1123
+ 1.6056252717971802,
1124
+ 1.6050169467926025,
1125
+ 1.6044166088104248,
1126
+ 1.6038252115249634,
1127
+ 1.60324227809906,
1128
+ 1.6026668548583984,
1129
+ 1.602098822593689,
1130
+ 1.6015381813049316,
1131
+ 1.6009854078292847,
1132
+ 1.6004407405853271,
1133
+ 1.5999033451080322,
1134
+ 1.5993733406066895,
1135
+ 1.5988502502441406,
1136
+ 1.5983350276947021,
1137
+ 1.597826600074768,
1138
+ 1.5973247289657593,
1139
+ 1.5968282222747803,
1140
+ 1.5963387489318848,
1141
+ 1.595855712890625,
1142
+ 1.595379114151001,
1143
+ 1.5949088335037231,
1144
+ 1.5944451093673706,
1145
+ 1.5939875841140747,
1146
+ 1.5935362577438354,
1147
+ 1.5930910110473633,
1148
+ 1.5926523208618164,
1149
+ 1.592220425605774,
1150
+ 1.5917949676513672,
1151
+ 1.591375708580017,
1152
+ 1.5909618139266968,
1153
+ 1.5905537605285645,
1154
+ 1.590151309967041,
1155
+ 1.5897539854049683,
1156
+ 1.5893620252609253,
1157
+ 1.588975191116333,
1158
+ 1.5885939598083496,
1159
+ 1.5882179737091064,
1160
+ 1.5878467559814453,
1161
+ 1.5874805450439453,
1162
+ 1.5871191024780273,
1163
+ 1.5867624282836914,
1164
+ 1.5864101648330688,
1165
+ 1.5860624313354492,
1166
+ 1.5857192277908325,
1167
+ 1.5853806734085083,
1168
+ 1.5850470066070557,
1169
+ 1.5847175121307373,
1170
+ 1.5843925476074219,
1171
+ 1.584071397781372,
1172
+ 1.5837541818618774,
1173
+ 1.5834412574768066,
1174
+ 1.583132028579712,
1175
+ 1.5828267335891724,
1176
+ 1.5825252532958984,
1177
+ 1.5822274684906006,
1178
+ 1.5819330215454102,
1179
+ 1.5816423892974854,
1180
+ 1.5813556909561157,
1181
+ 1.581072211265564,
1182
+ 1.5807920694351196,
1183
+ 1.5805152654647827,
1184
+ 1.5802420377731323
1185
+ ],
1186
+ "type": "line"
1187
+ }
1188
+ ],
1189
+ "title": {
1190
+ "text": "Training loss"
1191
+ },
1192
+ "xAxis": {
1193
+ "type": "category"
1194
+ },
1195
+ "yAxis": {
1196
+ "type": "value"
1197
+ }
1198
+ },
1199
+ "error": null,
1200
+ "input_metadata": [
1201
+ {
1202
+ "dataframes": {
1203
+ "df": {
1204
+ "columns": [
1205
+ "x",
1206
+ "y"
1207
+ ]
1208
+ },
1209
+ "df_test": {
1210
+ "columns": [
1211
+ "index",
1212
+ "x",
1213
+ "y"
1214
+ ]
1215
+ },
1216
+ "df_train": {
1217
+ "columns": [
1218
+ "index",
1219
+ "x",
1220
+ "y"
1221
+ ]
1222
+ },
1223
+ "training": {
1224
+ "columns": [
1225
+ "training_loss"
1226
+ ]
1227
+ }
1228
+ },
1229
+ "other": {
1230
+ "model": {
1231
+ "model": {
1232
+ "inputs": [
1233
+ "Input__tensor_1_output"
1234
+ ],
1235
+ "loss_inputs": [
1236
+ "Input__tensor_3_output",
1237
+ "Output_1_x"
1238
+ ],
1239
+ "outputs": [
1240
+ "Output_1_x"
1241
+ ],
1242
+ "trained": true
1243
+ },
1244
+ "type": "model"
1245
+ }
1246
+ },
1247
+ "relations": []
1248
+ }
1249
+ ],
1250
+ "meta": {
1251
+ "color": "orange",
1252
+ "doc": null,
1253
+ "inputs": [
1254
+ {
1255
+ "name": "bundle",
1256
+ "position": "left",
1257
+ "type": {
1258
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1259
+ }
1260
+ }
1261
+ ],
1262
+ "name": "View loss",
1263
+ "outputs": [],
1264
+ "params": [],
1265
+ "type": "visualization"
1266
+ },
1267
+ "params": {},
1268
+ "status": "done",
1269
+ "title": "View loss"
1270
+ },
1271
+ "dragHandle": ".bg-primary",
1272
+ "height": 377.0,
1273
+ "id": "View loss 1",
1274
+ "position": {
1275
+ "x": 1902.9286089170223,
1276
+ "y": 350.7369834103349
1277
+ },
1278
+ "type": "visualization",
1279
+ "width": 411.0
1280
+ },
1281
+ {
1282
+ "data": {
1283
+ "__execution_delay": 0.0,
1284
+ "collapsed": null,
1285
+ "display": null,
1286
+ "error": "'pred'",
1287
+ "input_metadata": [
1288
+ {
1289
+ "dataframes": {
1290
+ "df": {
1291
+ "columns": [
1292
+ "x",
1293
+ "y"
1294
+ ]
1295
+ },
1296
+ "df_test": {
1297
+ "columns": [
1298
+ "index",
1299
+ "pred",
1300
+ "x",
1301
+ "y"
1302
+ ]
1303
+ },
1304
+ "df_train": {
1305
+ "columns": [
1306
+ "index",
1307
+ "x",
1308
+ "y"
1309
+ ]
1310
+ },
1311
+ "training": {
1312
+ "columns": [
1313
+ "training_loss"
1314
+ ]
1315
+ }
1316
+ },
1317
+ "other": {
1318
+ "model": {
1319
+ "model": {
1320
+ "inputs": [
1321
+ "Input__tensor_1_output"
1322
+ ],
1323
+ "loss_inputs": [
1324
+ "Input__tensor_3_output",
1325
+ "Output_1_x"
1326
+ ],
1327
+ "outputs": [
1328
+ "Output_1_x"
1329
+ ],
1330
+ "trained": true
1331
+ },
1332
+ "type": "model"
1333
+ }
1334
+ },
1335
+ "relations": []
1336
+ }
1337
+ ],
1338
+ "meta": {
1339
+ "color": "orange",
1340
+ "doc": null,
1341
+ "inputs": [
1342
+ {
1343
+ "name": "bundle",
1344
+ "position": "left",
1345
+ "type": {
1346
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1347
+ }
1348
+ }
1349
+ ],
1350
+ "name": "View vectors",
1351
+ "outputs": [],
1352
+ "params": [
1353
+ {
1354
+ "default": "nodes",
1355
+ "name": "table_name",
1356
+ "type": {
1357
+ "type": "<class 'str'>"
1358
+ }
1359
+ },
1360
+ {
1361
+ "default": "",
1362
+ "name": "vector_column",
1363
+ "type": {
1364
+ "type": "<class 'str'>"
1365
+ }
1366
+ },
1367
+ {
1368
+ "default": "",
1369
+ "name": "label_column",
1370
+ "type": {
1371
+ "type": "<class 'str'>"
1372
+ }
1373
+ },
1374
+ {
1375
+ "default": 15,
1376
+ "name": "n_neighbors",
1377
+ "type": {
1378
+ "type": "<class 'int'>"
1379
+ }
1380
+ },
1381
+ {
1382
+ "default": 0.1,
1383
+ "name": "min_dist",
1384
+ "type": {
1385
+ "type": "<class 'float'>"
1386
+ }
1387
+ },
1388
+ {
1389
+ "default": "euclidean",
1390
+ "name": "metric",
1391
+ "type": {
1392
+ "enum": [
1393
+ "l1",
1394
+ "cityblock",
1395
+ "taxicab",
1396
+ "manhattan",
1397
+ "euclidean",
1398
+ "l2",
1399
+ "sqeuclidean",
1400
+ "canberra",
1401
+ "minkowski",
1402
+ "chebyshev",
1403
+ "linf",
1404
+ "cosine",
1405
+ "correlation",
1406
+ "hellinger",
1407
+ "hamming"
1408
+ ]
1409
+ }
1410
+ }
1411
+ ],
1412
+ "type": "visualization"
1413
+ },
1414
+ "params": {
1415
+ "label_column": "pred",
1416
+ "metric": "l2",
1417
+ "min_dist": "1",
1418
+ "n_neighbors": "5",
1419
+ "table_name": "df_train",
1420
+ "vector_column": "pred"
1421
+ },
1422
+ "status": "done",
1423
+ "title": "View vectors"
1424
+ },
1425
+ "dragHandle": ".bg-primary",
1426
+ "height": 516.0,
1427
+ "id": "View vectors 1",
1428
+ "position": {
1429
+ "x": 2651.591372715985,
1430
+ "y": 233.4416247956355
1431
+ },
1432
+ "type": "visualization",
1433
+ "width": 614.0
1434
+ },
1435
+ {
1436
+ "data": {
1437
+ "__execution_delay": 0.0,
1438
+ "collapsed": false,
1439
+ "display": null,
1440
+ "error": null,
1441
+ "input_metadata": [],
1442
+ "meta": {
1443
+ "color": "orange",
1444
+ "doc": [
1445
+ {
1446
+ "kind": "text",
1447
+ "value": "Imports a Parquet file."
1448
+ }
1449
+ ],
1450
+ "inputs": [],
1451
+ "name": "Import Parquet",
1452
+ "outputs": [
1453
+ {
1454
+ "name": "output",
1455
+ "position": "right",
1456
+ "type": {
1457
+ "type": "None"
1458
+ }
1459
+ }
1460
+ ],
1461
+ "params": [
1462
+ {
1463
+ "default": null,
1464
+ "name": "filename",
1465
+ "type": {
1466
+ "type": "<class 'str'>"
1467
+ }
1468
+ }
1469
+ ],
1470
+ "type": "basic"
1471
+ },
1472
+ "params": {
1473
+ "filename": "~/Github/lynxkite-2024/examples/uploads/CHEMBL313_descriptors.parquet"
1474
+ },
1475
+ "status": "done",
1476
+ "title": "Import Parquet"
1477
+ },
1478
+ "dragHandle": ".bg-primary",
1479
+ "height": 247.0,
1480
+ "id": "Import Parquet 2",
1481
+ "position": {
1482
+ "x": -819.7203556692056,
1483
+ "y": -102.01002572829246
1484
+ },
1485
+ "type": "basic",
1486
+ "width": 479.0
1487
+ },
1488
+ {
1489
+ "data": {
1490
+ "__execution_delay": 0.0,
1491
+ "collapsed": null,
1492
+ "display": null,
1493
+ "error": null,
1494
+ "input_metadata": [
1495
+ {
1496
+ "dataframes": {
1497
+ "df": {
1498
+ "columns": [
1499
+ "x",
1500
+ "y"
1501
+ ]
1502
+ }
1503
+ },
1504
+ "other": {},
1505
+ "relations": []
1506
+ }
1507
+ ],
1508
+ "meta": {
1509
+ "color": "orange",
1510
+ "doc": [
1511
+ {
1512
+ "kind": "text",
1513
+ "value": "Splits a dataframe in the bundle into separate \"_train\" and \"_test\" dataframes."
1514
+ }
1515
+ ],
1516
+ "inputs": [
1517
+ {
1518
+ "name": "bundle",
1519
+ "position": "left",
1520
+ "type": {
1521
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1522
+ }
1523
+ }
1524
+ ],
1525
+ "name": "Train/test split",
1526
+ "outputs": [
1527
+ {
1528
+ "name": "output",
1529
+ "position": "right",
1530
+ "type": {
1531
+ "type": "None"
1532
+ }
1533
+ }
1534
+ ],
1535
+ "params": [
1536
+ {
1537
+ "default": null,
1538
+ "name": "table_name",
1539
+ "type": {
1540
+ "type": "<class 'str'>"
1541
+ }
1542
+ },
1543
+ {
1544
+ "default": 0.1,
1545
+ "name": "test_ratio",
1546
+ "type": {
1547
+ "type": "<class 'float'>"
1548
+ }
1549
+ }
1550
+ ],
1551
+ "type": "basic"
1552
+ },
1553
+ "params": {
1554
+ "table_name": "df",
1555
+ "test_ratio": "0.2"
1556
+ },
1557
+ "status": "done",
1558
+ "title": "Train/test split"
1559
+ },
1560
+ "dragHandle": ".bg-primary",
1561
+ "height": 291.0,
1562
+ "id": "Train/test split 2",
1563
+ "position": {
1564
+ "x": -228.55968883824875,
1565
+ "y": -89.26596111973944
1566
+ },
1567
+ "type": "basic",
1568
+ "width": 242.0
1569
+ },
1570
+ {
1571
+ "data": {
1572
+ "__execution_delay": 0.0,
1573
+ "collapsed": null,
1574
+ "display": null,
1575
+ "error": null,
1576
+ "input_metadata": [
1577
+ {
1578
+ "dataframes": {
1579
+ "df": {
1580
+ "columns": [
1581
+ "x",
1582
+ "y"
1583
+ ]
1584
+ },
1585
+ "df_test": {
1586
+ "columns": [
1587
+ "index",
1588
+ "x",
1589
+ "y"
1590
+ ]
1591
+ },
1592
+ "df_train": {
1593
+ "columns": [
1594
+ "index",
1595
+ "x",
1596
+ "y"
1597
+ ]
1598
+ }
1599
+ },
1600
+ "other": {},
1601
+ "relations": []
1602
+ }
1603
+ ],
1604
+ "meta": {
1605
+ "color": "orange",
1606
+ "doc": [
1607
+ {
1608
+ "kind": "text",
1609
+ "value": "Trains the selected model on the selected dataset. Most training parameters are set in the model definition."
1610
+ }
1611
+ ],
1612
+ "inputs": [
1613
+ {
1614
+ "name": "bundle",
1615
+ "position": "left",
1616
+ "type": {
1617
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1618
+ }
1619
+ }
1620
+ ],
1621
+ "name": "Define model",
1622
+ "outputs": [
1623
+ {
1624
+ "name": "output",
1625
+ "position": "right",
1626
+ "type": {
1627
+ "type": "None"
1628
+ }
1629
+ }
1630
+ ],
1631
+ "params": [
1632
+ {
1633
+ "default": null,
1634
+ "name": "model_workspace",
1635
+ "type": {
1636
+ "type": "<class 'str'>"
1637
+ }
1638
+ },
1639
+ {
1640
+ "default": "model",
1641
+ "name": "save_as",
1642
+ "type": {
1643
+ "type": "<class 'str'>"
1644
+ }
1645
+ }
1646
+ ],
1647
+ "type": "basic"
1648
+ },
1649
+ "params": {
1650
+ "model_workspace": "Cheminformatics/Model_NN_SAR",
1651
+ "save_as": "model"
1652
+ },
1653
+ "status": "done",
1654
+ "title": "Define model"
1655
+ },
1656
+ "dragHandle": ".bg-primary",
1657
+ "height": 291.0,
1658
+ "id": "Define model 2",
1659
+ "position": {
1660
+ "x": 124.25855086332746,
1661
+ "y": -84.85029279063554
1662
+ },
1663
+ "type": "basic",
1664
+ "width": 427.0
1665
+ },
1666
+ {
1667
+ "data": {
1668
+ "__execution_delay": 0.0,
1669
+ "collapsed": false,
1670
+ "display": null,
1671
+ "error": null,
1672
+ "input_metadata": [
1673
+ {
1674
+ "dataframes": {
1675
+ "df": {
1676
+ "columns": [
1677
+ "x",
1678
+ "y"
1679
+ ]
1680
+ },
1681
+ "df_test": {
1682
+ "columns": [
1683
+ "index",
1684
+ "x",
1685
+ "y"
1686
+ ]
1687
+ },
1688
+ "df_train": {
1689
+ "columns": [
1690
+ "index",
1691
+ "x",
1692
+ "y"
1693
+ ]
1694
+ }
1695
+ },
1696
+ "other": {
1697
+ "model": {
1698
+ "model": {
1699
+ "inputs": [
1700
+ "Input__tensor_1_output"
1701
+ ],
1702
+ "loss_inputs": [
1703
+ "Input__tensor_3_output",
1704
+ "Output_1_x"
1705
+ ],
1706
+ "outputs": [
1707
+ "Output_1_x"
1708
+ ],
1709
+ "trained": false
1710
+ },
1711
+ "type": "model"
1712
+ }
1713
+ },
1714
+ "relations": []
1715
+ }
1716
+ ],
1717
+ "meta": {
1718
+ "color": "orange",
1719
+ "doc": [
1720
+ {
1721
+ "kind": "text",
1722
+ "value": "Trains the selected model on the selected dataset. Most training parameters are set in the model definition."
1723
+ }
1724
+ ],
1725
+ "inputs": [
1726
+ {
1727
+ "name": "bundle",
1728
+ "position": "left",
1729
+ "type": {
1730
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1731
+ }
1732
+ }
1733
+ ],
1734
+ "name": "Train model",
1735
+ "outputs": [
1736
+ {
1737
+ "name": "output",
1738
+ "position": "right",
1739
+ "type": {
1740
+ "type": "None"
1741
+ }
1742
+ }
1743
+ ],
1744
+ "params": [
1745
+ {
1746
+ "default": "model",
1747
+ "name": "model_name",
1748
+ "type": {
1749
+ "type": "<class 'str'>"
1750
+ }
1751
+ },
1752
+ {
1753
+ "default": null,
1754
+ "name": "input_mapping",
1755
+ "type": {
1756
+ "type": "<class 'lynxkite_graph_analytics.ml_ops.ModelTrainingInputMapping'>"
1757
+ }
1758
+ },
1759
+ {
1760
+ "default": 1,
1761
+ "name": "epochs",
1762
+ "type": {
1763
+ "type": "<class 'int'>"
1764
+ }
1765
+ }
1766
+ ],
1767
+ "type": "basic"
1768
+ },
1769
+ "params": {
1770
+ "epochs": "300",
1771
+ "input_mapping": "{\"map\":{\"Input__tensor_1_output\":{\"df\":\"df_train\",\"column\":\"x\"},\"Input__tensor_3_output\":{\"df\":\"df_train\",\"column\":\"y\"}}}",
1772
+ "model_name": "model"
1773
+ },
1774
+ "status": "done",
1775
+ "title": "Train model"
1776
+ },
1777
+ "dragHandle": ".bg-primary",
1778
+ "height": 403.0,
1779
+ "id": "Train model 1",
1780
+ "position": {
1781
+ "x": 883.4876070533219,
1782
+ "y": -88.26891135978968
1783
+ },
1784
+ "type": "basic",
1785
+ "width": 523.0
1786
+ },
1787
+ {
1788
+ "data": {
1789
+ "__execution_delay": null,
1790
+ "collapsed": false,
1791
+ "display": {
1792
+ "dataframes": {
1793
+ "df": {
1794
+ "columns": [
1795
+ "x",
1796
+ "y"
1797
+ ],
1798
+ "data": [
1799
+ [
1800
+ "[0 1 0 ... 0 0 0]",
1801
+ 5.99
1802
+ ],
1803
+ [
1804
+ "[0 1 0 ... 0 0 0]",
1805
+ 5.81
1806
+ ],
1807
+ [
1808
+ "[0 1 0 ... 0 0 0]",
1809
+ 7.29
1810
+ ],
1811
+ [
1812
+ "[0 1 0 ... 0 0 0]",
1813
+ 7.9
1814
+ ],
1815
+ [
1816
+ "[0 1 0 ... 0 0 0]",
1817
+ 8.31
1818
+ ],
1819
+ [
1820
+ "[0 1 0 ... 0 0 0]",
1821
+ 6.89
1822
+ ],
1823
+ [
1824
+ "[0 0 0 ... 0 0 0]",
1825
+ 8.14
1826
+ ],
1827
+ [
1828
+ "[0 1 0 ... 0 0 0]",
1829
+ 8.01
1830
+ ],
1831
+ [
1832
+ "[0 1 0 ... 0 0 0]",
1833
+ 6.24
1834
+ ],
1835
+ [
1836
+ "[0 1 0 ... 0 0 0]",
1837
+ 5.41
1838
+ ],
1839
+ [
1840
+ "[0 1 0 ... 0 0 0]",
1841
+ 6.46
1842
+ ],
1843
+ [
1844
+ "[0 1 0 ... 0 0 0]",
1845
+ 6.68
1846
+ ],
1847
+ [
1848
+ "[0 1 0 ... 0 0 0]",
1849
+ 7.42
1850
+ ],
1851
+ [
1852
+ "[0 1 0 ... 0 0 0]",
1853
+ 8.09
1854
+ ],
1855
+ [
1856
+ "[0 1 0 ... 0 0 0]",
1857
+ 7.28
1858
+ ],
1859
+ [
1860
+ "[0 1 0 ... 0 0 0]",
1861
+ 6.55
1862
+ ],
1863
+ [
1864
+ "[0 1 0 ... 0 0 0]",
1865
+ 5.47
1866
+ ],
1867
+ [
1868
+ "[0 0 0 ... 0 0 0]",
1869
+ 6.43
1870
+ ],
1871
+ [
1872
+ "[0 1 0 ... 0 0 0]",
1873
+ 8.59
1874
+ ],
1875
+ [
1876
+ "[0 0 0 ... 0 0 0]",
1877
+ 7.88
1878
+ ],
1879
+ [
1880
+ "[0 1 0 ... 0 0 0]",
1881
+ 6.49
1882
+ ],
1883
+ [
1884
+ "[0 1 0 ... 0 0 0]",
1885
+ 8.78
1886
+ ],
1887
+ [
1888
+ "[0 0 0 ... 0 0 0]",
1889
+ 7.44
1890
+ ],
1891
+ [
1892
+ "[0 0 0 ... 0 0 0]",
1893
+ 10.215
1894
+ ],
1895
+ [
1896
+ "[0 0 0 ... 0 0 0]",
1897
+ 5.88
1898
+ ],
1899
+ [
1900
+ "[0 0 0 ... 0 0 0]",
1901
+ 6.3
1902
+ ],
1903
+ [
1904
+ "[0 0 0 ... 0 0 0]",
1905
+ 9.49
1906
+ ],
1907
+ [
1908
+ "[0 1 0 ... 0 0 0]",
1909
+ 7.443
1910
+ ],
1911
+ [
1912
+ "[0 0 0 ... 0 1 0]",
1913
+ 9.96
1914
+ ],
1915
+ [
1916
+ "[0 0 0 ... 0 0 0]",
1917
+ 7.72
1918
+ ],
1919
+ [
1920
+ "[0 1 0 ... 0 0 0]",
1921
+ 6.27
1922
+ ],
1923
+ [
1924
+ "[0 1 0 ... 0 1 0]",
1925
+ 9.09
1926
+ ],
1927
+ [
1928
+ "[0 1 0 ... 0 0 0]",
1929
+ 8.49
1930
+ ],
1931
+ [
1932
+ "[0 1 0 ... 0 0 0]",
1933
+ 6.82
1934
+ ],
1935
+ [
1936
+ "[0 1 1 ... 0 0 0]",
1937
+ 7.01
1938
+ ],
1939
+ [
1940
+ "[0 1 0 ... 0 0 0]",
1941
+ 8.28
1942
+ ],
1943
+ [
1944
+ "[0 0 0 ... 0 0 0]",
1945
+ 5.47
1946
+ ],
1947
+ [
1948
+ "[0 1 0 ... 0 0 0]",
1949
+ 4.59
1950
+ ],
1951
+ [
1952
+ "[0 1 0 ... 0 0 0]",
1953
+ 7.38
1954
+ ],
1955
+ [
1956
+ "[0 0 0 ... 0 0 0]",
1957
+ 8.87
1958
+ ],
1959
+ [
1960
+ "[0 1 0 ... 0 0 0]",
1961
+ 7.45
1962
+ ],
1963
+ [
1964
+ "[0 1 0 ... 0 0 0]",
1965
+ 7.08
1966
+ ],
1967
+ [
1968
+ "[0 1 0 ... 0 0 0]",
1969
+ 6.91
1970
+ ],
1971
+ [
1972
+ "[0 1 0 ... 0 0 0]",
1973
+ 6.07
1974
+ ],
1975
+ [
1976
+ "[0 1 0 ... 0 0 0]",
1977
+ 8.37
1978
+ ],
1979
+ [
1980
+ "[0 1 0 ... 0 0 0]",
1981
+ 6.0
1982
+ ],
1983
+ [
1984
+ "[0 1 0 ... 0 0 0]",
1985
+ 5.75
1986
+ ],
1987
+ [
1988
+ "[0 1 0 ... 0 0 0]",
1989
+ 5.87
1990
+ ],
1991
+ [
1992
+ "[0 1 0 ... 0 0 0]",
1993
+ 7.11
1994
+ ],
1995
+ [
1996
+ "[0 1 0 ... 0 0 0]",
1997
+ 6.2
1998
+ ],
1999
+ [
2000
+ "[0 0 0 ... 0 0 0]",
2001
+ 9.85
2002
+ ],
2003
+ [
2004
+ "[0 0 0 ... 0 0 0]",
2005
+ 8.05
2006
+ ],
2007
+ [
2008
+ "[0 0 0 ... 0 0 0]",
2009
+ 8.89
2010
+ ],
2011
+ [
2012
+ "[0 1 0 ... 0 0 0]",
2013
+ 8.02
2014
+ ],
2015
+ [
2016
+ "[0 0 0 ... 0 0 0]",
2017
+ 8.6
2018
+ ],
2019
+ [
2020
+ "[0 0 0 ... 0 0 0]",
2021
+ 9.49
2022
+ ],
2023
+ [
2024
+ "[0 1 0 ... 0 0 0]",
2025
+ 7.66
2026
+ ],
2027
+ [
2028
+ "[0 1 0 ... 0 0 0]",
2029
+ 8.77
2030
+ ],
2031
+ [
2032
+ "[0 0 0 ... 0 0 0]",
2033
+ 9.09
2034
+ ],
2035
+ [
2036
+ "[0 1 0 ... 0 0 0]",
2037
+ 7.31
2038
+ ],
2039
+ [
2040
+ "[0 0 0 ... 0 0 0]",
2041
+ 8.19
2042
+ ],
2043
+ [
2044
+ "[0 0 0 ... 0 0 0]",
2045
+ 9.46
2046
+ ],
2047
+ [
2048
+ "[0 1 0 ... 0 0 0]",
2049
+ 6.88
2050
+ ],
2051
+ [
2052
+ "[0 1 0 ... 0 0 0]",
2053
+ 6.86
2054
+ ],
2055
+ [
2056
+ "[0 0 0 ... 0 0 0]",
2057
+ 7.39
2058
+ ],
2059
+ [
2060
+ "[0 0 0 ... 0 0 0]",
2061
+ 7.8
2062
+ ],
2063
+ [
2064
+ "[0 0 0 ... 0 0 0]",
2065
+ 9.21
2066
+ ],
2067
+ [
2068
+ "[0 1 0 ... 0 0 0]",
2069
+ 7.29
2070
+ ],
2071
+ [
2072
+ "[0 1 0 ... 0 0 0]",
2073
+ 7.71
2074
+ ],
2075
+ [
2076
+ "[0 0 0 ... 0 0 0]",
2077
+ 8.97
2078
+ ],
2079
+ [
2080
+ "[0 0 0 ... 0 0 0]",
2081
+ 9.24
2082
+ ],
2083
+ [
2084
+ "[0 1 0 ... 0 0 0]",
2085
+ 8.73
2086
+ ],
2087
+ [
2088
+ "[0 0 0 ... 0 0 0]",
2089
+ 8.14
2090
+ ],
2091
+ [
2092
+ "[0 0 0 ... 0 0 0]",
2093
+ 9.89
2094
+ ],
2095
+ [
2096
+ "[0 0 0 ... 0 0 0]",
2097
+ 8.61
2098
+ ],
2099
+ [
2100
+ "[0 1 0 ... 0 0 0]",
2101
+ 8.4
2102
+ ],
2103
+ [
2104
+ "[0 1 0 ... 0 0 0]",
2105
+ 8.34
2106
+ ],
2107
+ [
2108
+ "[0 1 0 ... 0 0 0]",
2109
+ 7.19
2110
+ ],
2111
+ [
2112
+ "[0 1 0 ... 0 0 0]",
2113
+ 10.77
2114
+ ],
2115
+ [
2116
+ "[0 0 0 ... 0 0 0]",
2117
+ 9.96
2118
+ ],
2119
+ [
2120
+ "[0 1 0 ... 0 0 0]",
2121
+ 9.82
2122
+ ],
2123
+ [
2124
+ "[0 0 0 ... 0 0 0]",
2125
+ 9.64
2126
+ ],
2127
+ [
2128
+ "[0 1 0 ... 0 0 0]",
2129
+ 9.42
2130
+ ],
2131
+ [
2132
+ "[0 1 0 ... 0 0 0]",
2133
+ 9.19
2134
+ ],
2135
+ [
2136
+ "[0 0 0 ... 0 0 0]",
2137
+ 7.62
2138
+ ],
2139
+ [
2140
+ "[0 0 0 ... 0 0 0]",
2141
+ 7.77
2142
+ ],
2143
+ [
2144
+ "[0 0 0 ... 0 0 0]",
2145
+ 7.57
2146
+ ],
2147
+ [
2148
+ "[0 0 0 ... 0 0 0]",
2149
+ 7.26
2150
+ ],
2151
+ [
2152
+ "[0 0 0 ... 0 0 0]",
2153
+ 7.86
2154
+ ],
2155
+ [
2156
+ "[0 1 0 ... 0 0 0]",
2157
+ 8.54
2158
+ ],
2159
+ [
2160
+ "[0 0 0 ... 0 0 0]",
2161
+ 9.52
2162
+ ],
2163
+ [
2164
+ "[0 1 0 ... 0 0 0]",
2165
+ 8.29
2166
+ ],
2167
+ [
2168
+ "[0 0 0 ... 0 0 0]",
2169
+ 9.62
2170
+ ],
2171
+ [
2172
+ "[0 0 0 ... 0 0 0]",
2173
+ 9.74
2174
+ ],
2175
+ [
2176
+ "[0 0 0 ... 0 0 0]",
2177
+ 7.74
2178
+ ],
2179
+ [
2180
+ "[0 1 0 ... 0 0 0]",
2181
+ 7.41
2182
+ ],
2183
+ [
2184
+ "[0 1 0 ... 0 0 0]",
2185
+ 7.51
2186
+ ],
2187
+ [
2188
+ "[0 0 0 ... 0 0 0]",
2189
+ 9.02
2190
+ ],
2191
+ [
2192
+ "[0 0 0 ... 0 0 0]",
2193
+ 9.82
2194
+ ],
2195
+ [
2196
+ "[0 1 0 ... 0 0 0]",
2197
+ 9.46
2198
+ ]
2199
+ ]
2200
+ },
2201
+ "df_test": {
2202
+ "columns": [
2203
+ "index",
2204
+ "x",
2205
+ "y",
2206
+ "pred"
2207
+ ],
2208
+ "data": [
2209
+ [
2210
+ 40,
2211
+ "[0 1 0 ... 0 0 0]",
2212
+ 7.45,
2213
+ "[8.104705810546875]"
2214
+ ],
2215
+ [
2216
+ 72,
2217
+ "[0 0 0 ... 0 0 0]",
2218
+ 8.14,
2219
+ "[8.201379776000977]"
2220
+ ],
2221
+ [
2222
+ 88,
2223
+ "[0 0 0 ... 0 0 0]",
2224
+ 7.86,
2225
+ "[8.041634559631348]"
2226
+ ],
2227
+ [
2228
+ 47,
2229
+ "[0 1 0 ... 0 0 0]",
2230
+ 5.87,
2231
+ "[7.67177152633667]"
2232
+ ],
2233
+ [
2234
+ 86,
2235
+ "[0 0 0 ... 0 0 0]",
2236
+ 7.57,
2237
+ "[8.264192581176758]"
2238
+ ],
2239
+ [
2240
+ 17,
2241
+ "[0 0 0 ... 0 0 0]",
2242
+ 6.43,
2243
+ "[7.978921890258789]"
2244
+ ],
2245
+ [
2246
+ 80,
2247
+ "[0 1 0 ... 0 0 0]",
2248
+ 9.82,
2249
+ "[8.022457122802734]"
2250
+ ],
2251
+ [
2252
+ 49,
2253
+ "[0 1 0 ... 0 0 0]",
2254
+ 6.2,
2255
+ "[8.332632064819336]"
2256
+ ],
2257
+ [
2258
+ 36,
2259
+ "[0 0 0 ... 0 0 0]",
2260
+ 5.47,
2261
+ "[8.089141845703125]"
2262
+ ],
2263
+ [
2264
+ 65,
2265
+ "[0 0 0 ... 0 0 0]",
2266
+ 7.8,
2267
+ "[8.2095365524292]"
2268
+ ],
2269
+ [
2270
+ 1,
2271
+ "[0 1 0 ... 0 0 0]",
2272
+ 5.81,
2273
+ "[7.749063491821289]"
2274
+ ],
2275
+ [
2276
+ 10,
2277
+ "[0 1 0 ... 0 0 0]",
2278
+ 6.46,
2279
+ "[7.5141472816467285]"
2280
+ ],
2281
+ [
2282
+ 21,
2283
+ "[0 1 0 ... 0 0 0]",
2284
+ 8.78,
2285
+ "[8.20059585571289]"
2286
+ ],
2287
+ [
2288
+ 69,
2289
+ "[0 0 0 ... 0 0 0]",
2290
+ 8.97,
2291
+ "[8.091978073120117]"
2292
+ ],
2293
+ [
2294
+ 24,
2295
+ "[0 0 0 ... 0 0 0]",
2296
+ 5.88,
2297
+ "[8.08375358581543]"
2298
+ ],
2299
+ [
2300
+ 59,
2301
+ "[0 1 0 ... 0 0 0]",
2302
+ 7.31,
2303
+ "[8.203842163085938]"
2304
+ ],
2305
+ [
2306
+ 95,
2307
+ "[0 1 0 ... 0 0 0]",
2308
+ 7.41,
2309
+ "[8.150091171264648]"
2310
+ ],
2311
+ [
2312
+ 11,
2313
+ "[0 1 0 ... 0 0 0]",
2314
+ 6.68,
2315
+ "[7.686234951019287]"
2316
+ ],
2317
+ [
2318
+ 29,
2319
+ "[0 0 0 ... 0 0 0]",
2320
+ 7.72,
2321
+ "[7.770969390869141]"
2322
+ ],
2323
+ [
2324
+ 38,
2325
+ "[0 1 0 ... 0 0 0]",
2326
+ 7.38,
2327
+ "[8.099600791931152]"
2328
+ ],
2329
+ [
2330
+ 22,
2331
+ "[0 0 0 ... 0 0 0]",
2332
+ 7.44,
2333
+ "[8.196172714233398]"
2334
+ ],
2335
+ [
2336
+ 44,
2337
+ "[0 1 0 ... 0 0 0]",
2338
+ 8.37,
2339
+ "[8.272903442382812]"
2340
+ ]
2341
+ ]
2342
+ },
2343
+ "df_train": {
2344
+ "columns": [
2345
+ "index",
2346
+ "x",
2347
+ "y"
2348
+ ],
2349
+ "data": [
2350
+ [
2351
+ 22,
2352
+ "[0 0 0 ... 0 0 0]",
2353
+ 7.44
2354
+ ],
2355
+ [
2356
+ 23,
2357
+ "[0 0 0 ... 0 0 0]",
2358
+ 10.215
2359
+ ],
2360
+ [
2361
+ 24,
2362
+ "[0 0 0 ... 0 0 0]",
2363
+ 5.88
2364
+ ],
2365
+ [
2366
+ 25,
2367
+ "[0 0 0 ... 0 0 0]",
2368
+ 6.3
2369
+ ],
2370
+ [
2371
+ 26,
2372
+ "[0 0 0 ... 0 0 0]",
2373
+ 9.49
2374
+ ],
2375
+ [
2376
+ 27,
2377
+ "[0 1 0 ... 0 0 0]",
2378
+ 7.443
2379
+ ],
2380
+ [
2381
+ 28,
2382
+ "[0 0 0 ... 0 1 0]",
2383
+ 9.96
2384
+ ],
2385
+ [
2386
+ 29,
2387
+ "[0 0 0 ... 0 0 0]",
2388
+ 7.72
2389
+ ],
2390
+ [
2391
+ 30,
2392
+ "[0 1 0 ... 0 0 0]",
2393
+ 6.27
2394
+ ],
2395
+ [
2396
+ 31,
2397
+ "[0 1 0 ... 0 1 0]",
2398
+ 9.09
2399
+ ],
2400
+ [
2401
+ 32,
2402
+ "[0 1 0 ... 0 0 0]",
2403
+ 8.49
2404
+ ],
2405
+ [
2406
+ 33,
2407
+ "[0 1 0 ... 0 0 0]",
2408
+ 6.82
2409
+ ],
2410
+ [
2411
+ 34,
2412
+ "[0 1 1 ... 0 0 0]",
2413
+ 7.01
2414
+ ],
2415
+ [
2416
+ 35,
2417
+ "[0 1 0 ... 0 0 0]",
2418
+ 8.28
2419
+ ],
2420
+ [
2421
+ 36,
2422
+ "[0 0 0 ... 0 0 0]",
2423
+ 5.47
2424
+ ],
2425
+ [
2426
+ 37,
2427
+ "[0 1 0 ... 0 0 0]",
2428
+ 4.59
2429
+ ],
2430
+ [
2431
+ 38,
2432
+ "[0 1 0 ... 0 0 0]",
2433
+ 7.38
2434
+ ],
2435
+ [
2436
+ 39,
2437
+ "[0 0 0 ... 0 0 0]",
2438
+ 8.87
2439
+ ],
2440
+ [
2441
+ 40,
2442
+ "[0 1 0 ... 0 0 0]",
2443
+ 7.45
2444
+ ],
2445
+ [
2446
+ 41,
2447
+ "[0 1 0 ... 0 0 0]",
2448
+ 7.08
2449
+ ],
2450
+ [
2451
+ 42,
2452
+ "[0 1 0 ... 0 0 0]",
2453
+ 6.91
2454
+ ],
2455
+ [
2456
+ 43,
2457
+ "[0 1 0 ... 0 0 0]",
2458
+ 6.07
2459
+ ],
2460
+ [
2461
+ 44,
2462
+ "[0 1 0 ... 0 0 0]",
2463
+ 8.37
2464
+ ],
2465
+ [
2466
+ 45,
2467
+ "[0 1 0 ... 0 0 0]",
2468
+ 6.0
2469
+ ],
2470
+ [
2471
+ 46,
2472
+ "[0 1 0 ... 0 0 0]",
2473
+ 5.75
2474
+ ],
2475
+ [
2476
+ 47,
2477
+ "[0 1 0 ... 0 0 0]",
2478
+ 5.87
2479
+ ],
2480
+ [
2481
+ 48,
2482
+ "[0 1 0 ... 0 0 0]",
2483
+ 7.11
2484
+ ],
2485
+ [
2486
+ 49,
2487
+ "[0 1 0 ... 0 0 0]",
2488
+ 6.2
2489
+ ],
2490
+ [
2491
+ 50,
2492
+ "[0 0 0 ... 0 0 0]",
2493
+ 9.85
2494
+ ],
2495
+ [
2496
+ 51,
2497
+ "[0 0 0 ... 0 0 0]",
2498
+ 8.05
2499
+ ],
2500
+ [
2501
+ 52,
2502
+ "[0 0 0 ... 0 0 0]",
2503
+ 8.89
2504
+ ],
2505
+ [
2506
+ 53,
2507
+ "[0 1 0 ... 0 0 0]",
2508
+ 8.02
2509
+ ],
2510
+ [
2511
+ 54,
2512
+ "[0 0 0 ... 0 0 0]",
2513
+ 8.6
2514
+ ],
2515
+ [
2516
+ 55,
2517
+ "[0 0 0 ... 0 0 0]",
2518
+ 9.49
2519
+ ],
2520
+ [
2521
+ 56,
2522
+ "[0 1 0 ... 0 0 0]",
2523
+ 7.66
2524
+ ],
2525
+ [
2526
+ 57,
2527
+ "[0 1 0 ... 0 0 0]",
2528
+ 8.77
2529
+ ],
2530
+ [
2531
+ 58,
2532
+ "[0 0 0 ... 0 0 0]",
2533
+ 9.09
2534
+ ],
2535
+ [
2536
+ 59,
2537
+ "[0 1 0 ... 0 0 0]",
2538
+ 7.31
2539
+ ],
2540
+ [
2541
+ 60,
2542
+ "[0 0 0 ... 0 0 0]",
2543
+ 8.19
2544
+ ],
2545
+ [
2546
+ 61,
2547
+ "[0 0 0 ... 0 0 0]",
2548
+ 9.46
2549
+ ],
2550
+ [
2551
+ 62,
2552
+ "[0 1 0 ... 0 0 0]",
2553
+ 6.88
2554
+ ],
2555
+ [
2556
+ 63,
2557
+ "[0 1 0 ... 0 0 0]",
2558
+ 6.86
2559
+ ],
2560
+ [
2561
+ 64,
2562
+ "[0 0 0 ... 0 0 0]",
2563
+ 7.39
2564
+ ],
2565
+ [
2566
+ 65,
2567
+ "[0 0 0 ... 0 0 0]",
2568
+ 7.8
2569
+ ],
2570
+ [
2571
+ 66,
2572
+ "[0 0 0 ... 0 0 0]",
2573
+ 9.21
2574
+ ],
2575
+ [
2576
+ 67,
2577
+ "[0 1 0 ... 0 0 0]",
2578
+ 7.29
2579
+ ],
2580
+ [
2581
+ 68,
2582
+ "[0 1 0 ... 0 0 0]",
2583
+ 7.71
2584
+ ],
2585
+ [
2586
+ 69,
2587
+ "[0 0 0 ... 0 0 0]",
2588
+ 8.97
2589
+ ],
2590
+ [
2591
+ 70,
2592
+ "[0 0 0 ... 0 0 0]",
2593
+ 9.24
2594
+ ],
2595
+ [
2596
+ 71,
2597
+ "[0 1 0 ... 0 0 0]",
2598
+ 8.73
2599
+ ],
2600
+ [
2601
+ 72,
2602
+ "[0 0 0 ... 0 0 0]",
2603
+ 8.14
2604
+ ],
2605
+ [
2606
+ 73,
2607
+ "[0 0 0 ... 0 0 0]",
2608
+ 9.89
2609
+ ],
2610
+ [
2611
+ 74,
2612
+ "[0 0 0 ... 0 0 0]",
2613
+ 8.61
2614
+ ],
2615
+ [
2616
+ 75,
2617
+ "[0 1 0 ... 0 0 0]",
2618
+ 8.4
2619
+ ],
2620
+ [
2621
+ 76,
2622
+ "[0 1 0 ... 0 0 0]",
2623
+ 8.34
2624
+ ],
2625
+ [
2626
+ 77,
2627
+ "[0 1 0 ... 0 0 0]",
2628
+ 7.19
2629
+ ],
2630
+ [
2631
+ 78,
2632
+ "[0 1 0 ... 0 0 0]",
2633
+ 10.77
2634
+ ],
2635
+ [
2636
+ 79,
2637
+ "[0 0 0 ... 0 0 0]",
2638
+ 9.96
2639
+ ],
2640
+ [
2641
+ 80,
2642
+ "[0 1 0 ... 0 0 0]",
2643
+ 9.82
2644
+ ],
2645
+ [
2646
+ 81,
2647
+ "[0 0 0 ... 0 0 0]",
2648
+ 9.64
2649
+ ],
2650
+ [
2651
+ 82,
2652
+ "[0 1 0 ... 0 0 0]",
2653
+ 9.42
2654
+ ],
2655
+ [
2656
+ 83,
2657
+ "[0 1 0 ... 0 0 0]",
2658
+ 9.19
2659
+ ],
2660
+ [
2661
+ 84,
2662
+ "[0 0 0 ... 0 0 0]",
2663
+ 7.62
2664
+ ],
2665
+ [
2666
+ 85,
2667
+ "[0 0 0 ... 0 0 0]",
2668
+ 7.77
2669
+ ],
2670
+ [
2671
+ 86,
2672
+ "[0 0 0 ... 0 0 0]",
2673
+ 7.57
2674
+ ],
2675
+ [
2676
+ 87,
2677
+ "[0 0 0 ... 0 0 0]",
2678
+ 7.26
2679
+ ],
2680
+ [
2681
+ 88,
2682
+ "[0 0 0 ... 0 0 0]",
2683
+ 7.86
2684
+ ],
2685
+ [
2686
+ 89,
2687
+ "[0 1 0 ... 0 0 0]",
2688
+ 8.54
2689
+ ],
2690
+ [
2691
+ 90,
2692
+ "[0 0 0 ... 0 0 0]",
2693
+ 9.52
2694
+ ],
2695
+ [
2696
+ 91,
2697
+ "[0 1 0 ... 0 0 0]",
2698
+ 8.29
2699
+ ],
2700
+ [
2701
+ 92,
2702
+ "[0 0 0 ... 0 0 0]",
2703
+ 9.62
2704
+ ],
2705
+ [
2706
+ 93,
2707
+ "[0 0 0 ... 0 0 0]",
2708
+ 9.74
2709
+ ],
2710
+ [
2711
+ 94,
2712
+ "[0 0 0 ... 0 0 0]",
2713
+ 7.74
2714
+ ],
2715
+ [
2716
+ 95,
2717
+ "[0 1 0 ... 0 0 0]",
2718
+ 7.41
2719
+ ],
2720
+ [
2721
+ 96,
2722
+ "[0 1 0 ... 0 0 0]",
2723
+ 7.51
2724
+ ],
2725
+ [
2726
+ 97,
2727
+ "[0 0 0 ... 0 0 0]",
2728
+ 9.02
2729
+ ],
2730
+ [
2731
+ 98,
2732
+ "[0 0 0 ... 0 0 0]",
2733
+ 9.82
2734
+ ],
2735
+ [
2736
+ 99,
2737
+ "[0 1 0 ... 0 0 0]",
2738
+ 9.46
2739
+ ],
2740
+ [
2741
+ 100,
2742
+ "[0 1 0 ... 0 0 0]",
2743
+ 8.95
2744
+ ],
2745
+ [
2746
+ 101,
2747
+ "[0 1 0 ... 0 0 0]",
2748
+ 8.78
2749
+ ],
2750
+ [
2751
+ 102,
2752
+ "[0 1 0 ... 0 0 0]",
2753
+ 8.45
2754
+ ],
2755
+ [
2756
+ 103,
2757
+ "[0 0 0 ... 0 0 0]",
2758
+ 8.29
2759
+ ],
2760
+ [
2761
+ 104,
2762
+ "[0 1 0 ... 0 0 0]",
2763
+ 7.95
2764
+ ],
2765
+ [
2766
+ 105,
2767
+ "[0 1 0 ... 0 0 0]",
2768
+ 7.48
2769
+ ],
2770
+ [
2771
+ 106,
2772
+ "[0 1 0 ... 0 0 0]",
2773
+ 6.79
2774
+ ],
2775
+ [
2776
+ 107,
2777
+ "[0 1 0 ... 0 0 0]",
2778
+ 8.39
2779
+ ]
2780
+ ]
2781
+ },
2782
+ "training": {
2783
+ "columns": [
2784
+ "training_loss"
2785
+ ],
2786
+ "data": [
2787
+ [
2788
+ 67.413818359375
2789
+ ],
2790
+ [
2791
+ 67.11187744140625
2792
+ ],
2793
+ [
2794
+ 66.81317901611328
2795
+ ],
2796
+ [
2797
+ 66.5162353515625
2798
+ ],
2799
+ [
2800
+ 66.21949768066406
2801
+ ],
2802
+ [
2803
+ 65.92274475097656
2804
+ ],
2805
+ [
2806
+ 65.62549591064453
2807
+ ],
2808
+ [
2809
+ 65.32546997070312
2810
+ ],
2811
+ [
2812
+ 65.02108764648438
2813
+ ],
2814
+ [
2815
+ 64.71121978759766
2816
+ ],
2817
+ [
2818
+ 64.39421081542969
2819
+ ],
2820
+ [
2821
+ 64.06808471679688
2822
+ ],
2823
+ [
2824
+ 63.73294448852539
2825
+ ],
2826
+ [
2827
+ 63.3873405456543
2828
+ ],
2829
+ [
2830
+ 63.02961730957031
2831
+ ],
2832
+ [
2833
+ 62.65884017944336
2834
+ ],
2835
+ [
2836
+ 62.27304458618164
2837
+ ],
2838
+ [
2839
+ 61.87138366699219
2840
+ ],
2841
+ [
2842
+ 61.452850341796875
2843
+ ],
2844
+ [
2845
+ 61.01667404174805
2846
+ ],
2847
+ [
2848
+ 60.56078338623047
2849
+ ],
2850
+ [
2851
+ 60.08305740356445
2852
+ ],
2853
+ [
2854
+ 59.582435607910156
2855
+ ],
2856
+ [
2857
+ 59.05806350708008
2858
+ ],
2859
+ [
2860
+ 58.50962829589844
2861
+ ],
2862
+ [
2863
+ 57.935184478759766
2864
+ ],
2865
+ [
2866
+ 57.33393096923828
2867
+ ],
2868
+ [
2869
+ 56.705013275146484
2870
+ ],
2871
+ [
2872
+ 56.0476188659668
2873
+ ],
2874
+ [
2875
+ 55.360347747802734
2876
+ ],
2877
+ [
2878
+ 54.6429443359375
2879
+ ],
2880
+ [
2881
+ 53.89464569091797
2882
+ ],
2883
+ [
2884
+ 53.113922119140625
2885
+ ],
2886
+ [
2887
+ 52.30055618286133
2888
+ ],
2889
+ [
2890
+ 51.4543571472168
2891
+ ],
2892
+ [
2893
+ 50.57438278198242
2894
+ ],
2895
+ [
2896
+ 49.660362243652344
2897
+ ],
2898
+ [
2899
+ 48.712093353271484
2900
+ ],
2901
+ [
2902
+ 47.72883224487305
2903
+ ],
2904
+ [
2905
+ 46.7108039855957
2906
+ ],
2907
+ [
2908
+ 45.65839767456055
2909
+ ],
2910
+ [
2911
+ 44.572303771972656
2912
+ ],
2913
+ [
2914
+ 43.45291519165039
2915
+ ],
2916
+ [
2917
+ 42.30076217651367
2918
+ ],
2919
+ [
2920
+ 41.11710739135742
2921
+ ],
2922
+ [
2923
+ 39.90336990356445
2924
+ ],
2925
+ [
2926
+ 38.66173553466797
2927
+ ],
2928
+ [
2929
+ 37.39354705810547
2930
+ ],
2931
+ [
2932
+ 36.100341796875
2933
+ ],
2934
+ [
2935
+ 34.78422546386719
2936
+ ],
2937
+ [
2938
+ 33.44749450683594
2939
+ ],
2940
+ [
2941
+ 32.092674255371094
2942
+ ],
2943
+ [
2944
+ 30.722511291503906
2945
+ ],
2946
+ [
2947
+ 29.340362548828125
2948
+ ],
2949
+ [
2950
+ 27.94980239868164
2951
+ ],
2952
+ [
2953
+ 26.553958892822266
2954
+ ],
2955
+ [
2956
+ 25.156696319580078
2957
+ ],
2958
+ [
2959
+ 23.762224197387695
2960
+ ],
2961
+ [
2962
+ 22.374366760253906
2963
+ ],
2964
+ [
2965
+ 20.997533798217773
2966
+ ],
2967
+ [
2968
+ 19.63677978515625
2969
+ ],
2970
+ [
2971
+ 18.296897888183594
2972
+ ],
2973
+ [
2974
+ 16.982328414916992
2975
+ ],
2976
+ [
2977
+ 15.697725296020508
2978
+ ],
2979
+ [
2980
+ 14.44817066192627
2981
+ ],
2982
+ [
2983
+ 13.238905906677246
2984
+ ],
2985
+ [
2986
+ 12.074806213378906
2987
+ ],
2988
+ [
2989
+ 10.960868835449219
2990
+ ],
2991
+ [
2992
+ 9.901790618896484
2993
+ ],
2994
+ [
2995
+ 8.901801109313965
2996
+ ],
2997
+ [
2998
+ 7.964723110198975
2999
+ ],
3000
+ [
3001
+ 7.09385347366333
3002
+ ],
3003
+ [
3004
+ 6.291915416717529
3005
+ ],
3006
+ [
3007
+ 5.561134338378906
3008
+ ],
3009
+ [
3010
+ 4.903149127960205
3011
+ ],
3012
+ [
3013
+ 4.318702220916748
3014
+ ],
3015
+ [
3016
+ 3.808044672012329
3017
+ ],
3018
+ [
3019
+ 3.370572566986084
3020
+ ],
3021
+ [
3022
+ 3.004401922225952
3023
+ ],
3024
+ [
3025
+ 2.706446886062622
3026
+ ],
3027
+ [
3028
+ 2.472712278366089
3029
+ ],
3030
+ [
3031
+ 2.2981722354888916
3032
+ ],
3033
+ [
3034
+ 2.176875591278076
3035
+ ],
3036
+ [
3037
+ 2.102105140686035
3038
+ ],
3039
+ [
3040
+ 2.066572666168213
3041
+ ],
3042
+ [
3043
+ 2.0626060962677
3044
+ ],
3045
+ [
3046
+ 2.082454204559326
3047
+ ],
3048
+ [
3049
+ 2.1185786724090576
3050
+ ],
3051
+ [
3052
+ 2.163982629776001
3053
+ ],
3054
+ [
3055
+ 2.212440252304077
3056
+ ],
3057
+ [
3058
+ 2.2587029933929443
3059
+ ],
3060
+ [
3061
+ 2.298664093017578
3062
+ ],
3063
+ [
3064
+ 2.3294262886047363
3065
+ ],
3066
+ [
3067
+ 2.349210023880005
3068
+ ],
3069
+ [
3070
+ 2.3572983741760254
3071
+ ],
3072
+ [
3073
+ 2.353860855102539
3074
+ ],
3075
+ [
3076
+ 2.339801073074341
3077
+ ],
3078
+ [
3079
+ 2.3165128231048584
3080
+ ],
3081
+ [
3082
+ 2.285783290863037
3083
+ ],
3084
+ [
3085
+ 2.2495362758636475
3086
+ ]
3087
+ ]
3088
+ }
3089
+ },
3090
+ "other": {
3091
+ "model": "ModelConfig(model=Sequential(\n (0) - Linear(1024, 512, bias=True): Input__tensor_1_output -> Linear_1_output\n (1) - <function relu at 0x7f2e936854e0>: Linear_1_output -> Activation_1_output\n (2) - Linear(512, 256, bias=True): Activation_1_output -> Linear_2_output\n (3) - <function relu at 0x7f2e936854e0>: Linear_2_output -> Activation_2_output\n (4) - Linear(256, 1, bias=True): Activation_2_output -> Linear_3_output\n (5) - Identity(): Linear_3_output -> Output_1_x\n (6) - Identity(): Output_1_x -> Output_1_x\n), model_inputs=['Input__tensor_1_output'], model_outputs=['Output_1_x'], loss_inputs=['Input__tensor_3_output', 'Output_1_x'], loss=Sequential(\n (0) - <function mse_loss at 0x7f2e93687420>: Output_1_x, Input__tensor_3_output -> MSE_loss_2_output\n (1) - Identity(): MSE_loss_2_output -> loss\n), optimizer_parameters={'lr': 0.0001, 'type': <OptionsFor_type.AdamW: 1>}, optimizer=AdamW (\nParameter Group 0\n amsgrad: False\n betas: (0.9, 0.999)\n capturable: False\n decoupled_weight_decay: True\n differentiable: False\n eps: 1e-08\n foreach: None\n fused: None\n lr: 0.0001\n maximize: False\n weight_decay: 0.01\n), source_workspace='Cheminformatics/Model_NN_SAR', trained=True)"
3092
+ },
3093
+ "relations": []
3094
+ },
3095
+ "error": null,
3096
+ "input_metadata": [
3097
+ {
3098
+ "dataframes": {
3099
+ "df": {
3100
+ "columns": [
3101
+ "x",
3102
+ "y"
3103
+ ]
3104
+ },
3105
+ "df_test": {
3106
+ "columns": [
3107
+ "index",
3108
+ "pred",
3109
+ "x",
3110
+ "y"
3111
+ ]
3112
+ },
3113
+ "df_train": {
3114
+ "columns": [
3115
+ "index",
3116
+ "x",
3117
+ "y"
3118
+ ]
3119
+ },
3120
+ "training": {
3121
+ "columns": [
3122
+ "training_loss"
3123
+ ]
3124
+ }
3125
+ },
3126
+ "other": {
3127
+ "model": {
3128
+ "model": {
3129
+ "inputs": [
3130
+ "Input__tensor_1_output"
3131
+ ],
3132
+ "loss_inputs": [
3133
+ "Input__tensor_3_output",
3134
+ "Output_1_x"
3135
+ ],
3136
+ "outputs": [
3137
+ "Output_1_x"
3138
+ ],
3139
+ "trained": true
3140
+ },
3141
+ "type": "model"
3142
+ }
3143
+ },
3144
+ "relations": []
3145
+ }
3146
+ ],
3147
+ "meta": {
3148
+ "color": "orange",
3149
+ "doc": null,
3150
+ "inputs": [
3151
+ {
3152
+ "name": "bundle",
3153
+ "position": "left",
3154
+ "type": {
3155
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
3156
+ }
3157
+ }
3158
+ ],
3159
+ "name": "View tables",
3160
+ "outputs": [],
3161
+ "params": [
3162
+ {
3163
+ "default": 100,
3164
+ "name": "limit",
3165
+ "type": {
3166
+ "type": "<class 'int'>"
3167
+ }
3168
+ }
3169
+ ],
3170
+ "type": "table_view"
3171
+ },
3172
+ "params": {
3173
+ "_tables_open": {
3174
+ "df_test": true,
3175
+ "df_train": false
3176
+ },
3177
+ "limit": 100.0
3178
+ },
3179
+ "status": "done",
3180
+ "title": "View tables"
3181
+ },
3182
+ "dragHandle": ".bg-primary",
3183
+ "height": 523.0,
3184
+ "id": "View tables 1",
3185
+ "position": {
3186
+ "x": 2614.6287203681786,
3187
+ "y": -389.3147778373818
3188
+ },
3189
+ "type": "table_view",
3190
+ "width": 940.0
3191
+ }
3192
+ ]
3193
+ }
examples/Cheminformatics/RCSB use case.lynxkite.json ADDED
The diff for this file is too large to render. See raw diff
 
examples/Cheminformatics/chem_utils.py CHANGED
@@ -6,18 +6,20 @@ from operator import itemgetter
6
  from typing import List
7
  from typing import Tuple
8
  import itertools
9
- import matplotlib.pyplot as plt
10
  import numpy as np
 
11
  import seaborn as sns
12
  from rdkit import Chem, DataStructs, RDLogger
13
  from rdkit.Chem.Draw import rdMolDraw2D
14
  from rdkit.Chem.rdchem import Mol
15
  from rdkit.ML.Cluster import Butina
16
  from rdkit.rdBase import BlockLogs
17
-
18
  import pandas as pd
19
  from rdkit.Chem.rdMMPA import FragmentMol
20
  from rdkit.Chem.rdRGroupDecomposition import RGroupDecompose
 
 
 
21
 
22
 
23
  def smi2mol_with_errors(smi: str) -> Tuple[Mol, str]:
 
6
  from typing import List
7
  from typing import Tuple
8
  import itertools
 
9
  import numpy as np
10
+ import matplotlib.pyplot as plt
11
  import seaborn as sns
12
  from rdkit import Chem, DataStructs, RDLogger
13
  from rdkit.Chem.Draw import rdMolDraw2D
14
  from rdkit.Chem.rdchem import Mol
15
  from rdkit.ML.Cluster import Butina
16
  from rdkit.rdBase import BlockLogs
 
17
  import pandas as pd
18
  from rdkit.Chem.rdMMPA import FragmentMol
19
  from rdkit.Chem.rdRGroupDecomposition import RGroupDecompose
20
+ import matplotlib
21
+
22
+ matplotlib.use("agg")
23
 
24
 
25
  def smi2mol_with_errors(smi: str) -> Tuple[Mol, str]:
examples/Cheminformatics/cheminfo_tools.py CHANGED
@@ -13,10 +13,15 @@ import math
13
  import io
14
  from rdkit.Chem import AllChem
15
  from sklearn.ensemble import RandomForestRegressor
 
 
16
  from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error
17
  from sklearn.model_selection import train_test_split
18
  import numpy as np
19
  from rdkit.Chem import MACCSkeys
 
 
 
20
 
21
 
22
  @op("LynxKite Graph Analytics", "View mol filter", view="matplotlib", slow=True)
@@ -104,34 +109,195 @@ def mol_filter(
104
  plot_gallery(images, num_cols=mols_per_row)
105
 
106
 
107
- @op("LynxKite Graph Analytics", "Lipinski filter")
108
  def lipinski_filter(bundle, *, table_name: str, column_name: str, strict_lipinski: bool = True):
109
- # copy bundle and get DataFrame
 
 
110
  bundle = bundle.copy()
111
  df = bundle.dfs[table_name].copy()
 
 
 
 
112
  df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
113
  df = df[df["mol"].notnull()].reset_index(drop=True)
114
 
115
- # compute properties
116
  df["MW"] = df["mol"].apply(Descriptors.MolWt)
117
  df["logP"] = df["mol"].apply(Crippen.MolLogP)
118
  df["HBD"] = df["mol"].apply(Lipinski.NumHDonors)
119
  df["HBA"] = df["mol"].apply(Lipinski.NumHAcceptors)
120
 
121
- # compute a boolean pass/fail for Lipinski
122
  df["pass_lipinski"] = (
123
  (df["MW"] <= 500) & (df["logP"] <= 5) & (df["HBD"] <= 5) & (df["HBA"] <= 10)
124
  )
125
- df = df.drop("mol", axis=1)
126
 
127
- # if strict_lipinski, drop those that fail
128
- if strict_lipinski:
129
- failed = df.loc[~df["pass_lipinski"], column_name].tolist()
130
- df = df[df["pass_lipinski"]].reset_index(drop=True)
131
- if failed:
132
- print(f"Dropped {len(failed)} molecules that failed Lipinski: {failed}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
- return df
 
 
 
135
 
136
 
137
  @op("LynxKite Graph Analytics", "View mol image", view="matplotlib", slow=True)
 
13
  import io
14
  from rdkit.Chem import AllChem
15
  from sklearn.ensemble import RandomForestRegressor
16
+ from rdkit.Chem.FilterCatalog import FilterCatalog, FilterCatalogParams
17
+ from rdkit.Chem import rdMolDescriptors
18
  from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error
19
  from sklearn.model_selection import train_test_split
20
  import numpy as np
21
  from rdkit.Chem import MACCSkeys
22
+ import matplotlib
23
+
24
+ matplotlib.use("agg")
25
 
26
 
27
  @op("LynxKite Graph Analytics", "View mol filter", view="matplotlib", slow=True)
 
109
  plot_gallery(images, num_cols=mols_per_row)
110
 
111
 
112
+ @op("LynxKite Graph Analytics", "Lipinski filter", outputs=["pass", "fail"])
113
  def lipinski_filter(bundle, *, table_name: str, column_name: str, strict_lipinski: bool = True):
114
+ """
115
+ Apply the lipinski rule (MW <= 500,HBA <= 10 , HBD <=5,logP <= 5 ).
116
+ """
117
  bundle = bundle.copy()
118
  df = bundle.dfs[table_name].copy()
119
+ if df is None:
120
+ raise KeyError("Table not found")
121
+
122
+ # Parse SMILES into molecules, drop unparsable
123
  df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
124
  df = df[df["mol"].notnull()].reset_index(drop=True)
125
 
126
+ # Compute Lipinski properties
127
  df["MW"] = df["mol"].apply(Descriptors.MolWt)
128
  df["logP"] = df["mol"].apply(Crippen.MolLogP)
129
  df["HBD"] = df["mol"].apply(Lipinski.NumHDonors)
130
  df["HBA"] = df["mol"].apply(Lipinski.NumHAcceptors)
131
 
132
+ # Determine pass/fail
133
  df["pass_lipinski"] = (
134
  (df["MW"] <= 500) & (df["logP"] <= 5) & (df["HBD"] <= 5) & (df["HBA"] <= 10)
135
  )
 
136
 
137
+ # Split out the two sets
138
+ pass_df = df[df["pass_lipinski"]].drop("mol", axis=1).reset_index(drop=True)
139
+ fail_df = df[~df["pass_lipinski"]].drop("mol", axis=1).reset_index(drop=True)
140
+
141
+ # return pass_df,fail_df
142
+ return {
143
+ "pass": pass_df,
144
+ "fail": fail_df,
145
+ }
146
+
147
+
148
+ @op("LynxKite Graph Analytics", "Veber filter", outputs=["pass", "fail"])
149
+ def veber_filter(bundle, *, table_name: str, column_name: str):
150
+ """
151
+ Apply the Veber rule (TPSA <= 140, rotatable bonds <= 10).
152
+ """
153
+ bundle = bundle.copy()
154
+ df = bundle.dfs[table_name].copy()
155
+ df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
156
+ df = df[df["mol"].notnull()].reset_index(drop=True)
157
+ df["TPSA"] = df["mol"].apply(rdMolDescriptors.CalcTPSA)
158
+ df["RotB"] = df["mol"].apply(Lipinski.NumRotatableBonds)
159
+ df["pass_veber"] = (df["TPSA"] <= 140) & (df["RotB"] <= 10)
160
+
161
+ pass_df = df[df["pass_veber"]].drop("mol", axis=1).reset_index(drop=True)
162
+ fail_df = df[~df["pass_veber"]].drop("mol", axis=1).reset_index(drop=True)
163
+
164
+ # return df.drop(columns=['mol'])
165
+ return {
166
+ "pass": pass_df,
167
+ "fail": fail_df,
168
+ }
169
+
170
+
171
+ @op("LynxKite Graph Analytics", "Ghose filter", outputs=["pass", "fail"])
172
+ def ghose_filter(bundle, *, table_name: str, column_name: str, strict_ghose: bool = True):
173
+ """
174
+ Apply the Ghose filter:
175
+ - 160 <= MW <= 480
176
+ - -0.4 <= logP <= 5.6
177
+ - 40 <= MR <= 130
178
+ - 20 <= atom count <= 70
179
+ """
180
+ bundle = bundle.copy()
181
+ df = bundle.dfs[table_name].copy()
182
+ df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
183
+ df = df[df["mol"].notnull()].reset_index(drop=True)
184
+ df["MW"] = df["mol"].apply(Descriptors.MolWt)
185
+ df["logP"] = df["mol"].apply(Crippen.MolLogP)
186
+ df["MR"] = df["mol"].apply(Descriptors.MolMR)
187
+ df["Atoms"] = df["mol"].apply(lambda m: m.GetNumAtoms())
188
+ df["pass_ghose"] = (
189
+ (df["MW"] >= 160)
190
+ & (df["MW"] <= 480)
191
+ & (df["logP"] >= -0.4)
192
+ & (df["logP"] <= 5.6)
193
+ & (df["MR"] >= 40)
194
+ & (df["MR"] <= 130)
195
+ & (df["Atoms"] >= 20)
196
+ & (df["Atoms"] <= 70)
197
+ )
198
+
199
+ pass_df = df[df["pass_ghose"]].drop("mol", axis=1).reset_index(drop=True)
200
+ fail_df = df[~df["pass_ghose"]].drop("mol", axis=1).reset_index(drop=True)
201
+
202
+ return {
203
+ "pass": pass_df,
204
+ "fail": fail_df,
205
+ }
206
+
207
+
208
+ @op("LynxKite Graph Analytics", "Egan filter", outputs=["pass", "fail"])
209
+ def egan_filter(bundle, *, table_name: str, column_name: str, strict_egan: bool = True):
210
+ """
211
+ Apply the Egan filter (logP <= 5.88, TPSA <= 131.6).
212
+ """
213
+ bundle = bundle.copy()
214
+ df = bundle.dfs[table_name].copy()
215
+ df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
216
+ df = df[df["mol"].notnull()].reset_index(drop=True)
217
+ df["logP"] = df["mol"].apply(Crippen.MolLogP)
218
+ df["TPSA"] = df["mol"].apply(rdMolDescriptors.CalcTPSA)
219
+ df["pass_egan"] = (df["logP"] <= 5.88) & (df["TPSA"] <= 131.6)
220
+
221
+ pass_df = df[df["pass_egan"]].drop("mol", axis=1).reset_index(drop=True)
222
+ fail_df = df[~df["pass_egan"]].drop("mol", axis=1).reset_index(drop=True)
223
+
224
+ return {
225
+ "pass": pass_df,
226
+ "fail": fail_df,
227
+ }
228
+
229
+
230
+ @op("LynxKite Graph Analytics", "Muegge filter", outputs=["pass", "fail"])
231
+ def muegge_filter(bundle, *, table_name: str, column_name: str, strict_muegge: bool = True):
232
+ """
233
+ Apply the Muegge filter:
234
+ - 200 <= MW <= 600
235
+ - -2 <= logP <= 5
236
+ - TPSA <= 150
237
+ - rotatable bonds <= 15
238
+ - 3 <= ring count <= 7
239
+ - atom count <= 50
240
+ """
241
+ bundle = bundle.copy()
242
+ df = bundle.dfs[table_name].copy()
243
+ df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
244
+ df = df[df["mol"].notnull()].reset_index(drop=True)
245
+ df["MW"] = df["mol"].apply(Descriptors.MolWt)
246
+ df["logP"] = df["mol"].apply(Crippen.MolLogP)
247
+ df["TPSA"] = df["mol"].apply(rdMolDescriptors.CalcTPSA)
248
+ df["RotB"] = df["mol"].apply(Lipinski.NumRotatableBonds)
249
+ df["Rings"] = df["mol"].apply(lambda m: len(m.GetRingInfo().AtomRings()))
250
+ df["Atoms"] = df["mol"].apply(lambda m: m.GetNumAtoms())
251
+ df["pass_muegge"] = (
252
+ (df["MW"] >= 200)
253
+ & (df["MW"] <= 600)
254
+ & (df["logP"] >= -2)
255
+ & (df["logP"] <= 5)
256
+ & (df["TPSA"] <= 150)
257
+ & (df["RotB"] <= 15)
258
+ & (df["Rings"] >= 3)
259
+ & (df["Rings"] <= 7)
260
+ & (df["Atoms"] <= 50)
261
+ )
262
+
263
+ pass_df = df[df["pass_muegge"]].drop("mol", axis=1).reset_index(drop=True)
264
+ fail_df = df[~df["pass_muegge"]].drop("mol", axis=1).reset_index(drop=True)
265
+
266
+ return {
267
+ "pass": pass_df,
268
+ "fail": fail_df,
269
+ }
270
+
271
+
272
+ @op("LynxKite Graph Analytics", "Brenk Aggregator filter", outputs=["pass", "fail"])
273
+ def brenk_aggregator_filter(
274
+ bundle, *, table_name: str, column_name: str, strict_brenk: bool = True
275
+ ):
276
+ """
277
+ Apply Brenk aggregator filters for known nuisance substructures.
278
+ """
279
+ bundle = bundle.copy()
280
+ df = bundle.dfs[table_name].copy()
281
+ df["mol"] = df[column_name].apply(Chem.MolFromSmiles)
282
+ df = df[df["mol"].notnull()].reset_index(drop=True)
283
+ params = FilterCatalogParams()
284
+ params.AddCatalog(FilterCatalogParams.FilterCatalogs.BRENK)
285
+ catalog = FilterCatalog(params)
286
+
287
+ def _get_brenk_alerts(mol):
288
+ entries = catalog.GetMatches(mol)
289
+ return [e.GetDescription() for e in entries] if entries else []
290
+
291
+ df["brenk_alerts"] = df["mol"].apply(_get_brenk_alerts)
292
+ df["pass_brenk"] = df["brenk_alerts"].apply(lambda x: len(x) == 0)
293
+
294
+ pass_df = df[df["pass_brenk"]].drop("mol", axis=1).reset_index(drop=True)
295
+ fail_df = df[~df["pass_brenk"]].drop("mol", axis=1).reset_index(drop=True)
296
 
297
+ return {
298
+ "pass": pass_df,
299
+ "fail": fail_df,
300
+ }
301
 
302
 
303
  @op("LynxKite Graph Analytics", "View mol image", view="matplotlib", slow=True)
examples/Cheminformatics/qsar_example.lynxkite.json CHANGED
@@ -1,12 +1,5 @@
1
  {
2
  "edges": [
3
- {
4
- "id": "Import CSV 1 output Train QSAR2 1 df",
5
- "source": "Import CSV 1",
6
- "sourceHandle": "output",
7
- "target": "Train QSAR2 1",
8
- "targetHandle": "df"
9
- },
10
  {
11
  "id": "Train QSAR2 1 output plot qsar2 1 results_df",
12
  "source": "Train QSAR2 1",
@@ -20,6 +13,34 @@
20
  "sourceHandle": "output",
21
  "target": "plot qsar 1",
22
  "targetHandle": "results_df"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
  ],
25
  "env": "LynxKite Graph Analytics",
@@ -30,84 +51,90 @@
30
  "collapsed": null,
31
  "display": null,
32
  "error": null,
33
- "input_metadata": [],
 
 
34
  "meta": {
35
  "color": "orange",
36
  "doc": [
37
  {
38
  "kind": "text",
39
- "value": "Imports a CSV file."
40
- }
41
- ],
42
- "inputs": [],
43
- "name": "Import CSV",
44
- "outputs": [
45
- {
46
- "name": "output",
47
- "position": "right",
48
- "type": {
49
- "type": "None"
50
- }
51
- }
52
- ],
53
- "params": [
54
- {
55
- "default": null,
56
- "name": "filename",
57
- "type": {
58
- "type": "<class 'str'>"
59
- }
60
  },
61
  {
62
- "default": "<from file>",
63
- "name": "columns",
64
- "type": {
65
- "type": "<class 'str'>"
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  },
68
  {
69
- "default": "<auto>",
70
- "name": "separator",
71
- "type": {
72
- "type": "<class 'str'>"
73
- }
74
- }
75
- ],
76
- "type": "basic"
77
- },
78
- "params": {
79
- "columns": "<from file>",
80
- "filename": "~/Github/lynxkite-2024/examples/uploads/CHEMBL313_sel.csv",
81
- "separator": "<auto>"
82
- },
83
- "status": "done",
84
- "title": "Import CSV"
85
- },
86
- "dragHandle": ".bg-primary",
87
- "height": 334.0,
88
- "id": "Import CSV 1",
89
- "position": {
90
- "x": 58.0,
91
- "y": 59.0
92
- },
93
- "type": "basic",
94
- "width": 457.0
95
- },
96
- {
97
- "data": {
98
- "__execution_delay": 0.0,
99
- "collapsed": null,
100
- "display": null,
101
- "error": null,
102
- "input_metadata": [
103
- {}
104
- ],
105
- "meta": {
106
- "color": "orange",
107
- "doc": [
108
- {
109
- "kind": "text",
110
- "value": "Train/save RandomForest QSAR model, returning the model and a results DataFrame.\n\nThe results DataFrame contains per-point data ('actual', 'predicted',\n'lower_ci', 'upper_ci', 'split') AND repeated summary metrics for each\nsplit ('split_R2', 'split_MAE', 'split_RMSE').\n\nParameters\n----------\n(Parameters are the same as before)\nbundle : any\ntable_name : str\nsmiles_col : str\ntarget_col : str\nfp_type : str\nradius : int\nn_bits : int\ntest_size : float\nrandom_state : int\nout_dir : str\nconfidence : float, optional\n\nReturns\n-------\nmodel : RandomForestRegressor\n The trained QSAR model.\nresults_df : pandas.DataFrame\n DataFrame containing columns: 'actual', 'predicted', 'lower_ci',\n 'upper_ci', 'split', 'split_R2', 'split_MAE', 'split_RMSE'.\n The metric columns repeat the overall metric for the corresponding split."
111
  }
112
  ],
113
  "inputs": [
@@ -201,13 +228,13 @@
201
  "fp_type": "maccs",
202
  "n_bits": 2048.0,
203
  "out_dir": "Models",
204
- "radius": 2.0,
205
  "random_state": 42.0,
206
  "smiles_col": "SMILES",
207
  "target_col": "pIC50",
208
  "test_size": 0.2
209
  },
210
- "status": "done",
211
  "title": "Train QSAR2"
212
  },
213
  "dragHandle": ".bg-primary",
@@ -232,7 +259,56 @@
232
  "doc": [
233
  {
234
  "kind": "text",
235
- "value": "Plots actual vs. predicted values resembling the example image.\n\nIncludes separate markers for train/test, y=x line, and parallel dashed\nerror bands based on test set RMSE (optional). Does NOT use per-point CIs.\n\nHandles displaying the plot via plt.show() or saving it to a file\nbased on the `save_path` parameter. THIS FUNCTION DOES NOT RETURN ANY VALUE.\n\nParameters\n----------\nresults_df : pd.DataFrame\n Mandatory input DataFrame. Must contain: 'actual', 'predicted', 'split'.\n Should also contain 'split_RMSE' column for error bands and metrics display.\ntitle : str, optional\nxlabel : str, optional\nylabel : str, optional\nrmse_multiplier_for_bands : float or None, optional\n Determines the width of the dashed error bands (multiplier * test_RMSE).\n Set to None to disable bands. Default is 1.0.\nshow_metrics : bool, optional\n Whether to display R2/MAE/RMSE text (requires metric columns). Default is True.\nsave_path : str, optional\n If provided, saves plot to this path. If None (default), displays plot.\n\nRaises\n------\nValueError / TypeError : For invalid inputs."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  }
237
  ],
238
  "inputs": [
@@ -250,18 +326,18 @@
250
  "type": "image"
251
  },
252
  "params": {},
253
- "status": "done",
254
  "title": "plot qsar2"
255
  },
256
  "dragHandle": ".bg-primary",
257
- "height": 379.0,
258
  "id": "plot qsar2 1",
259
  "position": {
260
- "x": 1150.5,
261
- "y": 57.5
262
  },
263
  "type": "image",
264
- "width": 347.0
265
  },
266
  {
267
  "data": {
@@ -293,18 +369,1383 @@
293
  "type": "image"
294
  },
295
  "params": {},
296
- "status": "done",
297
  "title": "plot qsar"
298
  },
299
  "dragHandle": ".bg-primary",
300
- "height": 200.0,
301
  "id": "plot qsar 1",
302
  "position": {
303
- "x": 1284.5,
304
- "y": 497.5
305
  },
306
  "type": "image",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  "width": 200.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  }
309
  ]
310
  }
 
1
  {
2
  "edges": [
 
 
 
 
 
 
 
3
  {
4
  "id": "Train QSAR2 1 output plot qsar2 1 results_df",
5
  "source": "Train QSAR2 1",
 
13
  "sourceHandle": "output",
14
  "target": "plot qsar 1",
15
  "targetHandle": "results_df"
16
+ },
17
+ {
18
+ "id": "Lipinski filter 1 pass View tables 1 bundle",
19
+ "source": "Lipinski filter 1",
20
+ "sourceHandle": "pass",
21
+ "target": "View tables 1",
22
+ "targetHandle": "bundle"
23
+ },
24
+ {
25
+ "id": "Import file 1 output Train QSAR2 1 df",
26
+ "source": "Import file 1",
27
+ "sourceHandle": "output",
28
+ "target": "Train QSAR2 1",
29
+ "targetHandle": "df"
30
+ },
31
+ {
32
+ "id": "Import file 1 output Lipinski filter 1 bundle",
33
+ "source": "Import file 1",
34
+ "sourceHandle": "output",
35
+ "target": "Lipinski filter 1",
36
+ "targetHandle": "bundle"
37
+ },
38
+ {
39
+ "id": "Lipinski filter 1 fail View tables 2 bundle",
40
+ "source": "Lipinski filter 1",
41
+ "sourceHandle": "fail",
42
+ "target": "View tables 2",
43
+ "targetHandle": "bundle"
44
  }
45
  ],
46
  "env": "LynxKite Graph Analytics",
 
51
  "collapsed": null,
52
  "display": null,
53
  "error": null,
54
+ "input_metadata": [
55
+ {}
56
+ ],
57
  "meta": {
58
  "color": "orange",
59
  "doc": [
60
  {
61
  "kind": "text",
62
+ "value": "Train/save RandomForest QSAR model, returning the model and a results DataFrame.\n\nThe results DataFrame contains per-point data ('actual', 'predicted',\n'lower_ci', 'upper_ci', 'split') AND repeated summary metrics for each\nsplit ('split_R2', 'split_MAE', 'split_RMSE')."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  },
64
  {
65
+ "kind": "parameters",
66
+ "value": [
67
+ {
68
+ "annotation": "any",
69
+ "description": "",
70
+ "name": "bundle"
71
+ },
72
+ {
73
+ "annotation": "str",
74
+ "description": "",
75
+ "name": "table_name"
76
+ },
77
+ {
78
+ "annotation": "str",
79
+ "description": "",
80
+ "name": "smiles_col"
81
+ },
82
+ {
83
+ "annotation": "str",
84
+ "description": "",
85
+ "name": "target_col"
86
+ },
87
+ {
88
+ "annotation": "str",
89
+ "description": "",
90
+ "name": "fp_type"
91
+ },
92
+ {
93
+ "annotation": "int",
94
+ "description": "",
95
+ "name": "radius"
96
+ },
97
+ {
98
+ "annotation": "int",
99
+ "description": "",
100
+ "name": "n_bits"
101
+ },
102
+ {
103
+ "annotation": "float",
104
+ "description": "",
105
+ "name": "test_size"
106
+ },
107
+ {
108
+ "annotation": "int",
109
+ "description": "",
110
+ "name": "random_state"
111
+ },
112
+ {
113
+ "annotation": "str",
114
+ "description": "",
115
+ "name": "out_dir"
116
+ },
117
+ {
118
+ "annotation": "float",
119
+ "description": "",
120
+ "name": "confidence"
121
+ }
122
+ ]
123
  },
124
  {
125
+ "kind": "returns",
126
+ "value": [
127
+ {
128
+ "annotation": "RandomForestRegressor",
129
+ "description": "The trained QSAR model.",
130
+ "name": "model"
131
+ },
132
+ {
133
+ "annotation": "pandas.DataFrame",
134
+ "description": "DataFrame containing columns: 'actual', 'predicted', 'lower_ci',\n'upper_ci', 'split', 'split_R2', 'split_MAE', 'split_RMSE'.\nThe metric columns repeat the overall metric for the corresponding split.",
135
+ "name": "results_df"
136
+ }
137
+ ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
  ],
140
  "inputs": [
 
228
  "fp_type": "maccs",
229
  "n_bits": 2048.0,
230
  "out_dir": "Models",
231
+ "radius": "2",
232
  "random_state": 42.0,
233
  "smiles_col": "SMILES",
234
  "target_col": "pIC50",
235
  "test_size": 0.2
236
  },
237
+ "status": "planned",
238
  "title": "Train QSAR2"
239
  },
240
  "dragHandle": ".bg-primary",
 
259
  "doc": [
260
  {
261
  "kind": "text",
262
+ "value": "Plots actual vs. predicted values resembling the example image.\n\nIncludes separate markers for train/test, y=x line, and parallel dashed\nerror bands based on test set RMSE (optional). Does NOT use per-point CIs.\n\nHandles displaying the plot via plt.show() or saving it to a file\nbased on the `save_path` parameter. THIS FUNCTION DOES NOT RETURN ANY VALUE."
263
+ },
264
+ {
265
+ "kind": "parameters",
266
+ "value": [
267
+ {
268
+ "annotation": "pd.DataFrame",
269
+ "description": "Mandatory input DataFrame. Must contain: 'actual', 'predicted', 'split'.\nShould also contain 'split_RMSE' column for error bands and metrics display.",
270
+ "name": "results_df"
271
+ },
272
+ {
273
+ "annotation": "str",
274
+ "description": "",
275
+ "name": "title"
276
+ },
277
+ {
278
+ "annotation": "str",
279
+ "description": "",
280
+ "name": "xlabel"
281
+ },
282
+ {
283
+ "annotation": "str",
284
+ "description": "",
285
+ "name": "ylabel"
286
+ },
287
+ {
288
+ "annotation": "float or None",
289
+ "description": "Determines the width of the dashed error bands (multiplier * test_RMSE).\nSet to None to disable bands. Default is 1.0.",
290
+ "name": "rmse_multiplier_for_bands"
291
+ },
292
+ {
293
+ "annotation": "bool",
294
+ "description": "Whether to display R2/MAE/RMSE text (requires metric columns). Default is True.",
295
+ "name": "show_metrics"
296
+ },
297
+ {
298
+ "annotation": "str",
299
+ "description": "If provided, saves plot to this path. If None (default), displays plot.",
300
+ "name": "save_path"
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "kind": "raises",
306
+ "value": [
307
+ {
308
+ "annotation": "ValueError / TypeError : For invalid inputs.",
309
+ "description": ""
310
+ }
311
+ ]
312
  }
313
  ],
314
  "inputs": [
 
326
  "type": "image"
327
  },
328
  "params": {},
329
+ "status": "planned",
330
  "title": "plot qsar2"
331
  },
332
  "dragHandle": ".bg-primary",
333
+ "height": 283.0,
334
  "id": "plot qsar2 1",
335
  "position": {
336
+ "x": 1225.5,
337
+ "y": -35.5
338
  },
339
  "type": "image",
340
+ "width": 216.0
341
  },
342
  {
343
  "data": {
 
369
  "type": "image"
370
  },
371
  "params": {},
372
+ "status": "planned",
373
  "title": "plot qsar"
374
  },
375
  "dragHandle": ".bg-primary",
376
+ "height": 228.0,
377
  "id": "plot qsar 1",
378
  "position": {
379
+ "x": 1295.3704288854306,
380
+ "y": 280.3626299614863
381
  },
382
  "type": "image",
383
+ "width": 255.0
384
+ },
385
+ {
386
+ "data": {
387
+ "__execution_delay": 0.0,
388
+ "collapsed": false,
389
+ "display": null,
390
+ "error": "Missing input: bundle",
391
+ "input_metadata": null,
392
+ "meta": {
393
+ "color": "orange",
394
+ "doc": [
395
+ {
396
+ "kind": "text",
397
+ "value": "Apply the lipinski rule (MW <= 500,HBA <= 10 , HBD <=5,logP <= 5 )."
398
+ }
399
+ ],
400
+ "inputs": [
401
+ {
402
+ "name": "bundle",
403
+ "position": "left",
404
+ "type": {
405
+ "type": "<class 'inspect._empty'>"
406
+ }
407
+ }
408
+ ],
409
+ "name": "Lipinski filter",
410
+ "outputs": [
411
+ {
412
+ "name": "pass",
413
+ "position": "right",
414
+ "type": {
415
+ "type": "None"
416
+ }
417
+ },
418
+ {
419
+ "name": "fail",
420
+ "position": "right",
421
+ "type": {
422
+ "type": "None"
423
+ }
424
+ }
425
+ ],
426
+ "params": [
427
+ {
428
+ "default": null,
429
+ "name": "table_name",
430
+ "type": {
431
+ "type": "<class 'str'>"
432
+ }
433
+ },
434
+ {
435
+ "default": null,
436
+ "name": "column_name",
437
+ "type": {
438
+ "type": "<class 'str'>"
439
+ }
440
+ },
441
+ {
442
+ "default": true,
443
+ "name": "strict_lipinski",
444
+ "type": {
445
+ "type": "<class 'bool'>"
446
+ }
447
+ }
448
+ ],
449
+ "type": "basic"
450
+ },
451
+ "params": {
452
+ "column_name": "SMILES",
453
+ "strict_lipinski": true,
454
+ "table_name": "data"
455
+ },
456
+ "status": "planned",
457
+ "title": "Lipinski filter"
458
+ },
459
+ "dragHandle": ".bg-primary",
460
+ "height": 200.0,
461
+ "id": "Lipinski filter 1",
462
+ "position": {
463
+ "x": 611.2069031997684,
464
+ "y": 538.1140683411996
465
+ },
466
+ "type": "basic",
467
+ "width": 200.0
468
+ },
469
+ {
470
+ "data": {
471
+ "__execution_delay": null,
472
+ "collapsed": false,
473
+ "display": {
474
+ "dataframes": {
475
+ "df": {
476
+ "columns": [
477
+ "SMILES",
478
+ "Name",
479
+ "pIC50",
480
+ "MW",
481
+ "logP",
482
+ "HBD",
483
+ "HBA",
484
+ "pass_lipinski"
485
+ ],
486
+ "data": [
487
+ [
488
+ "Cc1ccc(C2CC3CCC(C2C(=O)OC(C)C)N3C)cc1",
489
+ "CHEMBL321806",
490
+ 5.99,
491
+ 301.43,
492
+ 3.512920000000002,
493
+ 0.0,
494
+ 3.0,
495
+ true
496
+ ],
497
+ [
498
+ "Cc1ccc(C2CC3CCC(C2C(=O)Oc2ccccc2)N3C)cc1",
499
+ "CHEMBL340912",
500
+ 5.81,
501
+ 335.44700000000006,
502
+ 4.166920000000004,
503
+ 0.0,
504
+ 3.0,
505
+ true
506
+ ],
507
+ [
508
+ "CN1C2CCC1C(C(=O)Oc1ccccc1)C(c1ccc(I)cc1)C2",
509
+ "CHEMBL340761",
510
+ 7.29,
511
+ 447.3160000000001,
512
+ 4.463100000000004,
513
+ 0.0,
514
+ 3.0,
515
+ true
516
+ ],
517
+ [
518
+ "CC(C)OC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2C",
519
+ "CHEMBL127546",
520
+ 7.9,
521
+ 413.2990000000002,
522
+ 3.8091000000000026,
523
+ 0.0,
524
+ 3.0,
525
+ true
526
+ ],
527
+ [
528
+ "COC(=O)C1C(c2ccc(Br)cc2)CC2CCC1N2C",
529
+ "CHEMBL97887",
530
+ 8.31,
531
+ 338.24500000000006,
532
+ 3.1884000000000015,
533
+ 0.0,
534
+ 3.0,
535
+ true
536
+ ],
537
+ [
538
+ "CC(C)OC(=O)C1C(c2ccc(Cl)cc2)CC2CCC1N2C",
539
+ "CHEMBL127040",
540
+ 6.89,
541
+ 321.8480000000001,
542
+ 3.8579000000000025,
543
+ 0.0,
544
+ 3.0,
545
+ true
546
+ ],
547
+ [
548
+ "COC(=O)C1C2CCC(CC1c1ccc(F)cc1)N2",
549
+ "CHEMBL80515",
550
+ 8.14,
551
+ 263.31199999999995,
552
+ 2.2228,
553
+ 1.0,
554
+ 3.0,
555
+ true
556
+ ],
557
+ [
558
+ "COC(=O)C1C(c2cccc(I)c2)CC2CCC1N2C",
559
+ "CHEMBL67387",
560
+ 8.01,
561
+ 385.2450000000001,
562
+ 3.030500000000001,
563
+ 0.0,
564
+ 3.0,
565
+ true
566
+ ],
567
+ [
568
+ "CCc1cc(C2C(c3ccc(C)cc3)CC3CCC2N3C)on1",
569
+ "CHEMBL317904",
570
+ 6.24,
571
+ 310.441,
572
+ 4.279320000000003,
573
+ 0.0,
574
+ 3.0,
575
+ true
576
+ ],
577
+ [
578
+ "Cc1ccc(C2CC3CCC(C2c2cc(C(C)C)no2)N3C)cc1",
579
+ "CHEMBL322400",
580
+ 5.41,
581
+ 324.4680000000001,
582
+ 4.840320000000005,
583
+ 0.0,
584
+ 3.0,
585
+ true
586
+ ],
587
+ [
588
+ "Cc1ccc(C2CC3CCC(C2c2cc(C)no2)N3C)cc1",
589
+ "CHEMBL103228",
590
+ 6.46,
591
+ 296.41400000000004,
592
+ 4.0253400000000035,
593
+ 0.0,
594
+ 3.0,
595
+ true
596
+ ],
597
+ [
598
+ "Cc1ccc(C2CC3CCC(C2c2ccno2)N3C)cc1",
599
+ "CHEMBL317905",
600
+ 7.42,
601
+ 282.387,
602
+ 3.7169200000000027,
603
+ 0.0,
604
+ 3.0,
605
+ true
606
+ ],
607
+ [
608
+ "CN1C2CCC1C(c1ccno1)C(c1ccc(Cl)cc1)C2",
609
+ "CHEMBL103523",
610
+ 8.09,
611
+ 302.80500000000006,
612
+ 4.061900000000003,
613
+ 0.0,
614
+ 3.0,
615
+ true
616
+ ],
617
+ [
618
+ "Cc1cc(C2C(c3ccc(Cl)cc3)CC3CCC2N3C)on1",
619
+ "CHEMBL316528",
620
+ 7.28,
621
+ 316.832,
622
+ 4.370320000000004,
623
+ 0.0,
624
+ 3.0,
625
+ true
626
+ ],
627
+ [
628
+ "CCc1cc(C2C(c3ccc(Cl)cc3)CC3CCC2N3C)on1",
629
+ "CHEMBL103227",
630
+ 6.55,
631
+ 330.85900000000004,
632
+ 4.624300000000004,
633
+ 0.0,
634
+ 3.0,
635
+ true
636
+ ],
637
+ [
638
+ "COC(=O)C1C(c2ccc(C)cc2)CC2CCC1N2CCF",
639
+ "CHEMBL105089",
640
+ 6.43,
641
+ 305.39300000000003,
642
+ 3.0740200000000018,
643
+ 0.0,
644
+ 3.0,
645
+ true
646
+ ],
647
+ [
648
+ "CN1C2CCC1C(C(=O)OCCF)C(c1ccc(I)cc1)C2",
649
+ "CHEMBL318961",
650
+ 8.59,
651
+ 417.262,
652
+ 3.3702000000000023,
653
+ 0.0,
654
+ 3.0,
655
+ true
656
+ ],
657
+ [
658
+ "O=C(OCCF)C1C(c2ccc(I)cc2)CC2CCC1N2CCCF",
659
+ "CHEMBL317444",
660
+ 7.88,
661
+ 463.30600000000027,
662
+ 4.100000000000003,
663
+ 0.0,
664
+ 3.0,
665
+ true
666
+ ],
667
+ [
668
+ "Cc1ccc(C2CC3CCC(C2C(=O)OCCCF)N3C)cc1",
669
+ "CHEMBL430504",
670
+ 6.49,
671
+ 319.42,
672
+ 3.464120000000002,
673
+ 0.0,
674
+ 3.0,
675
+ true
676
+ ],
677
+ [
678
+ "CN1C2CCC1C(C(=O)OCCCF)C(c1ccc(I)cc1)C2",
679
+ "CHEMBL105693",
680
+ 8.78,
681
+ 431.289,
682
+ 3.7603000000000026,
683
+ 0.0,
684
+ 3.0,
685
+ true
686
+ ],
687
+ [
688
+ "COC(=O)C1C(c2ccc(Br)cc2)CC2CCC1N2CCCF",
689
+ "CHEMBL433159",
690
+ 7.44,
691
+ 384.28900000000016,
692
+ 3.9182000000000032,
693
+ 0.0,
694
+ 3.0,
695
+ true
696
+ ],
697
+ [
698
+ "COC(=O)C1C2CCC(CC1c1ccc(I)cc1)N2",
699
+ "CHEMBL14613",
700
+ 10.215,
701
+ 371.21799999999996,
702
+ 2.6883,
703
+ 1.0,
704
+ 3.0,
705
+ true
706
+ ],
707
+ [
708
+ "COC(=O)C1C(c2ccc(C)cc2)CC2CCC1N2CCCF",
709
+ "CHEMBL319052",
710
+ 5.88,
711
+ 319.4200000000001,
712
+ 3.464120000000002,
713
+ 0.0,
714
+ 3.0,
715
+ true
716
+ ],
717
+ [
718
+ "COC(=O)[C@@H]1C2CCC(C[C@@H]1c1ccc(C)cc1)N2C/C=C/I",
719
+ "CHEMBL2113648",
720
+ 6.3,
721
+ 425.31000000000006,
722
+ 4.053220000000003,
723
+ 0.0,
724
+ 3.0,
725
+ true
726
+ ],
727
+ [
728
+ "C=Cc1ccc(C2CC3CCC(N3)C2C(=O)CC)cc1",
729
+ "CHEMBL85492",
730
+ 9.49,
731
+ 269.388,
732
+ 3.5328000000000017,
733
+ 1.0,
734
+ 2.0,
735
+ true
736
+ ],
737
+ [
738
+ "CCC(=O)C1C(c2ccc(C(C)C)cc2)CC2CCC1N2C",
739
+ "CHEMBL278122",
740
+ 7.443,
741
+ 299.45799999999997,
742
+ 4.355400000000004,
743
+ 0.0,
744
+ 2.0,
745
+ true
746
+ ],
747
+ [
748
+ "C=C(C)c1ccc(C2CC3CCC(N3)C2C(=O)CC)cc1",
749
+ "CHEMBL85877",
750
+ 9.96,
751
+ 283.41499999999996,
752
+ 3.922900000000003,
753
+ 1.0,
754
+ 2.0,
755
+ true
756
+ ],
757
+ [
758
+ "CCC(=O)C1C2CCC(CC1c1ccc(C)cc1)N2",
759
+ "CHEMBL87983",
760
+ 7.72,
761
+ 257.37699999999995,
762
+ 3.198220000000002,
763
+ 1.0,
764
+ 2.0,
765
+ true
766
+ ],
767
+ [
768
+ "C=C(C)c1ccc(C2CC3CCC(C2C(=O)CC)N3C)cc1",
769
+ "CHEMBL82807",
770
+ 9.09,
771
+ 297.44199999999995,
772
+ 4.265100000000004,
773
+ 0.0,
774
+ 2.0,
775
+ true
776
+ ],
777
+ [
778
+ "C=Cc1ccc(C2CC3CCC(C2C(=O)CC)N3C)cc1",
779
+ "CHEMBL314361",
780
+ 8.49,
781
+ 283.41499999999996,
782
+ 3.8750000000000036,
783
+ 0.0,
784
+ 2.0,
785
+ true
786
+ ],
787
+ [
788
+ "CCC(=O)C1C2CCC(CC1c1ccc(C(CC)CC)cc1)N2",
789
+ "CHEMBL87678",
790
+ 6.82,
791
+ 313.485,
792
+ 4.793400000000004,
793
+ 1.0,
794
+ 2.0,
795
+ true
796
+ ],
797
+ [
798
+ "CCC(=O)C1C2CCC(CC1c1ccc(C(C)C)cc1)N2",
799
+ "CHEMBL85256",
800
+ 8.28,
801
+ 285.431,
802
+ 4.013200000000003,
803
+ 1.0,
804
+ 2.0,
805
+ true
806
+ ],
807
+ [
808
+ "O[C@H]1CCCC[C@@H]1N1C2CCC1CC(c1ccccc1)C2",
809
+ "CHEMBL338411",
810
+ 5.47,
811
+ 285.43100000000004,
812
+ 3.7005000000000026,
813
+ 1.0,
814
+ 2.0,
815
+ true
816
+ ],
817
+ [
818
+ "COC(=O)C1C(c2cccc(-c3ccco3)c2)CC2CCC1N2C",
819
+ "CHEMBL303494",
820
+ 7.38,
821
+ 325.4080000000001,
822
+ 3.685900000000002,
823
+ 0.0,
824
+ 4.0,
825
+ true
826
+ ],
827
+ [
828
+ "COC(=O)C1C2CCC(CC1c1cccc(I)c1)N2",
829
+ "CHEMBL66068",
830
+ 8.87,
831
+ 371.21799999999996,
832
+ 2.6883,
833
+ 1.0,
834
+ 3.0,
835
+ true
836
+ ],
837
+ [
838
+ "COC(=O)C1C(c2cccc(-c3ccccc3)c2)CC2CCC1N2C",
839
+ "CHEMBL294733",
840
+ 7.45,
841
+ 335.4470000000001,
842
+ 4.092900000000003,
843
+ 0.0,
844
+ 3.0,
845
+ true
846
+ ],
847
+ [
848
+ "COC(=O)C1C(c2cccc(-c3ccsc3)c2)CC2CCC1N2C",
849
+ "CHEMBL303232",
850
+ 7.08,
851
+ 341.47600000000017,
852
+ 4.154400000000003,
853
+ 0.0,
854
+ 4.0,
855
+ true
856
+ ],
857
+ [
858
+ "CC(=O)C1C(c2ccc(C)cc2)CC2CCC1N2C",
859
+ "CHEMBL23141",
860
+ 6.91,
861
+ 257.37699999999995,
862
+ 3.1503200000000016,
863
+ 0.0,
864
+ 2.0,
865
+ true
866
+ ],
867
+ [
868
+ "CC(=O)C1C(c2ccc(F)cc2)CC2CCC1N2C",
869
+ "CHEMBL22665",
870
+ 6.07,
871
+ 261.34,
872
+ 2.9810000000000016,
873
+ 0.0,
874
+ 2.0,
875
+ true
876
+ ],
877
+ [
878
+ "CCC(=O)C1C(c2ccc(-c3ccccc3)cc2)CC2CCC1N2C",
879
+ "CHEMBL22518",
880
+ 8.37,
881
+ 333.4750000000001,
882
+ 4.8990000000000045,
883
+ 0.0,
884
+ 2.0,
885
+ true
886
+ ],
887
+ [
888
+ "CCC(=O)C1C(c2ccccc2)CC2CCC1N2C",
889
+ "CHEMBL23875",
890
+ 6.0,
891
+ 257.37699999999995,
892
+ 3.232000000000002,
893
+ 0.0,
894
+ 2.0,
895
+ true
896
+ ],
897
+ [
898
+ "CCC(=O)C1C(c2ccc(C(C)(C)C)cc2)CC2CCC1N2C",
899
+ "CHEMBL22377",
900
+ 5.75,
901
+ 313.485,
902
+ 4.529500000000004,
903
+ 0.0,
904
+ 2.0,
905
+ true
906
+ ],
907
+ [
908
+ "CC(=O)C1C(c2ccccc2)CC2CCC1N2C",
909
+ "CHEMBL416007",
910
+ 5.87,
911
+ 243.34999999999997,
912
+ 2.8419000000000008,
913
+ 0.0,
914
+ 2.0,
915
+ true
916
+ ],
917
+ [
918
+ "CCc1ccc(C2CC3CCC(C2C(C)=O)N3C)cc1",
919
+ "CHEMBL23974",
920
+ 7.11,
921
+ 271.40399999999994,
922
+ 3.404300000000002,
923
+ 0.0,
924
+ 2.0,
925
+ true
926
+ ],
927
+ [
928
+ "CCC(=O)C1C(c2ccc(F)cc2)CC2CCC1N2C",
929
+ "CHEMBL23655",
930
+ 6.2,
931
+ 275.36699999999996,
932
+ 3.371100000000002,
933
+ 0.0,
934
+ 2.0,
935
+ true
936
+ ],
937
+ [
938
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CCF",
939
+ "CHEMBL358006",
940
+ 9.85,
941
+ 417.26200000000017,
942
+ 3.3702000000000023,
943
+ 0.0,
944
+ 3.0,
945
+ true
946
+ ],
947
+ [
948
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CC1CC1",
949
+ "CHEMBL150084",
950
+ 8.89,
951
+ 425.31000000000023,
952
+ 3.8107000000000033,
953
+ 0.0,
954
+ 3.0,
955
+ true
956
+ ],
957
+ [
958
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CC(F)F",
959
+ "CHEMBL356166",
960
+ 8.02,
961
+ 435.2520000000001,
962
+ 3.6658000000000026,
963
+ 0.0,
964
+ 3.0,
965
+ true
966
+ ],
967
+ [
968
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CCCO",
969
+ "CHEMBL357300",
970
+ 8.6,
971
+ 429.29800000000023,
972
+ 2.7831000000000015,
973
+ 1.0,
974
+ 4.0,
975
+ true
976
+ ],
977
+ [
978
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CCCCl",
979
+ "CHEMBL345553",
980
+ 9.49,
981
+ 447.74400000000026,
982
+ 4.029600000000004,
983
+ 0.0,
984
+ 3.0,
985
+ true
986
+ ],
987
+ [
988
+ "CC(C)OC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CCF",
989
+ "CHEMBL346872",
990
+ 7.66,
991
+ 445.31600000000026,
992
+ 4.148800000000003,
993
+ 0.0,
994
+ 3.0,
995
+ true
996
+ ],
997
+ [
998
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CC(OC)OC",
999
+ "CHEMBL153361",
1000
+ 8.77,
1001
+ 459.32400000000024,
1002
+ 3.0196000000000014,
1003
+ 0.0,
1004
+ 5.0,
1005
+ true
1006
+ ],
1007
+ [
1008
+ "COC(=O)CN1C2CCC1C(C(=O)OC)C(c1ccc(I)cc1)C2",
1009
+ "CHEMBL149801",
1010
+ 9.09,
1011
+ 443.28100000000006,
1012
+ 2.5737000000000005,
1013
+ 0.0,
1014
+ 5.0,
1015
+ true
1016
+ ],
1017
+ [
1018
+ "CC(C)OC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CCCF",
1019
+ "CHEMBL345760",
1020
+ 7.31,
1021
+ 459.3430000000003,
1022
+ 4.5389000000000035,
1023
+ 0.0,
1024
+ 3.0,
1025
+ true
1026
+ ],
1027
+ [
1028
+ "COC(=O)[C@@H]1C2CCC(C[C@@H]1c1ccc(I)cc1)N2CC(=O)N(C)C",
1029
+ "CHEMBL2112890",
1030
+ 8.19,
1031
+ 456.3240000000001,
1032
+ 2.4889,
1033
+ 0.0,
1034
+ 4.0,
1035
+ true
1036
+ ],
1037
+ [
1038
+ "COC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2CCCBr",
1039
+ "CHEMBL356652",
1040
+ 9.46,
1041
+ 492.1950000000002,
1042
+ 4.185700000000003,
1043
+ 0.0,
1044
+ 3.0,
1045
+ true
1046
+ ],
1047
+ [
1048
+ "C[C@H](CF)OC(=O)C1C(c2ccc(Cl)cc2)CC2CCC1N2C",
1049
+ "CHEMBL2112915",
1050
+ 6.88,
1051
+ 339.83800000000014,
1052
+ 3.8075000000000028,
1053
+ 0.0,
1054
+ 3.0,
1055
+ true
1056
+ ],
1057
+ [
1058
+ "C[C@@H](CF)OC(=O)C1C(c2ccc(Cl)cc2)CC2CCC1N2C",
1059
+ "CHEMBL2112916",
1060
+ 6.86,
1061
+ 339.83800000000014,
1062
+ 3.8075000000000028,
1063
+ 0.0,
1064
+ 3.0,
1065
+ true
1066
+ ],
1067
+ [
1068
+ "Fc1ccc(C2C3CCC(C[C@H]2c2ccc(F)cc2)N3)cc1",
1069
+ "CHEMBL325330",
1070
+ 7.39,
1071
+ 299.364,
1072
+ 4.356500000000003,
1073
+ 1.0,
1074
+ 1.0,
1075
+ true
1076
+ ],
1077
+ [
1078
+ "CCC(=O)C1C2CCC(CC1c1cccc(I)c1)N2",
1079
+ "CHEMBL171565",
1080
+ 7.8,
1081
+ 369.246,
1082
+ 3.4944000000000024,
1083
+ 1.0,
1084
+ 2.0,
1085
+ true
1086
+ ],
1087
+ [
1088
+ "CCC(=O)C1C2CCC(CC1c1ccc(/C=C/I)cc1)N2",
1089
+ "CHEMBL352913",
1090
+ 9.21,
1091
+ 395.284,
1092
+ 4.295500000000004,
1093
+ 1.0,
1094
+ 2.0,
1095
+ true
1096
+ ],
1097
+ [
1098
+ "Cc1ccc(C2CC3CCC(C2C(=O)CC/C=C/I)N3C)cc1",
1099
+ "CHEMBL169320",
1100
+ 7.29,
1101
+ 423.338,
1102
+ 4.859320000000005,
1103
+ 0.0,
1104
+ 2.0,
1105
+ true
1106
+ ],
1107
+ [
1108
+ "CCC(=O)C1C(c2cccc(I)c2)CC2CCC1N2C",
1109
+ "CHEMBL168305",
1110
+ 7.71,
1111
+ 383.27300000000014,
1112
+ 3.8366000000000025,
1113
+ 0.0,
1114
+ 2.0,
1115
+ true
1116
+ ],
1117
+ [
1118
+ "CCC(=O)C1C2CCC(CC1c1ccc(I)c(Cl)c1)N2",
1119
+ "CHEMBL169117",
1120
+ 8.97,
1121
+ 403.69100000000003,
1122
+ 4.147800000000004,
1123
+ 1.0,
1124
+ 2.0,
1125
+ true
1126
+ ],
1127
+ [
1128
+ "CCC(=O)C1C2CCC(CC1c1ccc(/C=C(\\C)I)cc1)N2",
1129
+ "CHEMBL423275",
1130
+ 9.24,
1131
+ 409.311,
1132
+ 4.685600000000004,
1133
+ 1.0,
1134
+ 2.0,
1135
+ true
1136
+ ],
1137
+ [
1138
+ "CCC(=O)C1C(c2ccc(I)cc2)CC2CCC1N2C",
1139
+ "CHEMBL352698",
1140
+ 8.73,
1141
+ 383.27300000000014,
1142
+ 3.8366000000000025,
1143
+ 0.0,
1144
+ 2.0,
1145
+ true
1146
+ ],
1147
+ [
1148
+ "CCC(=O)C1C2CCC(CC1c1ccc(I)c(F)c1)N2",
1149
+ "CHEMBL355734",
1150
+ 8.14,
1151
+ 387.236,
1152
+ 3.6335000000000024,
1153
+ 1.0,
1154
+ 2.0,
1155
+ true
1156
+ ],
1157
+ [
1158
+ "CCC(=O)C1C2CCC(CC1c1ccc(/C=C(/C)I)cc1)N2",
1159
+ "CHEMBL355259",
1160
+ 9.89,
1161
+ 409.311,
1162
+ 4.685600000000004,
1163
+ 1.0,
1164
+ 2.0,
1165
+ true
1166
+ ],
1167
+ [
1168
+ "CCC(=O)C1C2CCC(CC1c1ccc(I)cc1)N2",
1169
+ "CHEMBL354725",
1170
+ 8.61,
1171
+ 369.246,
1172
+ 3.4944000000000024,
1173
+ 1.0,
1174
+ 2.0,
1175
+ true
1176
+ ],
1177
+ [
1178
+ "COC(=O)C1C(c2ccc(-c3cscc3Br)cc2)CC2CCC1N2C",
1179
+ "CHEMBL433560",
1180
+ 8.4,
1181
+ 420.3720000000002,
1182
+ 4.9169000000000045,
1183
+ 0.0,
1184
+ 4.0,
1185
+ true
1186
+ ],
1187
+ [
1188
+ "COC(=O)C1C(c2ccc(-c3ccc(I)s3)cc2)CC2CCC1N2C",
1189
+ "CHEMBL178773",
1190
+ 8.34,
1191
+ 467.3720000000002,
1192
+ 4.759000000000005,
1193
+ 0.0,
1194
+ 4.0,
1195
+ true
1196
+ ],
1197
+ [
1198
+ "COC(=O)C1C(c2ccc(-c3ccc(N)s3)cc2)CC2CCC1N2C",
1199
+ "CHEMBL181613",
1200
+ 7.19,
1201
+ 356.49100000000016,
1202
+ 3.736600000000003,
1203
+ 1.0,
1204
+ 5.0,
1205
+ true
1206
+ ],
1207
+ [
1208
+ "COC(=O)C1C(c2ccc(-c3ccsc3)cc2)CC2CCC1N2C",
1209
+ "CHEMBL435287",
1210
+ 10.77,
1211
+ 341.47600000000017,
1212
+ 4.154400000000003,
1213
+ 0.0,
1214
+ 4.0,
1215
+ true
1216
+ ],
1217
+ [
1218
+ "COC(=O)C1C2CCC(CC1c1ccc(-c3cccs3)cc1)N2",
1219
+ "CHEMBL181557",
1220
+ 9.96,
1221
+ 327.449,
1222
+ 3.8122000000000025,
1223
+ 1.0,
1224
+ 4.0,
1225
+ true
1226
+ ],
1227
+ [
1228
+ "COC(=O)C1C(c2ccc(-c3cccs3)cc2)CC2CCC1N2C",
1229
+ "CHEMBL181609",
1230
+ 9.82,
1231
+ 341.47600000000017,
1232
+ 4.154400000000003,
1233
+ 0.0,
1234
+ 4.0,
1235
+ true
1236
+ ],
1237
+ [
1238
+ "COC(=O)C1C2CCC(CC1c1ccc(-c3ccsc3)cc1)N2",
1239
+ "CHEMBL179498",
1240
+ 9.64,
1241
+ 327.449,
1242
+ 3.8122000000000025,
1243
+ 1.0,
1244
+ 4.0,
1245
+ true
1246
+ ],
1247
+ [
1248
+ "COC(=O)C1C(c2ccc(-c3ccc(Br)s3)cc2)CC2CCC1N2C",
1249
+ "CHEMBL180918",
1250
+ 9.42,
1251
+ 420.3720000000002,
1252
+ 4.916900000000005,
1253
+ 0.0,
1254
+ 4.0,
1255
+ true
1256
+ ],
1257
+ [
1258
+ "COC(=O)C1C(c2ccc(-c3ccc(Cl)s3)cc2)CC2CCC1N2C",
1259
+ "CHEMBL369098",
1260
+ 9.19,
1261
+ 375.92100000000016,
1262
+ 4.807800000000005,
1263
+ 0.0,
1264
+ 4.0,
1265
+ true
1266
+ ],
1267
+ [
1268
+ "COC(=O)C1C2CCC(CC1c1ccc(C)c(F)c1)N2",
1269
+ "CHEMBL365738",
1270
+ 7.62,
1271
+ 277.33899999999994,
1272
+ 2.5312200000000002,
1273
+ 1.0,
1274
+ 3.0,
1275
+ true
1276
+ ],
1277
+ [
1278
+ "COC(=O)C1C2CCC(CC1c1ccc(F)c(C)c1)N2",
1279
+ "CHEMBL195738",
1280
+ 7.77,
1281
+ 277.33899999999994,
1282
+ 2.5312200000000002,
1283
+ 1.0,
1284
+ 3.0,
1285
+ true
1286
+ ],
1287
+ [
1288
+ "COC(=O)C1C2CCC(CC1c1cccc(F)c1)N2",
1289
+ "CHEMBL192924",
1290
+ 7.57,
1291
+ 263.31199999999995,
1292
+ 2.2227999999999994,
1293
+ 1.0,
1294
+ 3.0,
1295
+ true
1296
+ ],
1297
+ [
1298
+ "COC(=O)C1C2CCC(CC1c1ccc(F)c(F)c1)N2",
1299
+ "CHEMBL366159",
1300
+ 7.26,
1301
+ 281.30199999999996,
1302
+ 2.3618999999999994,
1303
+ 1.0,
1304
+ 3.0,
1305
+ true
1306
+ ],
1307
+ [
1308
+ "COC(=O)C1C2CCC(CC1c1cc(F)cc(F)c1)N2",
1309
+ "CHEMBL371607",
1310
+ 7.86,
1311
+ 281.30199999999996,
1312
+ 2.3618999999999994,
1313
+ 1.0,
1314
+ 3.0,
1315
+ true
1316
+ ],
1317
+ [
1318
+ "CN1C2CCC1C(C(=O)OCCCF)C(c1ccc(Br)cc1)C2",
1319
+ "CHEMBL365649",
1320
+ 8.54,
1321
+ 384.289,
1322
+ 3.9182000000000032,
1323
+ 0.0,
1324
+ 3.0,
1325
+ true
1326
+ ],
1327
+ [
1328
+ "O=C(OCCCF)C1C2CCC(CC1c1ccc(Br)cc1)N2",
1329
+ "CHEMBL184807",
1330
+ 9.52,
1331
+ 370.26199999999994,
1332
+ 3.5760000000000023,
1333
+ 1.0,
1334
+ 3.0,
1335
+ true
1336
+ ],
1337
+ [
1338
+ "CN1C2CCC1C(C(=O)OCCF)C(c1ccc(Br)cc1)C2",
1339
+ "CHEMBL185608",
1340
+ 8.29,
1341
+ 370.262,
1342
+ 3.528100000000002,
1343
+ 0.0,
1344
+ 3.0,
1345
+ true
1346
+ ],
1347
+ [
1348
+ "O=C(OCCF)C1C2CCC(CC1c1ccc(Br)cc1)N2",
1349
+ "CHEMBL186119",
1350
+ 9.62,
1351
+ 356.23499999999996,
1352
+ 3.185900000000001,
1353
+ 1.0,
1354
+ 3.0,
1355
+ true
1356
+ ],
1357
+ [
1358
+ "O=C(OCCF)C1C2CCC(CC1c1ccc(I)cc1)N2",
1359
+ "CHEMBL186306",
1360
+ 9.74,
1361
+ 403.23499999999996,
1362
+ 3.0280000000000014,
1363
+ 1.0,
1364
+ 3.0,
1365
+ true
1366
+ ],
1367
+ [
1368
+ "O=C(OCCF)C1C(c2ccc(Br)cc2)CC2CCC1N2CCCF",
1369
+ "CHEMBL184123",
1370
+ 7.74,
1371
+ 416.30600000000027,
1372
+ 4.257900000000003,
1373
+ 0.0,
1374
+ 3.0,
1375
+ true
1376
+ ],
1377
+ [
1378
+ "CN1C2CCC1C(C(=O)NCCF)C(c1ccc(Br)cc1)C2",
1379
+ "CHEMBL365413",
1380
+ 7.41,
1381
+ 369.278,
1382
+ 3.1011000000000015,
1383
+ 1.0,
1384
+ 2.0,
1385
+ true
1386
+ ],
1387
+ [
1388
+ "CN1C2CCC1C(C(=O)NCCF)C(c1ccc(I)cc1)C2",
1389
+ "CHEMBL183259",
1390
+ 7.51,
1391
+ 416.278,
1392
+ 2.943200000000001,
1393
+ 1.0,
1394
+ 2.0,
1395
+ true
1396
+ ],
1397
+ [
1398
+ "COC(=O)C1C2CCC(CC1c1ccc(Br)cc1)N2",
1399
+ "CHEMBL365623",
1400
+ 9.02,
1401
+ 324.21799999999996,
1402
+ 2.8462000000000005,
1403
+ 1.0,
1404
+ 3.0,
1405
+ true
1406
+ ],
1407
+ [
1408
+ "COC(=O)C1C2CCC(CC1c1ccc(-c3ccco3)cc1)N2",
1409
+ "CHEMBL200044",
1410
+ 9.82,
1411
+ 311.38100000000003,
1412
+ 3.343700000000002,
1413
+ 1.0,
1414
+ 4.0,
1415
+ true
1416
+ ],
1417
+ [
1418
+ "COC(=O)C1C(c2ccc(-c3ccoc3)cc2)CC2CCC1N2C",
1419
+ "CHEMBL200698",
1420
+ 9.46,
1421
+ 325.4080000000001,
1422
+ 3.685900000000002,
1423
+ 0.0,
1424
+ 4.0,
1425
+ true
1426
+ ],
1427
+ [
1428
+ "COC(=O)C1C(c2ccc(-c3ccco3)cc2)CC2CCC1N2C",
1429
+ "CHEMBL199704",
1430
+ 8.95,
1431
+ 325.4080000000001,
1432
+ 3.685900000000002,
1433
+ 0.0,
1434
+ 4.0,
1435
+ true
1436
+ ],
1437
+ [
1438
+ "COC(=O)C1C(c2ccc(-c3nccs3)cc2)CC2CCC1N2C",
1439
+ "CHEMBL382943",
1440
+ 8.78,
1441
+ 342.46400000000017,
1442
+ 3.549400000000002,
1443
+ 0.0,
1444
+ 5.0,
1445
+ true
1446
+ ],
1447
+ [
1448
+ "COC(=O)C1C(c2ccc(-c3cccnc3)cc2)CC2CCC1N2C",
1449
+ "CHEMBL199634",
1450
+ 8.45,
1451
+ 336.4350000000001,
1452
+ 3.4879000000000024,
1453
+ 0.0,
1454
+ 4.0,
1455
+ true
1456
+ ],
1457
+ [
1458
+ "COC(=O)C1C2CCC(CC1c1ccc(-c3nccs3)cc1)N2",
1459
+ "CHEMBL381418",
1460
+ 8.29,
1461
+ 328.437,
1462
+ 3.207200000000001,
1463
+ 1.0,
1464
+ 5.0,
1465
+ true
1466
+ ],
1467
+ [
1468
+ "COC(=O)C1C(c2ccc(-c3cnccn3)cc2)CC2CCC1N2C",
1469
+ "CHEMBL383572",
1470
+ 7.95,
1471
+ 337.4230000000001,
1472
+ 2.882900000000001,
1473
+ 0.0,
1474
+ 5.0,
1475
+ true
1476
+ ],
1477
+ [
1478
+ "COC(=O)C1C(c2ccc(-c3cncnc3)cc2)CC2CCC1N2C",
1479
+ "CHEMBL372121",
1480
+ 7.48,
1481
+ 337.4230000000001,
1482
+ 2.882900000000001,
1483
+ 0.0,
1484
+ 5.0,
1485
+ true
1486
+ ]
1487
+ ]
1488
+ }
1489
+ },
1490
+ "other": {},
1491
+ "relations": []
1492
+ },
1493
+ "error": null,
1494
+ "input_metadata": [
1495
+ {
1496
+ "dataframes": {
1497
+ "df": {
1498
+ "columns": [
1499
+ "HBA",
1500
+ "HBD",
1501
+ "MW",
1502
+ "Name",
1503
+ "SMILES",
1504
+ "logP",
1505
+ "pIC50",
1506
+ "pass_lipinski"
1507
+ ]
1508
+ }
1509
+ },
1510
+ "other": {},
1511
+ "relations": []
1512
+ }
1513
+ ],
1514
+ "meta": {
1515
+ "color": "orange",
1516
+ "doc": null,
1517
+ "inputs": [
1518
+ {
1519
+ "name": "bundle",
1520
+ "position": "left",
1521
+ "type": {
1522
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1523
+ }
1524
+ }
1525
+ ],
1526
+ "name": "View tables",
1527
+ "outputs": [],
1528
+ "params": [
1529
+ {
1530
+ "default": 100,
1531
+ "name": "limit",
1532
+ "type": {
1533
+ "type": "<class 'int'>"
1534
+ }
1535
+ }
1536
+ ],
1537
+ "type": "table_view"
1538
+ },
1539
+ "params": {},
1540
+ "status": "planned",
1541
+ "title": "View tables"
1542
+ },
1543
+ "dragHandle": ".bg-primary",
1544
+ "height": 200.0,
1545
+ "id": "View tables 1",
1546
+ "position": {
1547
+ "x": 1297.9598410362735,
1548
+ "y": 540.3768457311057
1549
+ },
1550
+ "type": "table_view",
1551
  "width": 200.0
1552
+ },
1553
+ {
1554
+ "data": {
1555
+ "display": null,
1556
+ "error": "Missing input: bundle",
1557
+ "input_metadata": null,
1558
+ "meta": {
1559
+ "color": "orange",
1560
+ "doc": null,
1561
+ "inputs": [
1562
+ {
1563
+ "name": "bundle",
1564
+ "position": "left",
1565
+ "type": {
1566
+ "type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
1567
+ }
1568
+ }
1569
+ ],
1570
+ "name": "View tables",
1571
+ "outputs": [],
1572
+ "params": [
1573
+ {
1574
+ "default": 100,
1575
+ "name": "limit",
1576
+ "type": {
1577
+ "type": "<class 'int'>"
1578
+ }
1579
+ }
1580
+ ],
1581
+ "type": "table_view"
1582
+ },
1583
+ "params": {
1584
+ "limit": 100.0
1585
+ },
1586
+ "status": "planned",
1587
+ "title": "View tables"
1588
+ },
1589
+ "dragHandle": ".bg-primary",
1590
+ "height": 349.0,
1591
+ "id": "View tables 2",
1592
+ "position": {
1593
+ "x": 1259.1852144427153,
1594
+ "y": 807.9384228655529
1595
+ },
1596
+ "type": "table_view",
1597
+ "width": 523.0
1598
+ },
1599
+ {
1600
+ "data": {
1601
+ "__execution_delay": 0.0,
1602
+ "collapsed": null,
1603
+ "display": null,
1604
+ "error": " is not an option for file_format.",
1605
+ "input_metadata": [],
1606
+ "meta": {
1607
+ "color": "orange",
1608
+ "doc": [
1609
+ {
1610
+ "kind": "text",
1611
+ "value": "Read the contents of the a file into a `Bundle`."
1612
+ },
1613
+ {
1614
+ "kind": "parameters",
1615
+ "value": [
1616
+ {
1617
+ "annotation": null,
1618
+ "description": "Path to the file to import.",
1619
+ "name": "file_path"
1620
+ },
1621
+ {
1622
+ "annotation": null,
1623
+ "description": "Name to use for identifying the table in the bundle.",
1624
+ "name": "table_name"
1625
+ },
1626
+ {
1627
+ "annotation": null,
1628
+ "description": "Format of the file. Has to be one of the values in the `FileFormat` enum.",
1629
+ "name": "file_format"
1630
+ }
1631
+ ]
1632
+ },
1633
+ {
1634
+ "kind": "returns",
1635
+ "value": [
1636
+ {
1637
+ "annotation": null,
1638
+ "description": "Bundle with a single table with the contents of the file.",
1639
+ "name": "Bundle"
1640
+ }
1641
+ ]
1642
+ }
1643
+ ],
1644
+ "inputs": [],
1645
+ "name": "Import file",
1646
+ "outputs": [
1647
+ {
1648
+ "name": "output",
1649
+ "position": "right",
1650
+ "type": {
1651
+ "type": "None"
1652
+ }
1653
+ }
1654
+ ],
1655
+ "params": [
1656
+ {
1657
+ "default": null,
1658
+ "name": "file_path",
1659
+ "type": {
1660
+ "type": "<class 'str'>"
1661
+ }
1662
+ },
1663
+ {
1664
+ "default": null,
1665
+ "name": "table_name",
1666
+ "type": {
1667
+ "type": "<class 'str'>"
1668
+ }
1669
+ },
1670
+ {
1671
+ "default": null,
1672
+ "name": "file_format",
1673
+ "type": {
1674
+ "enum": [
1675
+ "csv",
1676
+ "parquet",
1677
+ "json",
1678
+ "excel"
1679
+ ]
1680
+ }
1681
+ },
1682
+ {
1683
+ "default": "csv",
1684
+ "groups": {
1685
+ "csv": [
1686
+ {
1687
+ "default": "<from file>",
1688
+ "name": "columns",
1689
+ "type": {
1690
+ "type": "<class 'str'>"
1691
+ }
1692
+ },
1693
+ {
1694
+ "default": "<auto>",
1695
+ "name": "separator",
1696
+ "type": {
1697
+ "type": "<class 'str'>"
1698
+ }
1699
+ }
1700
+ ],
1701
+ "excel": [
1702
+ {
1703
+ "default": "Sheet1",
1704
+ "name": "sheet_name",
1705
+ "type": {
1706
+ "type": "<class 'str'>"
1707
+ }
1708
+ }
1709
+ ],
1710
+ "json": [],
1711
+ "parquet": []
1712
+ },
1713
+ "name": "file_format_group",
1714
+ "selector": {
1715
+ "default": "csv",
1716
+ "name": "file_format",
1717
+ "type": {
1718
+ "enum": [
1719
+ "csv",
1720
+ "parquet",
1721
+ "json",
1722
+ "excel"
1723
+ ]
1724
+ }
1725
+ },
1726
+ "type": "group"
1727
+ }
1728
+ ],
1729
+ "type": "basic"
1730
+ },
1731
+ "params": {
1732
+ "file_format": null,
1733
+ "file_format_group": "csv",
1734
+ "file_path": "~/Github/lynxkite-2024/examples/uploads/CHEMBL313_sel.csv",
1735
+ "table_name": "data"
1736
+ },
1737
+ "status": "done",
1738
+ "title": "Import file"
1739
+ },
1740
+ "dragHandle": ".bg-primary",
1741
+ "height": 496.0,
1742
+ "id": "Import file 1",
1743
+ "position": {
1744
+ "x": 21.185214442715278,
1745
+ "y": 163.93842286555287
1746
+ },
1747
+ "type": "basic",
1748
+ "width": 434.0
1749
  }
1750
  ]
1751
  }
examples/Cheminformatics/rcsb_api.py ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import matplotlib
2
+ import pandas as pd
3
+ import matplotlib.pyplot as plt
4
+ import pypdb
5
+ import biotite.database.rcsb as rcsb
6
+ from MDAnalysis.analysis import rms
7
+ from opencadd.structure.superposition.engines.mda import MDAnalysisAligner
8
+ from lynxkite.core.ops import op
9
+ import os
10
+ import numpy as np
11
+ from Bio.PDB import PDBList, PDBParser, Superimposer
12
+
13
+ matplotlib.use("agg")
14
+
15
+
16
+ def calc_rmsd(A, B):
17
+ """
18
+ Calculate RMSD between two structures.
19
+
20
+ Parameters
21
+ ----------
22
+ A : opencadd.structure.core.Structure
23
+ Structure A.
24
+ B : opencadd.structure.core.Structure
25
+ Structure B.
26
+
27
+ Returns
28
+ -------
29
+ float
30
+ RMSD value.
31
+ """
32
+ aligner = MDAnalysisAligner()
33
+ selection, _ = aligner.matching_selection(A, B)
34
+ A = A.select_atoms(selection["reference"])
35
+ B = B.select_atoms(selection["mobile"])
36
+ return rms.rmsd(A.positions, B.positions, superposition=False)
37
+
38
+
39
+ def calc_rmsd_matrix(structures, names):
40
+ """
41
+ Calculate RMSD matrix between a list of structures.
42
+
43
+ Parameters
44
+ ----------
45
+ structures : list of opencadd.structure.core.Structure
46
+ List of structures.
47
+ names : list of str
48
+ List of structure names.
49
+
50
+ Returns
51
+ -------
52
+ pandas.DataFrame
53
+ RMSD matrix.
54
+ """
55
+ values = {name: {} for name in names}
56
+ for i, (A, name_i) in enumerate(zip(structures, names)):
57
+ for j, (B, name_j) in enumerate(zip(structures, names)):
58
+ if i == j:
59
+ values[name_i][name_j] = 0.0
60
+ continue
61
+ if i < j:
62
+ rmsd = calc_rmsd(A, B)
63
+ values[name_i][name_j] = rmsd
64
+ values[name_j][name_i] = rmsd
65
+ continue
66
+ df = pd.DataFrame.from_dict(values)
67
+ return df
68
+
69
+
70
+ @op("LynxKite Graph Analytics", "pdb composite search")
71
+ def get_pdb_count(
72
+ *, ligand_id: str, experimental_method: str, max_resolution: float, polymer_count: int
73
+ ):
74
+ """
75
+ Query the RCSB PDB for structures matching specified criteria and
76
+ return the list of matching PDB IDs.
77
+
78
+ Parameters
79
+ ----------
80
+ bundle : LynxKiteBundle
81
+ The workflow bundle (unused here, included for op compatibility).
82
+ ligand_id : str
83
+ Non-polymer component ID to filter on (e.g., 'STI').
84
+ experimental_method : str
85
+ Experimental method to filter by (e.g., 'X-RAY DIFFRACTION').
86
+ max_resolution : float
87
+ Maximum resolution (Å) to include (<= this value).
88
+ polymer_count : int
89
+ Exact number of polymer chains in the structure.
90
+
91
+ Returns
92
+ -------
93
+ List[str]
94
+ A list of PDB IDs matching all criteria.
95
+ """
96
+
97
+ # 1) Query by ligand ID
98
+ q_ligand = rcsb.FieldQuery(
99
+ "rcsb_nonpolymer_entity_container_identifiers.nonpolymer_comp_id", exact_match=ligand_id
100
+ )
101
+ count_ligand = rcsb.count(q_ligand)
102
+ print(f"Number of matches for ligand '{ligand_id}': {count_ligand}")
103
+
104
+ # 2) Query by experimental method
105
+ q_method = rcsb.FieldQuery("exptl.method", exact_match=experimental_method)
106
+ count_method = rcsb.count(q_method)
107
+ print(f"Number of matches for experimental method '{experimental_method}': {count_method}")
108
+
109
+ # 3) Query by resolution
110
+ q_resolution = rcsb.FieldQuery(
111
+ "rcsb_entry_info.resolution_combined", less_or_equal=max_resolution
112
+ )
113
+ count_resolution = rcsb.count(q_resolution)
114
+ print(f"Number of matches with resolution ≤ {max_resolution}: {count_resolution}")
115
+
116
+ # 4) Query by polymer chain count
117
+ q_polymer = rcsb.FieldQuery(
118
+ "rcsb_entry_info.deposited_polymer_entity_instance_count", equals=polymer_count
119
+ )
120
+ count_polymer = rcsb.count(q_polymer)
121
+ print(f"Number of matches with polymer count == {polymer_count}: {count_polymer}")
122
+
123
+ # 5) Composite query (AND all criteria)
124
+ composite_q = rcsb.CompositeQuery([q_ligand, q_method, q_resolution, q_polymer], "and")
125
+ pdb_ids = rcsb.search(composite_q)
126
+
127
+ # print(f"Number of composite matches: {len(pdb_ids)}")
128
+ # print("Selected PDB IDs:")
129
+ # print(*pdb_ids)
130
+ pdb_ids = rcsb.search(composite_q)
131
+ # Fetch PDBx descriptors
132
+ pdbs_info = [pypdb.get_all_info(pid) for pid in pdb_ids]
133
+ print(pdbs_info)
134
+ title = [pdb_info["struct"]["title"] for pdb_info in pdbs_info]
135
+
136
+ # Build DataFrame
137
+ return pd.DataFrame({"pdb_id": pdb_ids, "description": title})
138
+
139
+
140
+ @op("LynxKite Graph Analytics", "PDB alignment rmsd")
141
+ def compute_pdb_rmsd(df: pd.DataFrame, *, pdb_id_col: str = "pdb_id") -> pd.DataFrame:
142
+ """
143
+ Accepts a DataFrame with a column of PDB IDs, downloads PDB files,
144
+ selects Cα atoms from chain A (or first chain), superimposes using BioPython's
145
+ Superimposer, computes the RMSD matrix (only on common residues),
146
+ and returns it as a DataFrame.
147
+
148
+ Parameters
149
+ ----------
150
+ df : pd.DataFrame
151
+ Input DataFrame containing PDB IDs.
152
+ pdb_id_col : str
153
+ Name of the column in `df` with PDB IDs (default 'pdb_id').
154
+
155
+ Returns
156
+ -------
157
+ pd.DataFrame
158
+ Square DataFrame of pairwise RMSD values (Å), indexed and columned by PDB IDs.
159
+ """
160
+
161
+ # Prepare PDB directory
162
+ pdb_dir = "pdb_files"
163
+ os.makedirs(pdb_dir, exist_ok=True)
164
+
165
+ out = df.copy()
166
+ ids = out[pdb_id_col].tolist()
167
+ n = len(ids)
168
+
169
+ pdbl = PDBList()
170
+ parser = PDBParser(QUIET=True)
171
+ atom_dicts = []
172
+ for pid in ids:
173
+ pdbl.retrieve_pdb_file(pid, pdir=pdb_dir, file_format="pdb")
174
+ path = os.path.join(pdb_dir, f"pdb{pid.lower()}.ent")
175
+ struct = parser.get_structure(pid, path)
176
+ model = struct[0]
177
+ try:
178
+ chain = model["A"]
179
+ except KeyError:
180
+ chain = next(model.get_chains())
181
+ ca_atoms = {residue.id: residue["CA"] for residue in chain if residue.has_id("CA")}
182
+ atom_dicts.append(ca_atoms)
183
+
184
+ rmsd_mat = np.zeros((n, n))
185
+ sup = Superimposer()
186
+ for i in range(n):
187
+ for j in range(i + 1, n):
188
+ common = sorted(set(atom_dicts[i].keys()) & set(atom_dicts[j].keys()))
189
+ if not common:
190
+ rmsd = np.nan
191
+ else:
192
+ fixed_atoms = [atom_dicts[i][k] for k in common]
193
+ moving_atoms = [atom_dicts[j][k] for k in common]
194
+ sup.set_atoms(fixed_atoms, moving_atoms)
195
+ rmsd = sup.rms
196
+ rmsd_mat[i, j] = rmsd_mat[j, i] = round(rmsd, 1) if not np.isnan(rmsd) else np.nan
197
+
198
+ return pd.DataFrame(rmsd_mat, index=ids, columns=ids)
199
+
200
+
201
+ @op("LynxKite Graph Analytics", "plot matrix", view="matplotlib")
202
+ def plot_heatmap_from_df(
203
+ df: pd.DataFrame, *, value_label: str = "Value", title: str = None
204
+ ) -> plt.Figure:
205
+ """
206
+ Plot a heatmap of a square DataFrame using matplotlib.
207
+
208
+ Parameters
209
+ ----------
210
+ df : pd.DataFrame
211
+ Square DataFrame of values to plot.
212
+ value_label : str
213
+ Label for the color bar.
214
+ title : str, optional
215
+ Title for the plot.
216
+
217
+ Returns
218
+ -------
219
+ plt.Figure
220
+ The matplotlib Figure object containing the heatmap.
221
+ """
222
+ fig, ax = plt.subplots()
223
+ im = ax.imshow(df.values)
224
+ # create and label the colorbar
225
+ cbar = fig.colorbar(im, ax=ax)
226
+ cbar.set_label(value_label)
227
+
228
+ if title:
229
+ ax.set_title(title)
230
+ labels = df.index.tolist()
231
+ ax.set_xticks(range(len(labels)))
232
+ ax.set_xticklabels(labels, rotation=90)
233
+ ax.set_yticks(range(len(labels)))
234
+ ax.set_yticklabels(labels)
235
+ # Annotate each cell
236
+ for i in range(df.shape[0]):
237
+ for j in range(df.shape[1]):
238
+ ax.text(j, i, f"{df.iat[i, j]:.1f}", ha="center", va="center")
239
+ plt.tight_layout()
240
+ return fig
examples/Cheminformatics/requirements.txt CHANGED
@@ -1,2 +1,10 @@
 
 
 
 
 
 
 
 
1
  chembl_webresource_client
2
  rcsb-api
 
1
+ biotite
2
+ pypdb
3
+ rdkit
4
+ MDAnalysis
5
+ redo
6
+ https://github.com/volkamerlab/opencadd/archive/master.tar.gz
7
+ seaborn
8
+ =======
9
  chembl_webresource_client
10
  rcsb-api
examples/uploads/CHEMBL313_descriptors.parquet ADDED
Binary file (8.09 kB). View file