1. Home
  2. Data Science
  3. Scikit-learn
  4. The train_test_split function from scikit-learn is used to:

Added 30 Nov -0001

The train_test_split function from scikit-learn is used to:

  1. fit a regression model to the data
  2. divide data into training and testing subsets Correct answer
  3. encode categorical variables as numbers
  4. scale features to a common numeric range

Correct answer

B. divide data into training and testing subsets

10 views

MCQSEXAM

Explanation

It randomly splits arrays into training and test portions to estimate generalisation performance.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs