jasmine.model_selection.train_test_split

jasmine.model_selection.train_test_split(X, y, test_size=0.2, shuffle=True, random_state=None)[source]

Split arrays into random train and test subsets.

Parameters:
  • X (jnp.ndarray) – Input features.

  • y (jnp.ndarray) – Target labels.

  • test_size (float) – Proportion of the dataset to include in the test split (0.0 to 1.0).

  • shuffle (bool) – Whether to shuffle the data before splitting.

  • random_state (int, optional) – Random seed for reproducibility.

Returns:

X_train, X_test, y_train, y_test

Return type:

Tuple