Skip to content

Commit 2da772e

Browse files
perevergesperevergesgithub-actions[bot]mikeheddes
authored
Dataset documentation improvements (#116)
* datasets description and tables * [github-action] formatting fixes * Center statistics table * Update Benchmark documentation * [github-action] formatting fixes * Add UCI link --------- Co-authored-by: pereverges <pere.verges@estudiantat.upc.edu> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: mikeheddes <mikeheddes@gmail.com>
1 parent 0969cbd commit 2da772e

File tree

132 files changed

+1921
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1921
-163
lines changed

docs/_static/css/custom.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ a:hover {
4848

4949
html.writer-html4 .rst-content dl:not(.docutils)>dt,
5050
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt {
51-
background: #f3f4f7;
52-
color: #6c6c6d;
53-
border-top: none;
54-
border-left: 3px solid #ee4c2c;
51+
background: #f3f4f7 !important;
52+
color: #6c6c6d !important;
53+
border-top: none !important;
54+
border-left: 3px solid #ee4c2c !important;
5555
padding: 0.5rem;
5656
padding-right: 100px;
5757
word-wrap: break-word;

docs/datasets.rst

Lines changed: 4 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -7,139 +7,10 @@ The Torchhd library provides many popular built-in datasets to work with.
77

88
.. currentmodule:: torchhd.datasets
99

10-
.. autosummary::
11-
:toctree: generated/
12-
:template: class_dataset.rst
10+
.. automodule:: torchhd.datasets
11+
:members:
12+
:exclude-members: download, process, processed_file_names, raw_file_names, num_classes, DatasetFourFold, DatasetTrainTest, CollectionDataset
1313

14-
BeijingAirQuality
15-
ISOLET
16-
EuropeanLanguages
17-
UCIHAR
18-
AirfoilSelfNoise
19-
EMGHandGestures
20-
PAMAP
21-
CyclePowerPlant
22-
Abalone
23-
Adult
24-
AcuteInflammation
25-
AcuteNephritis
26-
Annealing
27-
Arrhythmia
28-
AudiologyStd
29-
BalanceScale
30-
Balloons
31-
Bank
32-
Blood
33-
BreastCancer
34-
BreastCancerWisc
35-
BreastCancerWiscDiag
36-
BreastCancerWiscProg
37-
BreastTissue
38-
Car
39-
Cardiotocography3Clases
40-
Cardiotocography10Clases
41-
ChessKrvk
42-
ChessKrvkp
43-
CongressionalVoting
44-
ConnBenchSonarMinesRocks
45-
ConnBenchVowelDeterding
46-
Connect4
47-
Contrac
48-
CreditApproval
49-
CylinderBands
50-
Dermatology
51-
Echocardiogram
52-
Ecoli
53-
EnergyY1
54-
EnergyY2
55-
Fertility
56-
Flags
57-
Glass
58-
HabermanSurvival
59-
HayesRoth
60-
HeartCleveland
61-
HeartHungarian
62-
HeartSwitzerland
63-
HeartVa
64-
Hepatitis
65-
HillValley
66-
HorseColic
67-
IlpdIndianLiver
68-
ImageSegmentation
69-
Ionosphere
70-
Iris
71-
LedDisplay
72-
Lenses
73-
Letter
74-
Libras
75-
LowResSpect
76-
LungCancer
77-
Lymphography
78-
Magic
79-
Mammographic
80-
Miniboone
81-
MolecBiolPromoter
82-
MolecBiolSplice
83-
Monks1
84-
Monks2
85-
Monks3
86-
Mushroom
87-
Musk1
88-
Musk2
89-
Nursery
90-
OocytesMerlucciusNucleus4d
91-
OocytesMerlucciusStates2f
92-
OocytesTrisopterusNucleus2f
93-
OocytesTrisopterusStates5b
94-
Optical
95-
Ozone
96-
PageBlocks
97-
Parkinsons
98-
Pendigits
99-
Pima
100-
PittsburgBridgesMaterial
101-
PittsburgBridgesRelL
102-
PittsburgBridgesSpan
103-
PittsburgBridgesTOrD
104-
PittsburgBridgesType
105-
Planning
106-
PlantMargin
107-
PlantShape
108-
PlantTexture
109-
PostOperative
110-
PrimaryTumor
111-
Ringnorm
112-
Seeds
113-
Semeion
114-
Soybean
115-
Spambase
116-
Spect
117-
Spectf
118-
StatlogAustralianCredit
119-
StatlogGermanCredit
120-
StatlogHeart
121-
StatlogImage
122-
StatlogLandsat
123-
StatlogShuttle
124-
StatlogVehicle
125-
SteelPlates
126-
SyntheticControl
127-
Teaching
128-
Thyroid
129-
TicTacToe
130-
Titanic
131-
Trains
132-
Twonorm
133-
VertebralColumn2Clases
134-
VertebralColumn3Clases
135-
WallFollowing
136-
Waveform
137-
WaveformNoise
138-
Wine
139-
WineQualityRed
140-
WineQualityWhite
141-
Yeast
142-
Zoo
14314

14415
Base classes
14516
------------------------
@@ -148,7 +19,6 @@ Base classes
14819
:toctree: generated/
14920
:template: class_dataset.rst
15021

151-
UCIClassificationBenchmark
15222
CollectionDataset
15323
DatasetFourFold
154-
DatasetTrainTest
24+
DatasetTrainTest

examples/UCI_benchmark_intRVFL.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def classifier_ridge_regression(
2828
data_type: torch.dtype,
2929
device: torch.device,
3030
):
31-
3231
# Get number of training samples
3332
num_train = len(train_ld.dataset)
3433
# Collects high-dimensional represetations of data in the train data
@@ -49,7 +48,6 @@ def classifier_ridge_regression(
4948
with torch.no_grad():
5049
count = 0
5150
for samples, labels in tqdm(train_ld, desc="Training"):
52-
5351
samples = samples.to(device)
5452
labels = labels.to(device)
5553
# Make one-hot encoding

examples/reghd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def target_transform(x):
5050
train_dl = data.DataLoader(train_ds, batch_size=1, shuffle=True)
5151
test_dl = data.DataLoader(test_ds, batch_size=1)
5252

53+
5354
# Model based on RegHD application for Single model regression
5455
class SingleModel(nn.Module):
5556
def __init__(self, num_classes, size):

torchhd/datasets/abalone.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
class Abalone(DatasetFourFold):
66
"""`Abalone <https://archive.ics.uci.edu/ml/datasets/abalone>`_ dataset.
77
8+
.. list-table::
9+
:widths: 10 10 10 10
10+
:align: center
11+
:header-rows: 1
12+
13+
* - Instances
14+
- Attributes
15+
- Task
16+
- Area
17+
* - 4177
18+
- 8
19+
- Classification
20+
- Life
21+
822
Args:
923
root (string): Root directory containing the files of the dataset.
1024
train (bool, optional): If True, returns training (sub)set from the file storing training data as further determined by fold and hyper_search variables.
@@ -22,6 +36,7 @@ class Abalone(DatasetFourFold):
2236
download (bool, optional): If True, downloads the dataset from the internet and
2337
puts it in root directory. If dataset is already downloaded, it is not
2438
downloaded again.
39+
2540
"""
2641

2742
name = "abalone"

torchhd/datasets/acute_inflammation.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
class AcuteInflammation(DatasetFourFold):
66
"""`Acute Inflammation of urinary bladder <https://archive.ics.uci.edu/ml/datasets/Acute+Inflammations>`_ dataset.
77
8+
.. list-table::
9+
:widths: 10 10 10 10
10+
:align: center
11+
:header-rows: 1
12+
13+
* - Instances
14+
- Attributes
15+
- Task
16+
- Area
17+
* - 120
18+
- 6
19+
- Classification
20+
- Life
21+
822
Args:
923
root (string): Root directory containing the files of the dataset.
1024
train (bool, optional): If True, returns training (sub)set from the file storing training data as further determined by fold and hyper_search variables.
@@ -22,6 +36,7 @@ class AcuteInflammation(DatasetFourFold):
2236
download (bool, optional): If True, downloads the dataset from the internet and
2337
puts it in root directory. If dataset is already downloaded, it is not
2438
downloaded again.
39+
2540
"""
2641

2742
name = "acute-inflammation"

torchhd/datasets/acute_nephritis.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
class AcuteNephritis(DatasetFourFold):
66
"""`Acute Nephritis of renal pelvis origin <https://archive.ics.uci.edu/ml/datasets/Acute+Inflammations>`_ dataset.
77
8+
.. list-table::
9+
:widths: 10 10 10 10
10+
:align: center
11+
:header-rows: 1
12+
13+
* - Instances
14+
- Attributes
15+
- Task
16+
- Area
17+
* - 120
18+
- 6
19+
- Classification
20+
- Social
21+
822
Args:
923
root (string): Root directory containing the files of the dataset.
1024
train (bool, optional): If True, returns training (sub)set from the file storing training data as further determined by fold and hyper_search variables.
@@ -22,6 +36,7 @@ class AcuteNephritis(DatasetFourFold):
2236
download (bool, optional): If True, downloads the dataset from the internet and
2337
puts it in root directory. If dataset is already downloaded, it is not
2438
downloaded again.
39+
2540
"""
2641

2742
name = "acute-nephritis"

torchhd/datasets/adult.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
class Adult(DatasetTrainTest):
66
"""`Adult <https://archive.ics.uci.edu/ml/datasets/adult>`_ dataset.
77
8+
.. list-table::
9+
:widths: 10 10 10 10
10+
:align: center
11+
:header-rows: 1
12+
13+
* - Instances
14+
- Attributes
15+
- Task
16+
- Area
17+
* - 48842
18+
- 14
19+
- Classification
20+
- Social
21+
822
Args:
923
root (string): Root directory containing the files of the dataset.
1024
train (bool, optional): If True, returns training (sub)set from the file storing training data as further determined by hyper_search variable.
@@ -18,6 +32,7 @@ class Adult(DatasetTrainTest):
1832
download (bool, optional): If True, downloads the dataset from the internet and
1933
puts it in root directory. If dataset is already downloaded, it is not
2034
downloaded again.
35+
2136
"""
2237

2338
name = "adult"

torchhd/datasets/airfoil_self_noise.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ class AirfoilSelfNoise(data.Dataset):
1313
Dataset is obtained from a series of aerodynamic and acoustic tests of two and three-dimensional
1414
airfoil blade sections conducted in an anechoic wind tunnel.
1515
16+
.. list-table::
17+
:widths: 10 10 10 10
18+
:align: center
19+
:header-rows: 1
20+
21+
* - Instances
22+
- Attributes
23+
- Task
24+
- Area
25+
* - 1503
26+
- 6
27+
- Regression
28+
- Physical
1629
1730
Args:
1831
root (string): Root directory of dataset where ``airfoil_self_noise.dat`` exists
@@ -23,6 +36,7 @@ class AirfoilSelfNoise(data.Dataset):
2336
and returns a transformed version.
2437
target_transform (callable, optional): A function/transform that takes in the
2538
target and transforms it.
39+
2640
"""
2741

2842
def __init__(

torchhd/datasets/annealing.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
class Annealing(DatasetTrainTest):
66
"""`Annealing <https://archive.ics.uci.edu/ml/datasets/Annealing>`_ dataset.
77
8+
.. list-table::
9+
:widths: 10 10 10 10
10+
:align: center
11+
:header-rows: 1
12+
13+
* - Instances
14+
- Attributes
15+
- Task
16+
- Area
17+
* - 798
18+
- 38
19+
- Classification
20+
- Physical
21+
822
Args:
923
root (string): Root directory containing the files of the dataset.
1024
train (bool, optional): If True, returns training (sub)set from the file storing training data as further determined by hyper_search variable.
@@ -18,6 +32,7 @@ class Annealing(DatasetTrainTest):
1832
download (bool, optional): If True, downloads the dataset from the internet and
1933
puts it in root directory. If dataset is already downloaded, it is not
2034
downloaded again.
35+
2136
"""
2237

2338
name = "annealing"

0 commit comments

Comments
 (0)