added train/test/val splits
Browse files- .gitattributes +3 -0
- .gitignore +2 -1
- README.md +10 -1
- affinity-data-combined.parquet → test.parquet +2 -2
- train.parquet +3 -0
- train_test_split.py +21 -0
- val.parquet +3 -0
.gitattributes
CHANGED
@@ -79,3 +79,6 @@ davis.parquet filter=lfs diff=lfs merge=lfs -text
|
|
79 |
glaser.parquet filter=lfs diff=lfs merge=lfs -text
|
80 |
kiba.parquet filter=lfs diff=lfs merge=lfs -text
|
81 |
bindingdb-kd-filtered.parquet filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
79 |
glaser.parquet filter=lfs diff=lfs merge=lfs -text
|
80 |
kiba.parquet filter=lfs diff=lfs merge=lfs -text
|
81 |
bindingdb-kd-filtered.parquet filter=lfs diff=lfs merge=lfs -text
|
82 |
+
test.parquet filter=lfs diff=lfs merge=lfs -text
|
83 |
+
train.parquet filter=lfs diff=lfs merge=lfs -text
|
84 |
+
val.parquet filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
env/
|
2 |
-
.DS_Store
|
|
|
|
1 |
env/
|
2 |
+
.DS_Store
|
3 |
+
affinity-data-combined.parquet
|
README.md
CHANGED
@@ -9,7 +9,16 @@ configs:
|
|
9 |
- config_name: default
|
10 |
data_files:
|
11 |
- split: train
|
12 |
-
path: "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
- split: davis
|
14 |
path: "davis.parquet"
|
15 |
- split: davis_filtered
|
|
|
9 |
- config_name: default
|
10 |
data_files:
|
11 |
- split: train
|
12 |
+
path: "train.parquet"
|
13 |
+
- split: test
|
14 |
+
path: "test.parquet"
|
15 |
+
- split: validation
|
16 |
+
path: "val.parquet"
|
17 |
+
- split: all
|
18 |
+
path:
|
19 |
+
- "train.parquet"
|
20 |
+
- "test.parquet"
|
21 |
+
- "val.parquet"
|
22 |
- split: davis
|
23 |
path: "davis.parquet"
|
24 |
- split: davis_filtered
|
affinity-data-combined.parquet → test.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f9754a4e4ff314bfe4578cd6fdabef7a7bd8f8c95f19e37193cd71fa8b369acf
|
3 |
+
size 53144890
|
train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fb601f4edfa94f4abd00a03148587c2c13801cd1614fc0402fe06aee99d9a510
|
3 |
+
size 1001906911
|
train_test_split.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import numpy as np
|
3 |
+
from sklearn.model_selection import train_test_split
|
4 |
+
|
5 |
+
# Set random seed for reproducibility
|
6 |
+
np.random.seed(42)
|
7 |
+
|
8 |
+
# Load the combined dataset
|
9 |
+
df = pd.read_parquet('affinity-data-combined.parquet')
|
10 |
+
|
11 |
+
# First split off test set (5%)
|
12 |
+
train_val_df, test_df = train_test_split(df, test_size=0.05, random_state=42)
|
13 |
+
|
14 |
+
# Split remaining data into train and validation (90% and 5% of total)
|
15 |
+
train_df, val_df = train_test_split(train_val_df, test_size=0.05263158, random_state=42) # 0.0526 of 95% is 5% of total
|
16 |
+
|
17 |
+
# Save the splits to parquet files
|
18 |
+
train_df.to_parquet('train.parquet', index=False)
|
19 |
+
val_df.to_parquet('val.parquet', index=False)
|
20 |
+
test_df.to_parquet('test.parquet', index=False)
|
21 |
+
|
val.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c72bf5072035ce5e9edff3203ca94fd69911948c80fe90267d544932bf6efe0
|
3 |
+
size 53297643
|