Quiz Space

Machine Learning Practice · Quiz 2 · 24 Mar 2024 · January 2024 term

Question 8: What will the output for below code

Question 8

+2 marksOne correct option

What will the output for below code

python
from sklearn.feature_extraction.text import CountVectorizer
corpus = [ 'This is the first document.',
'This document is the second document.']
vectorizer = CountVectorizer()
vectorizer.fit_transform(corpus)
print(vectorizer.get_feature_names_out())
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 8 of 22 in the IIT Madras BS Machine Learning Practice (MLP) Quiz 2 paper sat on 24 Mar 2024, in the January 2024 term (IIT M DIPLOMA AN EXAM QDD2 24 Mar 2024). It carries 2 marks.

More questions from this paper

  1. Q1Consider following code snippet: What will be the output of the above code snippet in the correct sequence?
  2. Q2Figure question
  3. Q3Consider a binary classification dataset with labeled as 98% negative samples and 2% positive samples. A model is train…
  4. Q4Consider the following code block: What are the most suitable values to be filled in the two blank spaces (in that orde…
  5. Q5Figure question
  6. Q6You’re building a machine learning pipeline to preprocess data and train a model on a classification task. You decide t…
  7. Q7Given below code to load a huge file name as filename.csv and this file is not loading at once in the system which para…
  8. Q9Imagine you're training a Perceptron using sklearn with the following code: Given the linearly separable nature of the …
  9. Q10Consider the following code snippet using scikit-learn: Assuming that X_train and y_train are given and the features ar…
  10. Q11Consider the following code snippet that employs LogisticRegression from sklearn on a feature matrix X and correspondin…
  11. Q12Which of the following is true for a hard margin SVM algorithm ?
  12. Q13Which of the following is/are correct regarding RadiusNeighborsClassifier
  13. Q14Which of the following is correct?
  14. Q15Which of the following option(s) are correct for the precision-recall curve
  15. Q16Which of the following statements are true?
  16. Q17Figure question
  17. Q18Figure question
  18. Q19Consider the following code snippet: If the shape of X is (150, 4). How many total columns are there in the X_transform…
  19. Q20Please consider the following data and code for a regression problem with symbols in mind: >>>: Represents input code #…
  20. Q21After training a multi-class classifier, you obtain the following confusion matrix. What will be the weighted average o…
  21. Q22What is the output of the following code?