Skip to content

Commit 7c1d9b5

Browse files
authored
Update airfoil URL (#231)
* Update airfoil URL * fix columns headers
1 parent 373a223 commit 7c1d9b5

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

tests/plugins/core/models/helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
def get_airfoil_dataset() -> pd.DataFrame:
66
df = pd.read_csv(
7-
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
8-
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
9-
sep=";",
7+
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
8+
sep="\t",
109
engine="python",
1110
)
1211
df.columns = df.columns.astype(str)

tests/plugins/domain_adaptation/da_helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ def from_serde() -> Plugin:
2525

2626
def get_airfoil_dataset() -> pd.DataFrame:
2727
df = pd.read_csv(
28-
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
29-
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
30-
sep=";",
28+
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
29+
sep="\t",
3130
engine="python",
3231
)
3332
df.columns = df.columns.astype(str)

tests/plugins/generic/generic_helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ def from_serde() -> Plugin:
3131

3232
def get_airfoil_dataset() -> pd.DataFrame:
3333
df = pd.read_csv(
34-
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
35-
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
36-
sep=";",
34+
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
35+
sep="\t",
3736
engine="python",
3837
)
3938
df.columns = df.columns.astype(str)

tests/plugins/privacy/fhelpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ def from_serde() -> Plugin:
2525

2626
def get_airfoil_dataset() -> pd.DataFrame:
2727
df = pd.read_csv(
28-
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
29-
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
30-
sep=";",
28+
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
29+
sep="\t",
3130
engine="python",
3231
)
3332
df.columns = df.columns.astype(str)

tests/utils/test_compression.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@
88

99
def get_airfoil_dataset() -> pd.DataFrame:
1010
df = pd.read_csv(
11-
"https://www.neuraldesigner.com/files/datasets/airfoil_self_noise.csv",
12-
# "https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip", # TODO: change to this source?
13-
sep=";",
11+
"https://archive.ics.uci.edu/static/public/291/airfoil+self+noise.zip",
12+
sep="\t",
1413
engine="python",
14+
header=None,
15+
names=[
16+
"frequency",
17+
"angle_of_attack",
18+
"chord_length",
19+
"free_stream_velocity",
20+
"suction_side_displacement_thickness",
21+
"scaled_sound_pressure_level",
22+
],
1523
)
1624
df.columns = df.columns.astype(str)
1725

@@ -77,10 +85,7 @@ def test_compression_sanity2() -> None:
7785
def test_compression_sanity_airfoil() -> None:
7886
df = get_airfoil_dataset()
7987
df["chord_length"] = df["chord_length"].astype(str)
80-
print(df.head())
8188
compressed_df, context = compress_dataset(df)
82-
print(compressed_df)
83-
print(context)
8489

8590
assert len(compressed_df) == len(df)
8691
assert compressed_df.shape[1] > 0

0 commit comments

Comments
 (0)