-
Notifications
You must be signed in to change notification settings - Fork 1
/
opendataval.dataloader.html
1238 lines (1153 loc) · 142 KB
/
opendataval.dataloader.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html class="no-js" lang="en" data-content_root="./">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="opendataval.dataloader.datasets package" href="opendataval.dataloader.datasets.html" /><link rel="prev" title="opendataval package" href="opendataval.html" />
<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>opendataval.dataloader package - OpenDataVal documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=36a5483c" />
<style>
body {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
}
@media not print {
body[data-theme="dark"] {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
}
}
</style></head>
<body>
<script>
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
</script>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
<symbol id="svg-sun" viewBox="0 0 24 24">
<title>Light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</symbol>
<symbol id="svg-moon" viewBox="0 0 24 24">
<title>Dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg>
</symbol>
<symbol id="svg-sun-half" viewBox="0 0 24 24">
<title>Auto light/dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
<path d="M13 12h5" />
<path d="M13 15h4" />
<path d="M13 18h1" />
<path d="M13 9h4" />
<path d="M13 6h1" />
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation">
<div class="visually-hidden">Hide navigation sidebar</div>
</label>
<label class="overlay toc-overlay" for="__toc">
<div class="visually-hidden">Hide table of contents sidebar</div>
</label>
<div class="page">
<header class="mobile-header">
<div class="header-left">
<label class="nav-overlay-icon" for="__navigation">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">OpenDataVal documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-header-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
<div class="sidebar-logo-container">
<img class="sidebar-logo only-light" src="_static/logo-light-mode.png" alt="Light Logo"/>
<img class="sidebar-logo only-dark" src="_static/logo-dark-mode.png" alt="Dark Logo"/>
</div>
<span class="sidebar-brand-text">OpenDataVal documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul class="current">
<li class="toctree-l1 current has-children"><a class="reference internal" href="modules.html">modules</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of modules</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
<li class="toctree-l2 current has-children"><a class="reference internal" href="opendataval.html">opendataval package</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of opendataval package</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
<li class="toctree-l3 current has-children current-page"><a class="current reference internal" href="#">opendataval.dataloader package</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of opendataval.dataloader package</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4 has-children"><a class="reference internal" href="opendataval.dataloader.datasets.html">opendataval.dataloader.datasets package</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><div class="visually-hidden">Toggle navigation of opendataval.dataloader.datasets package</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l5"><a class="reference internal" href="generated/opendataval.dataloader.datasets.datasets.html">opendataval.dataloader.datasets.datasets</a></li>
<li class="toctree-l5"><a class="reference internal" href="generated/opendataval.dataloader.datasets.imagesets.html">opendataval.dataloader.datasets.imagesets</a></li>
<li class="toctree-l5"><a class="reference internal" href="generated/opendataval.dataloader.datasets.nlpsets.html">opendataval.dataloader.datasets.nlpsets</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataloader.Register.html">opendataval.dataloader.Register</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataloader.DataFetcher.html">opendataval.dataloader.DataFetcher</a></li>
<li class="toctree-l4 has-children"><a class="reference internal" href="generated/opendataval.dataloader.datasets.html">opendataval.dataloader.datasets</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of opendataval.dataloader.datasets</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l5"><a class="reference internal" href="generated/generated/opendataval.dataloader.datasets.datasets.html">opendataval.dataloader.datasets.datasets</a></li>
<li class="toctree-l5"><a class="reference internal" href="generated/generated/opendataval.dataloader.datasets.imagesets.html">opendataval.dataloader.datasets.imagesets</a></li>
<li class="toctree-l5"><a class="reference internal" href="generated/generated/opendataval.dataloader.datasets.nlpsets.html">opendataval.dataloader.datasets.nlpsets</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataloader.cache.html">opendataval.dataloader.cache</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataloader.mix_labels.html">opendataval.dataloader.mix_labels</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataloader.one_hot_encode.html">opendataval.dataloader.one_hot_encode</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataloader.CatDataset.html">opendataval.dataloader.CatDataset</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="opendataval.dataval.html">opendataval.dataval package</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><div class="visually-hidden">Toggle navigation of opendataval.dataval package</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.ame.html">opendataval.dataval.ame package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.csshap.html">opendataval.dataval.csshap package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.dvrl.html">opendataval.dataval.dvrl package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.influence.html">opendataval.dataval.influence package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.knnshap.html">opendataval.dataval.knnshap package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.lava.html">opendataval.dataval.lava package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.margcontrib.html">opendataval.dataval.margcontrib package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.oob.html">opendataval.dataval.oob package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.random.html">opendataval.dataval.random package</a></li>
<li class="toctree-l4"><a class="reference internal" href="opendataval.dataval.volume.html">opendataval.dataval.volume package</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.DataEvaluator.html">opendataval.dataval.DataEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.ModelMixin.html">opendataval.dataval.ModelMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.ModelLessMixin.html">opendataval.dataval.ModelLessMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.AME.html">opendataval.dataval.AME</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.DVRL.html">opendataval.dataval.DVRL</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.InfluenceFunction.html">opendataval.dataval.InfluenceFunction</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.InfluenceSubsample.html">opendataval.dataval.InfluenceSubsample</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.KNNShapley.html">opendataval.dataval.KNNShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.DataOob.html">opendataval.dataval.DataOob</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.DataBanzhaf.html">opendataval.dataval.DataBanzhaf</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.BetaShapley.html">opendataval.dataval.BetaShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.DataShapley.html">opendataval.dataval.DataShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.LavaEvaluator.html">opendataval.dataval.LavaEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.LeaveOneOut.html">opendataval.dataval.LeaveOneOut</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.ShapEvaluator.html">opendataval.dataval.ShapEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.RandomEvaluator.html">opendataval.dataval.RandomEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.RobustVolumeShapley.html">opendataval.dataval.RobustVolumeShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.Sampler.html">opendataval.dataval.Sampler</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.TMCSampler.html">opendataval.dataval.TMCSampler</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.dataval.GrTMCSampler.html">opendataval.dataval.GrTMCSampler</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="opendataval.experiment.html">opendataval.experiment package</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of opendataval.experiment package</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.experiment.ExperimentMediator.html">opendataval.experiment.ExperimentMediator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.experiment.exper_methods.html">opendataval.experiment.exper_methods</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="opendataval.model.html">opendataval.model package</a><input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><div class="visually-hidden">Toggle navigation of opendataval.model package</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.Model.html">opendataval.model.Model</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.GradientModel.html">opendataval.model.GradientModel</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.ModelFactory.html">opendataval.model.ModelFactory</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.TorchClassMixin.html">opendataval.model.TorchClassMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.TorchRegressMixin.html">opendataval.model.TorchRegressMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.TorchPredictMixin.html">opendataval.model.TorchPredictMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.TorchGradMixin.html">opendataval.model.TorchGradMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.ClassifierSkLearnWrapper.html">opendataval.model.ClassifierSkLearnWrapper</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.ClassifierUnweightedSkLearnWrapper.html">opendataval.model.ClassifierUnweightedSkLearnWrapper</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/opendataval.model.RegressionSkLearnWrapper.html">opendataval.model.RegressionSkLearnWrapper</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="generated/opendataval.dataloader.html">opendataval.dataloader</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><div class="visually-hidden">Toggle navigation of opendataval.dataloader</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataloader.Register.html">opendataval.dataloader.Register</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataloader.DataFetcher.html">opendataval.dataloader.DataFetcher</a></li>
<li class="toctree-l4 has-children"><a class="reference internal" href="generated/generated/opendataval.dataloader.datasets.html">opendataval.dataloader.datasets</a><input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><div class="visually-hidden">Toggle navigation of opendataval.dataloader.datasets</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l5"><a class="reference internal" href="generated/generated/generated/opendataval.dataloader.datasets.datasets.html">opendataval.dataloader.datasets.datasets</a></li>
<li class="toctree-l5"><a class="reference internal" href="generated/generated/generated/opendataval.dataloader.datasets.imagesets.html">opendataval.dataloader.datasets.imagesets</a></li>
<li class="toctree-l5"><a class="reference internal" href="generated/generated/generated/opendataval.dataloader.datasets.nlpsets.html">opendataval.dataloader.datasets.nlpsets</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataloader.cache.html">opendataval.dataloader.cache</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataloader.mix_labels.html">opendataval.dataloader.mix_labels</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataloader.one_hot_encode.html">opendataval.dataloader.one_hot_encode</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataloader.CatDataset.html">opendataval.dataloader.CatDataset</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="generated/opendataval.dataval.html">opendataval.dataval</a><input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><div class="visually-hidden">Toggle navigation of opendataval.dataval</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.DataEvaluator.html">opendataval.dataval.DataEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.ModelMixin.html">opendataval.dataval.ModelMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.ModelLessMixin.html">opendataval.dataval.ModelLessMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.AME.html">opendataval.dataval.AME</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.DVRL.html">opendataval.dataval.DVRL</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.InfluenceFunction.html">opendataval.dataval.InfluenceFunction</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.InfluenceSubsample.html">opendataval.dataval.InfluenceSubsample</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.KNNShapley.html">opendataval.dataval.KNNShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.DataOob.html">opendataval.dataval.DataOob</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.DataBanzhaf.html">opendataval.dataval.DataBanzhaf</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.BetaShapley.html">opendataval.dataval.BetaShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.DataShapley.html">opendataval.dataval.DataShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.LavaEvaluator.html">opendataval.dataval.LavaEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.LeaveOneOut.html">opendataval.dataval.LeaveOneOut</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.ShapEvaluator.html">opendataval.dataval.ShapEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.RandomEvaluator.html">opendataval.dataval.RandomEvaluator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.RobustVolumeShapley.html">opendataval.dataval.RobustVolumeShapley</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.Sampler.html">opendataval.dataval.Sampler</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.TMCSampler.html">opendataval.dataval.TMCSampler</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.dataval.GrTMCSampler.html">opendataval.dataval.GrTMCSampler</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="generated/opendataval.model.html">opendataval.model</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><div class="visually-hidden">Toggle navigation of opendataval.model</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.Model.html">opendataval.model.Model</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.GradientModel.html">opendataval.model.GradientModel</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.ModelFactory.html">opendataval.model.ModelFactory</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.TorchClassMixin.html">opendataval.model.TorchClassMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.TorchRegressMixin.html">opendataval.model.TorchRegressMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.TorchPredictMixin.html">opendataval.model.TorchPredictMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.TorchGradMixin.html">opendataval.model.TorchGradMixin</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.ClassifierSkLearnWrapper.html">opendataval.model.ClassifierSkLearnWrapper</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.ClassifierUnweightedSkLearnWrapper.html">opendataval.model.ClassifierUnweightedSkLearnWrapper</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.model.RegressionSkLearnWrapper.html">opendataval.model.RegressionSkLearnWrapper</a></li>
</ul>
</li>
<li class="toctree-l3 has-children"><a class="reference internal" href="generated/opendataval.experiment.html">opendataval.experiment</a><input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><div class="visually-hidden">Toggle navigation of opendataval.experiment</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.experiment.ExperimentMediator.html">opendataval.experiment.ExperimentMediator</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/generated/opendataval.experiment.exper_methods.html">opendataval.experiment.exper_methods</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="generated/opendataval.util.set_random_state.html">opendataval.util.set_random_state</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/opendataval.util.load_mediator_output.html">opendataval.util.load_mediator_output</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/opendataval.__version__.html">opendataval.__version__</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="leaderboards.html">leaderboards</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">license</a></li>
<li class="toctree-l1"><a class="reference internal" href="paper.html">paper</a></li>
</ul>
</div>
</div>
</div>
</div>
</aside>
<div class="main">
<div class="content">
<div class="article-container">
<a href="#" class="back-to-top muted-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
</svg>
<span>Back to top</span>
</a>
<div class="content-icon-container">
<div class="theme-toggle-container theme-toggle-content">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-content-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
<article role="main">
<section id="opendataval-dataloader-package">
<h1>opendataval.dataloader package<a class="headerlink" href="#opendataval-dataloader-package" title="Link to this heading">#</a></h1>
<section id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this heading">#</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="opendataval.dataloader.datasets.html">opendataval.dataloader.datasets package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="opendataval.dataloader.datasets.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="opendataval.dataloader.datasets.html#module-opendataval.dataloader.datasets.challenge">opendataval.dataloader.datasets.challenge module</a></li>
<li class="toctree-l2"><a class="reference internal" href="opendataval.dataloader.datasets.html#module-opendataval.dataloader.datasets.datasets">opendataval.dataloader.datasets.datasets module</a></li>
<li class="toctree-l2"><a class="reference internal" href="opendataval.dataloader.datasets.html#module-opendataval.dataloader.datasets.imagesets">opendataval.dataloader.datasets.imagesets module</a></li>
<li class="toctree-l2"><a class="reference internal" href="opendataval.dataloader.datasets.html#module-opendataval.dataloader.datasets.nlpsets">opendataval.dataloader.datasets.nlpsets module</a></li>
<li class="toctree-l2"><a class="reference internal" href="opendataval.dataloader.datasets.html#module-opendataval.dataloader.datasets">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading">#</a></h2>
</section>
<section id="module-opendataval.dataloader.fetcher">
<span id="opendataval-dataloader-fetcher-module"></span><h2>opendataval.dataloader.fetcher module<a class="headerlink" href="#module-opendataval.dataloader.fetcher" title="Link to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.fetcher.</span></span><span class="sig-name descname"><span class="pre">DataFetcher</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dataset_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cache_dir</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_download</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">random_state</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">RandomState</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher" title="Link to this definition">#</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Load data for an experiment from an input data set name.</p>
<p>Facade for <code class="xref py py-class docutils literal notranslate"><span class="pre">Register</span></code> object, prepares the data and provides an API for
subsequent splitting, adding noise, and transforming into a tensor.</p>
<section id="parameters">
<h3>Parameters<a class="headerlink" href="#parameters" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>dataset_name<span class="classifier">str</span></dt><dd><p>Name of the data set, must be registered with <code class="xref py py-class docutils literal notranslate"><span class="pre">Register</span></code></p>
</dd>
<dt>cache_dir<span class="classifier">str, optional</span></dt><dd><p>Directory of where to cache the loaded data, by default None which uses
<code class="xref py py-attr docutils literal notranslate"><span class="pre">Register.CACHE_DIR</span></code></p>
</dd>
<dt>force_download<span class="classifier">bool, optional</span></dt><dd><p>Forces download from source URL, by default False</p>
</dd>
<dt>random_state<span class="classifier">RandomState, optional</span></dt><dd><p>Random initial state, by default None</p>
</dd>
</dl>
</section>
<section id="attributes">
<h3>Attributes<a class="headerlink" href="#attributes" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>datapoints<span class="classifier">tuple[torch.Tensor, …]</span></dt><dd><p>Train+Valid+Test covariates and labels</p>
</dd>
<dt>covar_dim<span class="classifier">tuple[int, …]</span></dt><dd><p>Covariates dimension of the loaded data set.</p>
</dd>
<dt>label_dim<span class="classifier">tuple[int, …]</span></dt><dd><p>Label dimension of the loaded data set.</p>
</dd>
<dt>num_points<span class="classifier">int</span></dt><dd><p>Number of data points in the total data set</p>
</dd>
<dt>one_hot<span class="classifier">bool</span></dt><dd><p>If True, the data set has categorical labels as one hot encodings</p>
</dd>
<dt>[train/valid/test]_indices<span class="classifier">np.ndarray[int]</span></dt><dd><p>The indices of the original data set used to make the training data set.</p>
</dd>
<dt>noisy_train_indices<span class="classifier">np.ndarray[int]</span></dt><dd><p>The indices of training data points with noise added to them.</p>
</dd>
<dt>covar<span class="classifier">Dataset | np.ndarray</span></dt><dd><p>Covariate dataset a dataset function</p>
</dd>
<dt>lables<span class="classifier">np.ndarray</span></dt><dd><p>Corresponding labels for covariates from a dataset function</p>
</dd>
<dt>[x/y]_[train/valid/test]<span class="classifier">np.ndarray</span></dt><dd><p>Access to the raw split of the [covariate/label] [train/valid/test] data set
prior being transformed into a tensor. Useful for adding noise to functions.</p>
</dd>
</dl>
</section>
<section id="raises">
<h3>Raises<a class="headerlink" href="#raises" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>KeyError</dt><dd><p>In order to use a data set, you must register it by creating a
<code class="xref py py-class docutils literal notranslate"><span class="pre">Register</span></code></p>
</dd>
<dt>ValueError</dt><dd><p>Loaded Data set covariates and labels must be of same length.</p>
</dd>
<dt>ValueError</dt><dd><p>All covariates must be of same dimension. All labels must be of same dimension.</p>
</dd>
<dt>ValueError</dt><dd><p>Splits must not exceed the length of the data set. In other words, if
the splits are ints, the values must be less than the length. If they are
floats they must be less than 1.0. If they are anything else, raises error</p>
</dd>
<dt>ValueError</dt><dd><p>Specified indices must not repeat and must not be outside range of the data set</p>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.covar_dim">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">covar_dim</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.covar_dim" title="Link to this definition">#</a></dt>
<dd><p>Get covar dimensions.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.datapoints">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">datapoints</span></span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.datapoints" title="Link to this definition">#</a></dt>
<dd><p>Return split data points to be input into a DataEvaluator as tensors.</p>
<section id="returns">
<h4>Returns<a class="headerlink" href="#returns" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>(torch.Tensor | Dataset, torch.Tensor)</dt><dd><p>Training Covariates, Training Labels</p>
</dd>
<dt>(torch.Tensor | Dataset, torch.Tensor)</dt><dd><p>Validation Covariates, Valid Labels</p>
</dd>
<dt>(torch.Tensor | Dataset, torch.Tensor)</dt><dd><p>Test Covariates, Test Labels</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.datasets_available">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">datasets_available</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">set</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.datasets_available" title="Link to this definition">#</a></dt>
<dd><p>Get set of available data set names.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.export_dataset">
<span class="sig-name descname"><span class="pre">export_dataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">covariates_names</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">labels_names</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output_directory</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Path</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">PosixPath('/home/runner/work/opendataval/opendataval/docs')</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.export_dataset" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.from_data">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">covar</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">labels</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">one_hot</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">random_state</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">RandomState</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.from_data" title="Link to this definition">#</a></dt>
<dd><p>Return DataFetcher from input Covariates and Labels.</p>
<section id="id1">
<h4>Parameters<a class="headerlink" href="#id1" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>covar<span class="classifier">Union[Dataset, np.ndarray]</span></dt><dd><p>Input covariates</p>
</dd>
<dt>labels<span class="classifier">np.ndarray</span></dt><dd><p>Input labels, no transformation is applied, therefore if the input data
should be one hot encoded, the transform is not applied</p>
</dd>
<dt>one_hot<span class="classifier">bool</span></dt><dd><p>Whether the input data has already been one hot encoded. This is just a flag
and not transform will be applied</p>
</dd>
<dt>random_state<span class="classifier">RandomState, optional</span></dt><dd><p>Initial random state, by default None</p>
</dd>
</dl>
</section>
<section id="id2">
<h4>Raises<a class="headerlink" href="#id2" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>ValueError</dt><dd><p>Input covariates and labels are of different length, no 1-to-1 mapping.</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.from_data_splits">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_data_splits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x_train</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y_train</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x_valid</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y_valid</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x_test</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y_test</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">one_hot</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">random_state</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">RandomState</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.from_data_splits" title="Link to this definition">#</a></dt>
<dd><p>Return DataFetcher from already split data.</p>
<section id="id3">
<h4>Parameters<a class="headerlink" href="#id3" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>x_train<span class="classifier">Union[Dataset, np.ndarray]</span></dt><dd><p>Input training covariates</p>
</dd>
<dt>y_train<span class="classifier">np.ndarray</span></dt><dd><p>Input training labels</p>
</dd>
<dt>x_valid<span class="classifier">Union[Dataset, np.ndarray]</span></dt><dd><p>Input validation covariates</p>
</dd>
<dt>y_valid<span class="classifier">np.ndarray</span></dt><dd><p>Input validation labels</p>
</dd>
<dt>x_test<span class="classifier">Union[Dataset, np.ndarray]</span></dt><dd><p>Input testing covariates</p>
</dd>
<dt>y_test<span class="classifier">np.ndarray</span></dt><dd><p>Input testing labels</p>
</dd>
<dt>one_hot<span class="classifier">bool</span></dt><dd><p>Whether the label data has already been one hot encoded. This is just a flag
and not transform will be applied</p>
</dd>
<dt>random_state<span class="classifier">RandomState, optional</span></dt><dd><p>Initial random state, by default None</p>
</dd>
</dl>
</section>
<section id="id4">
<h4>Raises<a class="headerlink" href="#id4" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>ValueError</dt><dd><p>Loaded Data set covariates and labels must be of same length.</p>
</dd>
<dt>ValueError</dt><dd><p>All covariates must be of same dimension.
All labels must be of same dimension.</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.label_dim">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">label_dim</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.label_dim" title="Link to this definition">#</a></dt>
<dd><p>Get label dimensions.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.noisify">
<span class="sig-name descname"><span class="pre">noisify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">add_noise</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="pre">Self</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">noise_args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">noise_kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.noisify" title="Link to this definition">#</a></dt>
<dd><p>Add noise to the data points.</p>
<p>Adds noise to the data set and saves the indices of the noisy data.
Return object of <cite>add_noise</cite> is a dict with keys to signify how the
data are updated:
{‘x_train’,’y_train’,’x_valid’,’y_valid’,’x_test’,’y_test’,’noisy_train_indices’}</p>
<section id="id5">
<h4>Parameters<a class="headerlink" href="#id5" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>add_noise<span class="classifier">Callable</span></dt><dd><p>If None, no changes are made. Takes as argument required arguments
DataFetcher and adds noise to those the data points of DataFetcher as
needed. Returns dict[str, np.ndarray] that has the updated np.ndarray in a
dict to update the data loader with the following keys:</p>
<ul class="simple">
<li><p><strong>“x_train”</strong> – Updated training covariates with noise, optional</p></li>
<li><p><strong>“y_train”</strong> – Updated training labels with noise, optional</p></li>
<li><p><strong>“x_valid”</strong> – Updated validation covariates with noise, optional</p></li>
<li><p><strong>“y_valid”</strong> – Updated validation labels with noise, optional</p></li>
<li><p><strong>“x_test”</strong> – Updated testing covariates with noise, optional</p></li>
<li><p><strong>“y_test”</strong> – Updated testing labels with noise, optional</p></li>
<li><p><strong>“noisy_train_indices”</strong> – Indices of training data set with noise.</p></li>
</ul>
</dd>
<dt>args<span class="classifier">tuple[Any]</span></dt><dd><p>Additional positional arguments passed to <code class="docutils literal notranslate"><span class="pre">add_noise</span></code></p>
</dd>
<dt>kwargs: dict[str, Any]</dt><dd><p>Additional key word arguments passed to <code class="docutils literal notranslate"><span class="pre">add_noise</span></code></p>
</dd>
</dl>
</section>
<section id="id6">
<h4>Returns<a class="headerlink" href="#id6" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>self<span class="classifier">object</span></dt><dd><p>Returns a DataFetcher with noise added to the data set.</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.num_points">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">num_points</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">int</span></em><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.num_points" title="Link to this definition">#</a></dt>
<dd><p>Get total number of data points.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.setup">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">setup</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dataset_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cache_dir</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_download</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">random_state</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">RandomState</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">train_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valid_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">add_noise</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="pre">Self</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">noise_kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.setup" title="Link to this definition">#</a></dt>
<dd><p>Create, split, and add noise to DataFetcher from input arguments.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.split_dataset_by_count">
<span class="sig-name descname"><span class="pre">split_dataset_by_count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">train_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valid_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.split_dataset_by_count" title="Link to this definition">#</a></dt>
<dd><p>Split the covariates and labels to the specified counts.</p>
<section id="id7">
<h4>Parameters<a class="headerlink" href="#id7" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>train_count<span class="classifier">int</span></dt><dd><p>Number/proportion training points</p>
</dd>
<dt>valid_count<span class="classifier">int</span></dt><dd><p>Number/proportion validation points</p>
</dd>
<dt>test_count<span class="classifier">int</span></dt><dd><p>Number/proportion test points</p>
</dd>
</dl>
</section>
<section id="id8">
<h4>Returns<a class="headerlink" href="#id8" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>self<span class="classifier">object</span></dt><dd><p>Returns a DataFetcher with covariates, labels split into train/valid/test.</p>
</dd>
</dl>
</section>
<section id="id9">
<h4>Raises<a class="headerlink" href="#id9" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>ValueError</dt><dd><p>Invalid input for splitting the data set, either the proportion is more
than 1 or the total splits are greater than the len(dataset)</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.split_dataset_by_indices">
<span class="sig-name descname"><span class="pre">split_dataset_by_indices</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">train_indices</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valid_indices</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_indices</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.split_dataset_by_indices" title="Link to this definition">#</a></dt>
<dd><p>Split the covariates and labels to the specified indices.</p>
<section id="id10">
<h4>Parameters<a class="headerlink" href="#id10" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>train_indices<span class="classifier">Sequence[int]</span></dt><dd><p>Indices of training data set</p>
</dd>
<dt>valid_indices<span class="classifier">Sequence[int]</span></dt><dd><p>Indices of valid data set</p>
</dd>
<dt>test_indices<span class="classifier">Sequence[int]</span></dt><dd><p>Indices of test data set</p>
</dd>
</dl>
</section>
<section id="id11">
<h4>Returns<a class="headerlink" href="#id11" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>self<span class="classifier">object</span></dt><dd><p>Returns a DataFetcher with covariates, labels split into train/valid/test.</p>
</dd>
</dl>
</section>
<section id="id12">
<h4>Raises<a class="headerlink" href="#id12" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>ValueError</dt><dd><p>Invalid input for indices of the train, valid, or split data set, leak
of at least 1 data point in the indices.</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.fetcher.DataFetcher.split_dataset_by_prop">
<span class="sig-name descname"><span class="pre">split_dataset_by_prop</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">train_prop</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valid_prop</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_prop</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.fetcher.DataFetcher.split_dataset_by_prop" title="Link to this definition">#</a></dt>
<dd><p>Split the covariates and labels to the specified proportions.</p>
</dd></dl>
</section>
</dd></dl>
</section>
<section id="module-opendataval.dataloader.noisify">
<span id="opendataval-dataloader-noisify-module"></span><h2>opendataval.dataloader.noisify module<a class="headerlink" href="#module-opendataval.dataloader.noisify" title="Link to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="opendataval.dataloader.noisify.NoiseFunc">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.noisify.</span></span><span class="sig-name descname"><span class="pre">NoiseFunc</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.noisify.NoiseFunc" title="Link to this definition">#</a></dt>
<dd><p>Bases: <a class="reference internal" href="opendataval.html#opendataval.util.FuncEnum" title="opendataval.util.FuncEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">FuncEnum</span></code></a></p>
<dl class="py attribute">
<dt class="sig sig-object py" id="opendataval.dataloader.noisify.NoiseFunc.ADD_GAUSS_NOISE">
<span class="sig-name descname"><span class="pre">ADD_GAUSS_NOISE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">add_gauss_noise</span></em><a class="headerlink" href="#opendataval.dataloader.noisify.NoiseFunc.ADD_GAUSS_NOISE" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="opendataval.dataloader.noisify.NoiseFunc.MIX_LABELS">
<span class="sig-name descname"><span class="pre">MIX_LABELS</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">mix_labels</span></em><a class="headerlink" href="#opendataval.dataloader.noisify.NoiseFunc.MIX_LABELS" title="Link to this definition">#</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="opendataval.dataloader.noisify.add_gauss_noise">
<span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.noisify.</span></span><span class="sig-name descname"><span class="pre">add_gauss_noise</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fetcher</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#opendataval.dataloader.fetcher.DataFetcher" title="opendataval.dataloader.fetcher.DataFetcher"><span class="pre">DataFetcher</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">noise_rate</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mu</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sigma</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.noisify.add_gauss_noise" title="Link to this definition">#</a></dt>
<dd><p>Add gaussian noise to covariates.</p>
<section id="id13">
<h3>Parameters<a class="headerlink" href="#id13" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>fetcher<span class="classifier">DataFetcher</span></dt><dd><p>DataFetcher object housing the data to have noise added to</p>
</dd>
<dt>noise_rate<span class="classifier">float</span></dt><dd><p>Proportion of labels to add noise to</p>
</dd>
<dt>mu<span class="classifier">float, optional</span></dt><dd><p>Center of gaussian distribution which noise is generated from, by default 0</p>
</dd>
<dt>sigma<span class="classifier">float, optional</span></dt><dd><p>Standard deviation of gaussian distribution, by default 1</p>
</dd>
</dl>
</section>
<section id="id14">
<h3>Returns<a class="headerlink" href="#id14" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>dict[str, np.ndarray]</dt><dd><p>dictionary of updated data points</p>
<ul class="simple">
<li><p><strong>“x_train”</strong> – Updated training covariates with added gaussian noise</p></li>
<li><p><strong>“noisy_train_indices”</strong> – Indices of training data set with mixed labels</p></li>
</ul>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="opendataval.dataloader.noisify.mix_labels">
<span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.noisify.</span></span><span class="sig-name descname"><span class="pre">mix_labels</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fetcher</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#opendataval.dataloader.fetcher.DataFetcher" title="opendataval.dataloader.fetcher.DataFetcher"><span class="pre">DataFetcher</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">noise_rate</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.2</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.noisify.mix_labels" title="Link to this definition">#</a></dt>
<dd><p>Mixes y_train labels of a DataFetcher, adding noise to data.</p>
<p>For a given set of unique labels, we shift the label forward up to n-1 steps. This
prevents selecting the same label when noise is added.</p>
<section id="id15">
<h3>Parameters<a class="headerlink" href="#id15" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>fetcher<span class="classifier">DataFetcher</span></dt><dd><p>DataFetcher object housing the data to have noise added to</p>
</dd>
<dt>noise_rate<span class="classifier">float</span></dt><dd><p>Proportion of labels to add noise to</p>
</dd>
</dl>
</section>
<section id="id16">
<h3>Returns<a class="headerlink" href="#id16" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>dict[str, np.ndarray]</dt><dd><p>dictionary of updated data points</p>
<ul class="simple">
<li><p><strong>“y_train”</strong> – Updated training labels mixed</p></li>
<li><p><strong>“y_valid”</strong> – Updated validation labels mixed</p></li>
<li><p><strong>“noisy_train_indices”</strong> – Indices of training data set with mixed labels</p></li>
</ul>
</dd>
</dl>
</section>
</dd></dl>
</section>
<section id="module-opendataval.dataloader.register">
<span id="opendataval-dataloader-register-module"></span><h2>opendataval.dataloader.register module<a class="headerlink" href="#module-opendataval.dataloader.register" title="Link to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.register.</span></span><span class="sig-name descname"><span class="pre">Register</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dataset_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">one_hot</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cacheable</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">presplit</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register" title="Link to this definition">#</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Register a data set by defining its name and adding functions to retrieve data.</p>
<p>Registers data sets to be fetched by the DataFetcher. Also allows specific
transformations to be applied on a data set. This gives the benefit of creating
<a class="reference internal" href="#opendataval.dataloader.register.Register" title="opendataval.dataloader.register.Register"><code class="xref py py-class docutils literal notranslate"><span class="pre">Register</span></code></a> objects to distinguish separate data sets</p>
<section id="id17">
<h3>Parameters<a class="headerlink" href="#id17" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>dataset_name<span class="classifier">str</span></dt><dd><p>Data set name</p>
</dd>
<dt>one_hot<span class="classifier">bool, optional</span></dt><dd><p>Whether the data set is one hot encoded labeled, by default False</p>
</dd>
<dt>cacheable<span class="classifier">bool, optional</span></dt><dd><p>Whether data set can be downloaded and cached, by default False</p>
</dd>
<dt>presplit<span class="classifier">bool, optional</span></dt><dd><p>Whether the data set was presplit, by default False</p>
</dd>
</dl>
</section>
<section id="warns">
<h3>Warns<a class="headerlink" href="#warns" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>Warning</dt><dd><p><a class="reference internal" href="#opendataval.dataloader.register.Register" title="opendataval.dataloader.register.Register"><code class="xref py py-class docutils literal notranslate"><span class="pre">Register</span></code></a> keeps track of all data set names registered and all must
be unique. If there are any duplicates, warns user.</p>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.CACHE_DIR">
<span class="sig-name descname"><span class="pre">CACHE_DIR</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'data_files'</span></em><a class="headerlink" href="#opendataval.dataloader.register.Register.CACHE_DIR" title="Link to this definition">#</a></dt>
<dd><p>Default directory to cache downloads to.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.Datasets">
<span class="sig-name descname"><span class="pre">Datasets</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">ClassVar</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Self</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'2dplanes':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'MiniBooNE':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'adult':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'bbc':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'bbc-embeddings':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'breast_cancer':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'challenge-iris':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'cifar10':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'cifar10-embeddings':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'cifar100':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'creditcard':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'diabetes':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'digits':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'echoMonths':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'election':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'electricity':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'fashion':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'fried':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'gaussian_classifier':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'gaussian_classifier_high_dim':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'imdb':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'imdb-embeddings':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'iris':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'linnerud':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'lowbwt':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'mnist':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'mv':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'nomao':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'pol':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'stl10-embeddings':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'stock':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'svhn-embeddings':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>,</span> <span class="pre">'wave_energy':</span> <span class="pre"><opendataval.dataloader.register.Register</span> <span class="pre">object>}</span></em><a class="headerlink" href="#opendataval.dataloader.register.Register.Datasets" title="Link to this definition">#</a></dt>
<dd><p>Creates a directory for all registered/downloadable data set functions.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.add_covar_transform">
<span class="sig-name descname"><span class="pre">add_covar_transform</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transform</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register.add_covar_transform" title="Link to this definition">#</a></dt>
<dd><p>Add covariate transform after data is fetched.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.add_label_transform">
<span class="sig-name descname"><span class="pre">add_label_transform</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transform</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register.add_label_transform" title="Link to this definition">#</a></dt>
<dd><p>Add label transform after data is fetched.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_covar_func">
<span class="sig-name descname"><span class="pre">from_covar_func</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_covar_func" title="Link to this definition">#</a></dt>
<dd><p>Register data set from 2 Callables, registers covariates Callable.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_covar_label_func">
<span class="sig-name descname"><span class="pre">from_covar_label_func</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_covar_label_func" title="Link to this definition">#</a></dt>
<dd><p>Register data set from Callable -> (covariates, labels).</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_csv">
<span class="sig-name descname"><span class="pre">from_csv</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filepath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label_columns</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_csv" title="Link to this definition">#</a></dt>
<dd><p>Register data set from csv file.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_data">
<span class="sig-name descname"><span class="pre">from_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">covar</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">one_hot</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_data" title="Link to this definition">#</a></dt>
<dd><p>Register data set from covariate and label numpy array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_label_func">
<span class="sig-name descname"><span class="pre">from_label_func</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dataset</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">ndarray</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_label_func" title="Link to this definition">#</a></dt>
<dd><p>Register data set from 2 Callables, registers labels Callable.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_numpy">
<span class="sig-name descname"><span class="pre">from_numpy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">array</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label_columns</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_numpy" title="Link to this definition">#</a></dt>
<dd><p>Register data set from covariate and label numpy array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.from_pandas">
<span class="sig-name descname"><span class="pre">from_pandas</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">df</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">DataFrame</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label_columns</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.register.Register.from_pandas" title="Link to this definition">#</a></dt>
<dd><p>Register data set from pandas data frame.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.register.Register.load_data">
<span class="sig-name descname"><span class="pre">load_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cache_dir</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_download</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dataset</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#opendataval.dataloader.register.Register.load_data" title="Link to this definition">#</a></dt>
<dd><p>Retrieve data from specified data input functions.</p>
<p>Loads the covariates and labels from the registered callables, applies
transformations, and returns the covariates and labels.</p>
<section id="id18">
<h4>Parameters<a class="headerlink" href="#id18" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>cache_dir<span class="classifier">str, optional</span></dt><dd><p>Directory of where to cache the loaded data, by default None which uses
<a class="reference internal" href="#opendataval.dataloader.register.Register.CACHE_DIR" title="opendataval.dataloader.register.Register.CACHE_DIR"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Register.CACHE_DIR</span></code></a></p>
</dd>
<dt>force_download<span class="classifier">bool, optional</span></dt><dd><p>Forces download from source URL, by default False</p>
</dd>
</dl>
</section>
<section id="id19">
<h4>Returns<a class="headerlink" href="#id19" title="Link to this heading">#</a></h4>
<dl class="simple">
<dt>(np.ndarray | Dataset, np.ndarray)</dt><dd><p>Transformed covariates and labels of the data set</p>
</dd>
</dl>
</section>
</dd></dl>
</section>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="opendataval.dataloader.register.cache">
<span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.register.</span></span><span class="sig-name descname"><span class="pre">cache</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cache_dir</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_download</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Path</span></span></span><a class="headerlink" href="#opendataval.dataloader.register.cache" title="Link to this definition">#</a></dt>
<dd><p>Download a file if it it is not present and returns the filepath.</p>
<section id="id20">
<h3>Parameters<a class="headerlink" href="#id20" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>url<span class="classifier">str</span></dt><dd><p>URL of the file to be downloaded</p>
</dd>
<dt>cache_dir<span class="classifier">str</span></dt><dd><p>Directory to cache downloaded files</p>
</dd>
<dt>file_name<span class="classifier">str, optional</span></dt><dd><p>File name within the cache directory of the downloaded file, by default None</p>
</dd>
<dt>force_download<span class="classifier">bool, optional</span></dt><dd><p>Forces a download regardless if file is present, by default False</p>
</dd>
</dl>
</section>
<section id="id21">
<h3>Returns<a class="headerlink" href="#id21" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>str</dt><dd><p>File path to the downloaded file</p>
</dd>
</dl>
</section>
<section id="id22">
<h3>Raises<a class="headerlink" href="#id22" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>HTTPError</dt><dd><p>HTTP error occurred during downloading the dataset.</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="opendataval.dataloader.register.one_hot_encode">
<span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.register.</span></span><span class="sig-name descname"><span class="pre">one_hot_encode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">ndarray</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">ndarray</span></span></span><a class="headerlink" href="#opendataval.dataloader.register.one_hot_encode" title="Link to this definition">#</a></dt>
<dd><p>One hot encodes a numpy array.</p>
<section id="id23">
<h3>Raises<a class="headerlink" href="#id23" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>ValueError</dt><dd><p>When the input array is not of shape (N,), (N,1), (N,1,1)…</p>
</dd>
</dl>
</section>
</dd></dl>
</section>
<section id="module-opendataval.dataloader.util">
<span id="opendataval-dataloader-util-module"></span><h2>opendataval.dataloader.util module<a class="headerlink" href="#module-opendataval.dataloader.util" title="Link to this heading">#</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="opendataval.dataloader.util.CatDataset">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.util.</span></span><span class="sig-name descname"><span class="pre">CatDataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">datasets</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">Dataset</span><span class="p"><span class="pre">[</span></span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.CatDataset" title="Link to this definition">#</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Dataset</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">Dataset</span></code>, …]]</p>
<p>Data set wrapping indexable Datasets.</p>
<section id="id24">
<h3>Parameters<a class="headerlink" href="#id24" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>datasets<span class="classifier">tuple[Dataset]</span></dt><dd><p>Tuple of data sets we would like to concat together, must be same length</p>
</dd>
</dl>
</section>
<section id="id25">
<h3>Raises<a class="headerlink" href="#id25" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>ValueError</dt><dd><p>If all input data sets are not the same length</p>
</dd>
</dl>
</section>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.util.</span></span><span class="sig-name descname"><span class="pre">FolderDataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">folder_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sizes</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset" title="Link to this definition">#</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Dataset</span></code></p>
<p>Dataset for tensors within a folder.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.BATCH_CACHE">
<span class="sig-name descname"><span class="pre">BATCH_CACHE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">5</span></em><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.BATCH_CACHE" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.exists">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">exists</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.exists" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.format_batch_path">
<span class="sig-name descname"><span class="pre">format_batch_path</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">batch_index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.format_batch_path" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.get_batch">
<span class="sig-name descname"><span class="pre">get_batch</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">batch_index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tensor</span></span></span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.get_batch" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.load">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.load" title="Link to this definition">#</a></dt>
<dd><p>Loads existing gradient dataset metadata from path/.metadata.pkl</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.metadata">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">metadata</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.metadata" title="Link to this definition">#</a></dt>
<dd><p>Important metadata defining a GradientDataset, used for loading.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.save">
<span class="sig-name descname"><span class="pre">save</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.save" title="Link to this definition">#</a></dt>
<dd><p>Saves metadata to disk, allows us to load GradientDataset as needed.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.shape">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">shape</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.shape" title="Link to this definition">#</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="opendataval.dataloader.util.FolderDataset.write">
<span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">batch_number</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Tensor</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.FolderDataset.write" title="Link to this definition">#</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="opendataval.dataloader.util.IndexTransformDataset">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">opendataval.dataloader.util.</span></span><span class="sig-name descname"><span class="pre">IndexTransformDataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dataset</span><span class="p"><span class="pre">[</span></span><span class="pre">T_co</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">index_transformation</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="pre">T_co</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">T_co</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#opendataval.dataloader.util.IndexTransformDataset" title="Link to this definition">#</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Dataset</span></code>[<code class="xref py py-obj docutils literal notranslate"><span class="pre">T_co</span></code>]</p>
<p>Data set wrapper that allows a per-index transform to be applied.</p>
<p>Primarily useful when adding noise to specific subset of indices. If a transform
is defined, it will apply the transformation but also pass in the indices
(what is passed into __getitem__) as well.</p>
<section id="id26">
<h3>Parameters<a class="headerlink" href="#id26" title="Link to this heading">#</a></h3>
<dl class="simple">
<dt>dataset<span class="classifier">Dataset[T_co]</span></dt><dd><p>Data set with transform to be applied</p>
</dd>
<dt>index_transformation<span class="classifier">Callable[[T_co, Sequence[int]], T_co], optional</span></dt><dd><p>Function that takes input sequence of ints and data and applies
the specific transform per index, by default None which is no transform.</p>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="opendataval.dataloader.util.IndexTransformDataset.transform">