train_test_split() error: Found input variables with inconsistent numbers of samples
13
5
$begingroup$
Fairly new to Python but building out my first RF model based on some classification data. I've converted all of the labels into int64 numerical data and loaded into X and Y as a numpy array, but I am hitting an error when I am trying to train the models. Here is what my arrays look like: >>> X = np.array([[df.tran_cityname, df.tran_signupos, df.tran_signupchannel, df.tran_vmake, df.tran_vmodel, df.tran_vyear]]) >>> Y = np.array(df['completed_trip_status'].values.tolist()) >>> X array([[[ 1, 1, 2, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 2, 1, 3, 1, 3, 3, 2, 3, 3, 1, 1, 1, 1], [ 0, 5, 5, 1, 1, 1, 2, 2, 0, 2, ...