Top 350+ Solved Machine Learning (ML) MCQ Questions Answer
Q. if there is only a discrete number of possible outcomes (called categories),the process becomes a .
a. regression
b. classification.
c. modelfree
d. categories
Q. Let’s say, you are working with categorical feature(s) and you have not looked at the distribution of the categorical variable in the test data.You want to apply one hot encoding (OHE) on the categorical feature(s). What challenges you may face if you have applied OHE on a categorical variable of train dataset?
a. all categories of categorical variable are not present in the test dataset.
b. frequency distribution of categories is different in train as compared to the test dataset.
c. train and test always have same distribution.
d. both a and b
Q. Which of the following sentence is FALSE regarding regression?
a. it relates inputs to outputs.
b. it is used for prediction.
c. it may be used forinterpretation.
d. it discovers causalrelationships.
Q. scikit-learn also provides functions for creatingdummy datasets from scratch:
a. make_classification()
b. make_regression()
c. make_blobs()
d. all above
Q. which can accept a NumPy RandomStategenerator or an integer seed.
a. make_blobs
b. random_state
c. test_size
d. training_size
Q. is the most drastic one and should be considered only when the dataset is quite large, the number of missing features is high, and any prediction could be risky.
a. removing the whole line
b. creating sub- model to predict those features
c. using an automatic strategy to input them according to the other known values
d. all above
Q. It's possible to specify if the scaling process must include both mean and standard deviation using theparameters .
a. with_mean=tru e/false
b. with_std=true/ false
c. both a & b
d. none of the mentioned
Q. Which of the following selects the best K high-scorefeatures.
a. selectpercentile
b. featurehasher
c. selectkbest
d. all above
Q. Suppose you have fitted a complex regression model on a dataset. Now, you are using Ridge regression with tuning parameter lambda to reduce its complexity. Choose the option(s) below which describes relationship of bias andvariance with lambda.
a. in case of very large lambda; bias is low, variance islow
b. in case of very large lambda; bias is low, variance ishigh
c. in case of very large lambda; bias is high, variance islow
d. in case of very large lambda; bias is high, variance ishigh
Q. What is/are true about ridge regression?1. When lambda is 0, model works like linear regression model2. When lambda is 0, model doesn’t work like linear regression model3. When lambda goes to infinity, we get very, very small coefficients approaching 04. When lambda goes to infinity, we get very, very large coefficients approachinginfinity
a. 1 and 3
b. 1 and 4
c. 2 and 3
d. 2 and 4
Q. Which of the following method(s) does not haveclosed form solution for its coefficients?
a. ridgeregression
b. lasso
c. both ridgeand lasso
d. none of both
Q. Function used for linear regression in R is
a. lm(formula, data)
b. lr(formula, data)
c. lrm(formula, data)
d. regression.linear (formula, data)
Q. 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
Q. 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. Now we increase the training set size gradually. As the training set size increases, what do you expect will happen with the meantraining error?
a. increase
b. decrease
c. remain constant
d. can’t say