Now I am engaged in machine learning, can someone tell me in detail why I need x_train, x_test, y_train, y_test, the arguments that we get as a result of the TRAIN_TEST_SPLIT function?
x_train, x_test, y_train, y_test = train_test_split (x, y, test_size = 0.2, Random_state = 42)
and how is the Test_Size parameter set?
Answer 1, Authority 100%
So you divide your sample to the training and test part. Training will be happening at the training selection, and on the test – checking the “knowledge” received. Test_Size is used to split the sample (in your case will be 20% used on tests).