I have dataset that include (vertical, lateral, sagittal, bwwform, ecgwform, user, wid, wno, eid, exercise, setno, hr, br, hrv) attribute. The
wid attribute has 3 sets of each exercise in a session.
how to apply
train/test data split based on wid attribute (Set No).
for example
If wid = `1,2,3,4,5,6`
wid(1) = set {`1,2,3`} (3 sets of each exercise)
wid(1) =
{ w1 s1
w1 s2
w1 s3 }
How to split into train/test? 2 sets for train and 1 set for test
What I have tried:
As you can see in the python code I am trying to split train/test data.
from sklearn.model_selection import train_test_split
training_data, testing_data = train_test_split(df_train, test_size = 0.2)
print(f"No. of training examples: {training_data.shape[0]}")
print(f"No. of testing examples: {testing_data.shape[0]}")