Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

dev: Train test split for a dataset #5

Open
daniel-dodd opened this issue Dec 20, 2022 · 0 comments
Open

dev: Train test split for a dataset #5

daniel-dodd opened this issue Dec 20, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@daniel-dodd
Copy link
Member

Would be nice to have a train test split akin to scikit-learn, for the Dataset.

import jax.random as jr
from jax.random import KeyArray
from jaxutils import Dataset

# Need to define this function
def train_test_split(data: Dataset, Key: KeyArray, test_size: float, ...) -> Tuple[Dataset, Dataset]
    ...

# Example usage:
data = Dataset(...)
key = jr.PRNGKey(42)
size = 0.3
train, test = train_test_split(data, key, size)
@daniel-dodd daniel-dodd added enhancement New feature or request good first issue Good for newcomers labels Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant