Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Python
from sklearn.model_selection import train_test_split
X_grid, X_not_use, y_grid, y_not_use = train_test_split(X_train, y_train, test_size=0.9, random_state=42)


What I have tried:

when I tried the above script it says
ValueError: Found input variables with inconsistent numbers of samples: [3366, 1122]
Posted
Updated 19-Feb-23 21:11pm

1 solution

Look at your data - it's saying that there is a problem with it, somewhere.

More than that we cannot say - we have no access to your data and that's pretty much essential to solving the problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900