Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split folders to work without a "class" hierarchy #22

Closed
r02b opened this issue Feb 20, 2021 · 2 comments
Closed

Split folders to work without a "class" hierarchy #22

r02b opened this issue Feb 20, 2021 · 2 comments

Comments

@r02b
Copy link

r02b commented Feb 20, 2021

Since splitting data into (test, train, validation) sets is relevant to all data types, not just ones that are related different classes, having the option to use split-folder on a general folder, i.e. one that contains actual data and does not comply with the subdir ('class1', 'class2',...) hierarchy, would make this package relevant to a much larger crowd.

@jfilter
Copy link
Owner

jfilter commented Jan 30, 2022

If you want to split files in single folder, do the following:

  1. create an input folder, e.g., input
  2. create another folder, e.g., dummy within input and place all files in dummy.
  3. now split the folder like this: splitfolders --ratio .8 .1 .1 -- input

If you have an array of data, take a look at the following function from scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html

@PatrickKudo
Copy link

I don't think creating dummy folders is an effective solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants