The train_test_split function from scikit-learn is used to:
-
A
fit a regression model to the data
-
B
divide data into training and testing subsets
Correct answer
-
C
encode categorical variables as numbers
-
D
scale features to a common numeric range
Correct answer
B. divide data into training and testing subsets
10 views
Explanation
It randomly splits arrays into training and test portions to estimate generalisation performance.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ