train_test_split
TrainTestSplit(ratio, *, shuffle=False)
Split data into train and test sets.
Initialize the train-test splitter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ratio
|
float
|
The ratio of the data to put in the training set. |
required |
shuffle
|
bool
|
Whether to shuffle the data before splitting. |
False
|
Source code in src/flowcean/environments/train_test_split.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
split(environment)
Split the data into train and test sets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
environment
|
OfflineEnvironment
|
The environment to split. |
required |
Source code in src/flowcean/environments/train_test_split.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|