Quiz Space

Machine Learning Practice · Quiz 1 · 16 Jul 2023 · May 2023 term

Question 11: Consider the following code: Which metrics will be conta…

Question 11

+2 marksOne correct option

Consider the following code:

python
from sklearn.datasets import make_regression
from sklearn.datasets import make_classification
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import LogisticRegression
X_r, y_r = make_regression()
lr = LinearRegression()
lr.fit(X_r, y_r)
score1 = lr.score(X_r, y_r)
X_c, y_c = make_classification()
logr = LogisticRegression()
logr.fit(X_c, y_c)
score2 = logr.score(X_c, y_c)
print(score1)
print(score2)

Which metrics will be contained in score1 and score2 respectively?

  1. A

    Accuracy, Accuracy

  2. B

    R2 score, R2 score

  3. C

    Accuracy, R2 score

  4. D

    R2 score, Accuracy

  5. E

    F1 score, Precision

  6. F

    Precision, Recall

  7. G

    MAE, MSE

  8. H

    The code will result in an error

Show answer

Correct answer

  • D

    R2 score, Accuracy

Question 11 of 24 in the IIT Madras BS Machine Learning Practice (MLP) Quiz 1 paper sat on 16 Jul 2023, in the May 2023 term (IIT M DIPLOMA AN2 EXAM QPD2 16 JULY 2023). It carries 2 marks.

This question was also asked in

More questions from this paper

  1. Q1Which of the following things can be observed from a Histogram ?
  2. Q2Which of the following are use cases of ColumnTransformer?
  3. Q3Consider a regression dataset, the features are "Temperature" and "Humidity", and the label is "Precipitation" (i.e. ra…
  4. Q4Which of the following options is/are correct?
  5. Q5Figure question
  6. Q6For the below code which option will provide the samples(rows) containing outliers according to the standard Boxplot in…
  7. Q7What will be the output of the following code snippet ?
  8. Q8What will be the output of the following code ?
  9. Q9Which of the following is(are) true statements?\ Statement 1: A dataset is splitted into the train set and the test set…
  10. Q10Figure question
  11. Q12Suppose you have a trained stochastic gradient regressor model by enabling warm start parameter. What happens if you ca…
  12. Q13What is the purpose of the tol parameter in the fit method of the stochastic regressor?
  13. Q14Figure question
  14. Q15How many models with different combinations of parameter values will get trained in the following code?
  15. Q16Figure question
  16. Q17To see the distribution of the data along each numerical feature which of the following codes will show all the histogr…
  17. Q18Which of the following can affect performance of the Simple linear Regression while training the model?
  18. Q19Figure question
  19. Q20Consider the following code block: Which of the following may be appropriate to be filled in the blank space?
  20. Q21Which of the following are correct statements?
  21. Q22Figure question
  22. Q23Consider the following code: Which of the following may be the correct output of the above code?:
  23. Q24Consider the following code: Which of the following is more likely to be true?