Quiz Space

Machine Learning Practice · Quiz 1 · 29 Oct 2023 · September 2023 term

Question 6: Imagine you’ve loaded a dataset with 1000 samples into a …

Question 6

+2 marksOne correct option

Imagine you’ve loaded a dataset with 1000 samples into a Pandas DataFrame, and each sample has 30 features. Unfortunately, some samples have missing values for a few features, and you want to remove samples with more than 3 null values present. Please select the method to accomplish this task.?

  1. A

    drop(how= 27)

  2. B

    drop(columns=[‘all’])

  3. C

    dropna(thresh = 27)

  4. D

    dropna(how=‘any’)

  5. E

    dropna(thresh=3)

Show answer

Correct answer

  • C

    dropna(thresh = 27)

Question 6 of 23 in the IIT Madras BS Machine Learning Practice (MLP) Quiz 1 paper sat on 29 Oct 2023, in the September 2023 term (IIT M DIPLOMA AN2 EXAM QPD2 29 Oct 2023). It carries 2 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2You are working on a machine learning project and have received a dataset containing numeric and categorical features. …
  3. Q3You’re working with a dataset that consists of training data (‘train_data’) and test data (‘test_data’). The dataset co…
  4. Q4You are working on a machine learning project that aims to predict housing prices based on various features of the hous…
  5. Q5Figure question
  6. Q7Choose the options with respect to the given statements:\ Statement1 : To apply various sklearn methods from in series …
  7. Q8Consider the following code: Which of the following may be the correct output of the above code?:
  8. Q9Which of the following is likely to be the correct output of the code given below?
  9. Q10You are working on optimizing a machine learning model for predicting the energy efficiency of buildings. To capture po…
  10. Q11You’re developing a regression model for predicting house prices based on various attributes of a house. Given that som…
  11. Q12You are working on a regression problem and decide to use the SGDRegressor from scikit-learn. You set up two different …
  12. Q13Which columns <u>may not</u> be included in the selected data within the code below?
  13. Q14Which of the following code blocks will correctly take the learning rate as ‘optimal’ ?
  14. Q15While performing exploratory data analysis (EDA) on a dataset, you come across some columns with a high percentage of m…
  15. Q16Given the following code snippet involving GridSearchCV for hyperparameter tuning of a LinearRegression model: Select a…
  16. Q17Given the following code snippet, how many unique values will be present in the column Z of the resulting DataFrame df?
  17. Q18What will be the output of the following code ?
  18. Q19What will be the output of the following code ?
  19. Q20You’re using GridSearchCV to optimize a Ridge regression model from scikit-learn. Consider the following hyperparameter…
  20. Q21For LinearRegression with equation Y = W_0X_0+W_1X_1+W_2X2+\epsilon and given that W_2 = \frac{5}{7} W_1 and \epsilon =…
  21. Q22Which of the following options will be the output of the given code?
  22. Q23Which of the following could be the possible output of print(reg.score())?