Reputation: 3
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
Reputation: 371
n_samples=0 means that your dataset is empty. Check the image_data variable
Upvotes: 1