sabeerali kp
sabeerali kp

Reputation: 3

I am stuck with train_test_split of sklearn model_selection

from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(image_data, labels, test_size = 0.2, random_state = 101)

showing the error:

ValueError: With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

Upvotes: 0

Views: 3986

Answers (1)

Sami Belkacem
Sami Belkacem

Reputation: 371

n_samples=0 means that your dataset is empty. Check the image_data variable

Upvotes: 1

Related Questions