from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.2, random_state=87)
plt.scatter(x_train[:, 0], x_train[:,1], c=y_train)
Can someone explain to me about the code, what is the different between train and test and how does [:, 0]
and [:,1]
about?