SIENTIAPDE-1255: Improve documentation for split_train_test function in utils.py
This commit is contained in:
@@ -15,15 +15,20 @@ def split_train_test(
|
|||||||
"""
|
"""
|
||||||
Split arrays or matrices into random train and test subsets.
|
Split arrays or matrices into random train and test subsets.
|
||||||
|
|
||||||
|
Wrapper for sklearn.model_selection.train_test_split.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
*data: data to be splitted.
|
*data: data to be split.
|
||||||
test_size: size of test subset.
|
test_size: size of test subset.
|
||||||
train_size: size of train subset.
|
train_size: size of train subset.
|
||||||
random_state: Seed applied to the data before applying the split.
|
random_state: Seed applied to the data before applying the split.
|
||||||
shuffle: Whether or not to shuffle the data before splitting.
|
shuffle: Whether or not to shuffle the data before splitting.
|
||||||
stratify: If not None, data is split in a stratified fashion, using this as the class labels.
|
stratify: If not None, data is split in a stratified fashion, using this as the class labels.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
X_train, X_test, y_train, y_test
|
X_train, X_test, y_train, y_test
|
||||||
|
|
||||||
|
Thread-safe: This function is stateless and thread-safe.
|
||||||
"""
|
"""
|
||||||
X_train, X_test, y_train, y_test = train_test_split(
|
X_train, X_test, y_train, y_test = train_test_split(
|
||||||
*data,
|
*data,
|
||||||
|
|||||||
Reference in New Issue
Block a user