Docsity

machine learning mcq, Exams of Introduction to Machine Learning

Toggle sidebar
bg1
UNIT I
1. What is classification?
a) when the output variable is a category, such as “red” or “blue” or “disease” and “no
disease”.
b) when the output variable is a real value, such as “dollars” or “weight”.
Ans: Solution A
2. What is regression?
a) When the output variable is a category, such as “red” or “blue” or “disease” and “no
disease”.
b) When the output variable is a real value, such as “dollars” or “weight”.
Ans: Solution B
3. What is supervised learning?
a) All data is unlabelled and the algorithms learn to inherent structure from the input data
b) All data is labelled and the algorithms learn to predict the output from the input data
c) It is a framework for learning where an agent interacts with an environment and receives
a reward for each interaction
d) Some data is labelled but most of it is unlabelled and a mixture of supervised and
unsupervised techniques can be used.
Ans: Solution B
4. What is Unsupervised learning?
a) All data is unlabelled and the algorithms learn to inherent structure from the input data
b) All data is labelled and the algorithms learn to predict the output from the input data
c) It is a framework for learning where an agent interacts with an environment and receives
a reward for each interaction
d) Some data is labelled but most of it is unlabelled and a mixture of supervised and
unsupervised techniques can be used.
Ans: Solution A
5. What is Semi-Supervised learning?
a) All data is unlabelled and the algorithms learn to inherent structure from the input data
b) All data is labelled and the algorithms learn to predict the output from the input data
c) It is a framework for learning where an agent interacts with an environment and receives
a reward for each interaction
d) Some data is labelled but most of it is unlabelled and a mixture of supervised and
unsupervised techniques can be used.
Ans: Solution D
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
Discount

On special offer

Partial preview of the text

Download machine learning mcq and more Exams Introduction to Machine Learning in PDF only on Docsity!

UNIT I

1. What is classification?

a) when the output variable is a category, such as “red” or “blue” or “disease” and “no

disease”.

b) when the output variable is a real value , such as “dollars” or “weight”.

Ans: Solution A

2. What is regression?

a) When the output variable is a category, such as “red” or “blue” or “disease” and “no

disease”.

b) When the output variable is a real value, such as “dollars” or “weight”.

Ans: Solution B

3. What is supervised learning?

a) All data is unlabelled and the algorithms learn to inherent structure from the input data

b) All data is labelled and the algorithms learn to predict the output from the input data

c) It is a framework for learning where an agent interacts with an environment and receives

a reward for each interaction

d) Some data is labelled but most of it is unlabelled and a mixture of supervised and

unsupervised techniques can be used.

Ans: Solution B

4. What is Unsupervised learning?

a) All data is unlabelled and the algorithms learn to inherent structure from the input data

b) All data is labelled and the algorithms learn to predict the output from the input data

c) It is a framework for learning where an agent interacts with an environment and receives

a reward for each interaction

d) Some data is labelled but most of it is unlabelled and a mixture of supervised and

unsupervised techniques can be used.

Ans: Solution A

5. What is Semi-Supervised learning?

a) All data is unlabelled and the algorithms learn to inherent structure from the input data

b) All data is labelled and the algorithms learn to predict the output from the input data

c) It is a framework for learning where an agent interacts with an environment and receives

a reward for each interaction

d) Some data is labelled but most of it is unlabelled and a mixture of supervised and

unsupervised techniques can be used.

Ans: Solution D

6. What is Reinforcement learning?

a) All data is unlabelled and the algorithms learn to inherent structure from the input data

b) All data is labelled and the algorithms learn to predict the output from the input data

c) It is a framework for learning where an agent interacts with an environment and receives

a reward for each interaction

d) Some data is labelled but most of it is unlabelled and a mixture of supervised and

unsupervised techniques can be used.

Ans: Solution C

7. Sentiment Analysis is an example of:

Regression,

Classification

Clustering

Reinforcement Learning

Options:

A. 1 Only

B. 1 and 2

C. 1 and 3

D. 1, 2 and 4

Ans : Solution D

8. The process of forming general concept definitions from examples of concepts to be

learned.

a) Deduction

b) abduction

c) induction

d) conjunction

Ans : Solution C

9. Computers are best at learning

a) facts.

b) concepts.

c) procedures.

d) principles.

15. A multiple regression model has the form: y = 2 + 3x1 + 4x2. As x1 increases by 1 unit (holding x

constant), y will a) increase by 3 units b) decrease by 3 units c) increase by 4 units

d) decrease by 4 units

Ans : Solution C

16. A multiple regression model has

a) only one independent variable b) more than one dependent variable c) more than one independent variable

d) none of the above

Ans : Solution B

17. A measure of goodness of fit for the estimated regression equation is the

a) multiple coefficient of determination b) mean square due to error c) mean square due to regression

d) none of the above

Ans : Solution C

18. The adjusted multiple coefficient of determination accounts for

a) the number of dependent variables in the model b) the number of independent variables in the model c) unusually large predictors

d) none of the above

Ans : Solution D

19. The multiple coefficient of determination is computed by

a) dividing SSR by SST b) dividing SST by SSR c) dividing SST by SSE

d) none of the above

Ans : Solution C

20. For a multiple regression model, SST = 200 and SSE = 50. The multiple coefficient of

determination is a) 0.

b) 4. c) 0.

d) none of the above

Ans : Solution B

21. A nearest neighbor approach is best used

a) with large-sized datasets. b) when irrelevant attributes have been removed from the data. c) when a generalized model of the data is desirable.

d) when an explanation of what has been found is of primary importance.

Ans : Solution B

22. Another name for an output attribute.

a) predictive variable b) independent variable c) estimated variable

d) dependent variable

Ans : Solution B

23. Classification problems are distinguished from estimation problems in that

a) classification problems require the output attribute to be numeric. b) classification problems require the output attribute to be categorical. c) classification problems do not allow an output attribute.

d) classification problems are designed to predict future outcome.

Ans : Solution C

24. Which statement is true about prediction problems?

a) The output attribute must be categorical. b) The output attribute must be numeric. c) The resultant model is designed to determine future outcomes.

d) The resultant model is designed to classify current behavior.

Ans : Solution D

25. Which statement about outliers is true?

a) Outliers should be identified and removed from a dataset. b) Outliers should be part of the training dataset but should not be present in the test data. c) Outliers should be part of the test dataset but should not be present in the training data. d) The nature of the problem determines how outliers are used.

31. Data used to optimize the parameter settings of a supervised learner model.

a) Training b) Test c) Verification d) Validation

Ans : Solution D

32. Bootstrapping allows us to

a) choose the same training instance several times. b) choose the same test set instance several times. c) build models with alternative subsets of the training data several times.

d) test a model with alternative subsets of the test data several times.

Ans : Solution A

33. The correlation between the number of years an employee has worked for a company and the

salary of the employee is 0.75. What can be said about employee salary and years worked? a) There is no relationship between salary and years worked. b) Individuals that have worked for the company the longest have higher salaries. c) Individuals that have worked for the company the longest have lower salaries. d) The majority of employees have been with the company a long time.

e) The majority of employees have been with the company a short period of time.

Ans : Solution B

34. The correlation coefficient for two real-valued attributes is – 0.85. What does this value tell you?

a) The attributes are not linearly related. b) As the value of one attribute increases the value of the second attribute also increases. c) As the value of one attribute decreases the value of the second attribute increases. d) The attributes show a curvilinear relationship.

Ans : Solution C

35. The average squared difference between classifier predicted output and actual output.

a) mean squared error b) root mean squared error c) mean absolute error

d) mean relative error

Ans : Solution A

36. Simple regression assumes a __________ relationship between the input attribute and output

attribute. a) Linear

b) Quadratic c) reciprocal

d) inverse

Ans : Solution A

37. Regression trees are often used to model _______ data.

a) Linear b) Nonlinear c) Categorical d) Symmetrical

Ans : Solution B

38. The leaf nodes of a model tree are

a) averages of numeric output attribute values. b) nonlinear regression equations. c) linear regression equations. d) sums of numeric output attribute values.

Ans : Solution C

39. Logistic regression is a ________ regression technique that is used to model data having a

_____outcome. a) linear, numeric b) linear, binary c) nonlinear, numeric

d) nonlinear, binary

Ans : Solution D

40. This technique associates a conditional probability value with each data instance.

a) linear regression b) logistic regression c) simple regression

d) multiple linear regression

Ans : Solution B

41. This supervised learning technique can process both numeric and categorical input attributes.

a) linear regression b) Bayes classifier c) logistic regression

d) backpropagation learning

UNIT – II

1.True- False: Over fitting is more likely when you have huge amount of data to train? A) TRUE B) FALSE Ans Solution: (B) With a small training dataset, it’s easier to find a hypothesis to fit the training data exactly i.e. over fitting.

2.What is pca.components_ in Sklearn? Set of all eigen vectors for the projection space Matrix of principal components Result of the multiplication matrix None of the above options Ans A

  1. Which of the following techniques would perform better for reducing dimensions of a data set? A. Removing columns which have too many missing values B. Removing columns which have high variance in data C. Removing columns with dissimilar data trends D. None of these Ans Solution: (A) If a columns have too many missing values, (say 99%) then we can remove such columns.
  2. It is not necessary to have a target variable for applying dimensionality reduction algorithms. A. TRUE B. FALSE Ans Solution: (A) LDA is an example of supervised dimensionality reduction algorithm.
  3. PCA can be used for projecting and visualizing data in lower dimensions. A. TRUE B. FALSE Ans Solution: (A) Sometimes it is very useful to plot the data in lower dimensions. We can take the first 2 principal components and then visualize the data using scatter plot.
  4. The most popularly used dimensionality reduction algorithm is Principal Component Analysis (PCA). Which of the following is/are true about PCA? PCA is an unsupervised method

It searches for the directions that data have the largest variance Maximum number of principal components <= number of features All principal components are orthogonal to each other A. 1 and 2 B. 1 and 3 C. 2 and 3 D. All of the above

Ans D

  1. PCA works better if there is? A linear structure in the data If the data lies on a curved surface and not on a flat surface If variables are scaled in the same unit A. 1 and 2 B. 2 and 3 C. 1 and 3 D. 1 ,2 and 3 Ans Solution: (C)
  2. What happens when you get features in lower dimensions using PCA? The features will still have interpretability The features will lose interpretability The features must carry all information present in data The features may not carry all information present in data A. 1 and 3 B. 1 and 4 C. 2 and 3 D. 2 and 4 Ans Solution: (D) When you get the features in lower dimensions then you will lose some information of data most of the times and you won’t be able to interpret the lower dimension data.
  3. Which of the following option(s) is / are true? You need to initialize parameters in PCA You don’t need to initialize parameters in PCA PCA can be trapped into local minima problem PCA can’t be trapped into local minima problem A. 1 and 3 B. 1 and 4 C. 2 and 3 D. 2 and 4

UNIT – III

1. Which of the following methods do we use to best fit the data in Logistic Regression?

A) Least Square Error B) Maximum Likelihood C) Jaccard distance D) Both A and B Ans Solution: B

  1. Choose which of the following options is true regarding One-Vs-All method in Logistic Regression. A) We need to fit n models in n-class classification problem B) We need to fit n-1 models to classify into n classes C) We need to fit only 1 model to classify into n classes D) None of these Ans Solution: A
  2. Suppose, You applied a Logistic Regression model on a given data and got a training accuracy X and testing accuracy Y. Now, you want to add a few new features in the same data. Select the option(s) which is/are correct in such a case. Note: Consider remaining parameters are same. A) Training accuracy increases B) Training accuracy increases or remains the same C) Testing accuracy decreases D) Testing accuracy increases or remains the same Ans Solution: A and D Adding more features to model will increase the training accuracy because model has to consider more data to fit the logistic regression. But testing accuracy increases if feature is found to be significant
  3. Which of the following algorithms do we use for Variable Selection? A) LASSO B) Ridge C) Both D) None of these Ans Solution: A In case of lasso we apply a absolute penality, after increasing the penality in lasso some of the coefficient of variables may become zero
  4. Which of the following statement is true about outliers in Linear regression?

A) Linear regression is sensitive to outliers B) Linear regression is not sensitive to outliers C) Can’t say D) None of these Ans Solution: (A) The slope of the regression line will change due to outliers in most of the cases. So Linear Regression is sensitive to outliers.

  1. Which of the following methods do we use to find the best fit line for data in Linear Regression? A) Least Square Error B) Maximum Likelihood C) Logarithmic Loss D) Both A and B Ans Solution: (A) In linear regression, we try to minimize the least square errors of the model to identify the line of best fit.
  2. Which of the following is true about Residuals? A) Lower is better B) Higher is better C) A or B depend on the situation D) None of these Ans Solution: (A) Residuals refer to the error values of the model. Therefore lower residuals are desired.
  3. Suppose you plotted a scatter plot between the residuals and predicted values in linear regression and you found that there is a relationship between them. Which of the following conclusion do you make about this situation?

A) Since the there is a relationship means our model is not good B) Since the there is a relationship means our model is good C) Can’t say D) None of these Ans Solution: (A) There should not be any relationship between predicted values and residuals. If there exists any relationship between them, it means that the model has not perfectly captured the information in the data.

  1. Suppose you have fitted a complex regression model on a dataset. Now, you are using Ridge regression with penalty x.
  1. True-False: It is possible to design a Linear regression algorithm using a neural network?

A) TRUE

B) FALSE

Solution: (A)

True. A Neural network can be used as a universal approximator, so it can definitely implement a linear regression algorithm.

  1. Which of the following methods do we use to find the best fit line for data in Linear Regression? A) Least Square Error B) Maximum Likelihood C) Logarithmic Loss D) Both A and B Solution: (A) In linear regression, we try to minimize the least square errors of the model to identify the line of best fit.
  2. Which of the following evaluation metrics can be used to evaluate a model while modeling a continuous output variable? A) AUC-ROC B) Accuracy C) Logloss D) Mean-Squared-Error Solution: (D) Since linear regression gives output as continuous values, so in such case we use mean squared error metric to evaluate the model performance. Remaining options are use in case of a classification problem.
  3. True-False: Lasso Regularization can be used for variable selection in Linear Regression. A) TRUE B) FALSE Solution: (A) True, In case of lasso regression we apply absolute penalty which makes some of the coefficients zero.
  4. Which of the following is true about Residuals? A) Lower is better B) Higher is better

C) A or B depend on the situation D) None of these Solution: (A) Residuals refer to the error values of the model. Therefore lower residuals are desired.

  1. Suppose that we have N independent variables (X1,X2… Xn) and dependent variable is Y. Now Imagine that you are applying linear regression by fitting the best fit line using least square error on this data. You found that correlation coefficient for one of it’s variable(Say X1) with Y is -0.95. Which of the following is true for X1? A) Relation between the X1 and Y is weak B) Relation between the X1 and Y is strong C) Relation between the X1 and Y is neutral D) Correlation can’t judge the relationship Solution: (B) The absolute value of the correlation coefficient denotes the strength of the relationship. Since absolute correlation is very high it means that the relationship is strong between X1 and Y.
  2. Looking at above two characteristics, which of the following option is the correct for Pearson correlation between V1 and V2? If you are given the two variables V1 and V2 and they are following below two characteristics.
  3. If V1 increases then V2 also increases
  4. If V1 decreases then V2 behavior is unknown A) Pearson correlation will be close to 1 B) Pearson correlation will be close to - C) Pearson correlation will be close to 0 D) None of these

Solution: (D) We cannot comment on the correlation coefficient by using only statement 1. We need to consider the both of these two statements. Consider V1 as x and V2 as |x|. The correlation coefficient would not be close to 1 in such a case.

  1. Suppose Pearson correlation between V1 and V2 is zero. In such case, is it right to conclude that V1 and V2 do not have any relation between them? A) TRUE B) FALSE Solution: (B) Pearson correlation coefficient between 2 variables might be zero even when they have a relationship between them. If the correlation coefficient is zero, it just means that that they don’t move together. We can take examples like y=|x| or y=x^2.

B) Some of the coefficient will be approaching to zero but not absolute zero C) Both A and B depending on the situation D) None of these Solution: (A) As already discussed, lasso applies absolute penalty, so some of the coefficients will become zero.

  1. Which of the following statement is true about outliers in Linear regression? A) Linear regression is sensitive to outliers B) Linear regression is not sensitive to outliers C) Can’t say D) None of these Solution: (A) The slope of the regression line will change due to outliers in most of the cases. So Linear Regression is sensitive to outliers.
  2. Suppose you plotted a scatter plot between the residuals and predicted values in linear regression and you found that there is a relationship between them. Which of the following conclusion do you make about this situation?

A) Since the there is a relationship means our model is not good B) Since the there is a relationship means our model is good C) Can’t say D) None of these Solution: (A) There should not be any relationship between predicted values and residuals. If there exists any relationship between them,it means that the model has not perfectly captured the information in the data.

Question Context 29-31: Suppose that you have a dataset D1 and you design a linear regression model of degree 3 polynomial and you found that the training and testing error is “0” or in another terms it perfectly fits the data.

29. What will happen when you fit degree 4 polynomial in linear regression? A) There are high chances that degree 4 polynomial will over fit the data B) There are high chances that degree 4 polynomial will under fit the data C) Can’t say D) None of these Solution: (A) Since is more degree 4 will be more complex(overfit the data) than the degree 3 model so it will again perfectly fit the data. In such case training error will be zero but test error may not be zero.

  1. What will happen when you fit degree 2 polynomial in linear regression? A) It is high chances that degree 2 polynomial will over fit the data B) It is high chances that degree 2 polynomial will under fit the data C) Can’t say D) None of these Solution: (B) If a degree 3 polynomial fits the data perfectly, it’s highly likely that a simpler model(degree 2 polynomial) might under fit the data.
  2. In terms of bias and variance. Which of the following is true when you fit degree 2 polynomial?

A) Bias will be high, variance will be high B) Bias will be low, variance will be high C) Bias will be high, variance will be low D) Bias will be low, variance will be low Solution: (C) Since a degree 2 polynomial will be less complex as compared to degree 3, the bias will be high and variance will be low.

Question Context 32-33: We have been given a dataset with n records in which we have input attribute as x and output attribute as y. Suppose we use a linear regression method to model this data. To test our linear regressor, we split the data in training set and test set randomly.

32. Now we increase the training set size gradually. As the training set size increases, what do you expect will happen with the mean training error?

A) Increase B) Decrease C) Remain constant D) Can’t Say Solution: (D) Training error may increase or decrease depending on the values that are used to fit the model. If the values used to train contain more outliers gradually, then the error might just increase.

33. What do you expect will happen with bias and variance as you increase the size of training data?

A) Bias increases and Variance increases B) Bias decreases and Variance increases C) Bias decreases and Variance decreases