We wish to load digit dataset from sklearn. Which of the following will result into an error?
Q2MCQ2 marks
Which of the following statements is/are incorrect about the AUC?
AUC stands for Area Underneath the Curve.
A completely effective classifier is a diagonal line, and it will have an AUC of0.5.
The larger the value of AUC, the more effective the classifier.
An AUC of 1 indicates a perfect classifier, which means it gets all the 1scorrectly classified, and doesn’t misclassify any 0s as 1s.
None of these.
Q3MCQ2 marks
Which of the following options represents the correct option to set the regularization rate in RidgeClassifier?
Q4MCQ2 marks
Putting loss=hinge in class sklearn.linear_model.SGDClassifier(loss=’hinge’) dictates which of the following loss functions in SGDClassifier?
hinge but quadratically penalized
logistic regression
linear SVM
None of these
Q5MCQ2 marks
Which of the following Naive Bayes algorithms can be applied if the data is imbalanced?
GaussianNB
ComplementNB
CategoricalNB
None of these
Q6MCQ2 marks
Which of the following options represents the correct output for the following block of code?
Which of the following options represents the correct output for the following block of code?
[0.]
[0.5]
[1.5]
[1.]
Q7MCQ2 marks
Mention which of the following statement(s) is / are correct? 1. Statement 1: Incremental learning is a dynamic technique which is applied when training data becomes available gradually over time or its size is out of system memory limits. 2. Statement 2: Sklearn can process large data in batches and updates the model parameters for each batch.
Statement 1 is correct but statement 2 is incorrect.
Statement 1 is incorrect but statement 2 is correct.
Statement 1 and statement 2 both are incorrect.
Statement 1 and statement 2 both are correct.
Q8MCQ2 marks
Which of the following options implements largest measure of regularization, i.e. which of these models will have lowest overfitting?
Q9MCQ2 marks
Consider the following scatter plots of four different input datasets:
Consider the following scatter plots of four different input datasets: Which data will be classified better using gaussian rbf kernel?
Data 4
Data 3
Data 1
Data 2
Q10MCQ2 marks
Consider following statements regarding a decision tree model: 1. It is a non-parametric model. 2. It has a tendency to underfit if allowed to grow unconditionally. 3. It can be used for regression and classification problems only, but not for clustering. 4. It is one of the most difficult machine learning models to interpret. 5. For regression problems, decision tree’s loss function and evaluation metric can be same. Choose the option with all the correct statements:
1, 3, 5
1, 3
3, 5
2, 4
1, 3, 4
1, 2, 4
Q11MCQ2 marks
When a node is split in a decision tree (in sklearn):
It creates only two new children nodes always.
It can create two or more new children nodes always.
It depends on the cardinality of the categorical feature.
It depends on the scale of the numerical feature.
Q12MCQ2 marks
Consider following statements: 1. The K-means algorithm aims to choose centroids that minimise the inertia. 2. The K-Means algorithm requires the number of clusters to be specified Choose the correct option of the following:
Both statement 1 and 2 are correct.
Statement 1 is correct but statement 2 is incorrect.
Statement 1 is incorrect but statement 2 is correct.
Both statement 1 and 2 are incorrect.
Q13MCQ2 marks
Hierarchical Clustering can also be called as
Centroid Based Clustering
Distribution-based Clustering
Density-based Clustering
Connectivity-Based Clustering
Q14MSQ2 marksselect all that apply
Which of the following options represents the major difference between HashingVectorizer and CountVectorizer?
HashingVectorizer does not store vocabulary, its object takes less spacecompared to CountVectorizer
CountVectorizer does not store vocabulary, its object takes less spacecompared to HashingVectorizer
HashingVectorizer alleviates any dependence with function calls performed onthe previous chunk of data in case of incremental learning
CountVectorizer alleviates any dependence with function calls performed onthe previous chunk of data in case of incremental learning
Q15MSQ2 marksselect all that apply
The partial_fit in sklearn’s Perceptron model helps to:
Iteratively train the model over a large dataset
Implement batch gradient descent
Update half of the weight parameters in each epoch.
Tracking progress of the model in each iteration.
Q16MSQ2 marksselect all that apply
Q17MSQ2 marksselect all that apply
Which of the following are hyper parameters in a decision tree in sklearn?
Number of features
Number of minimum samples to split
Height of the tree
Diameter of the tree
Q18SA2 marks
Enter the output (up to 2 decimal points) for the following block of code.
Enter the output (up to 2 decimal points) for the following block of code.
Q19MCQ3 marks
Consider the following code snippet:
Consider the following code snippet:
Which of the following is likely to be the correct output of the code given below?
Which of the following is likely to be the correct output of the code given below?
[0.85,0.1,0.05]
[2,3,1]
[0.85,0]
There are some mistakes in the 3rd /4th line of code, hence it will produceerror.
Q21MCQ3 marks
Which of the following is likely to be the correct output of the code given below?
Which of the following is likely to be the correct output of the code given below?
5
99
Given code will produce an error
0.96
Q22MCQ3 marks
The correct code block or blocks to set adaptive learning rate while using SGDRegressor will be:
Q23MCQ3 marks
Consider following statements: 1. Statement 1 : In order to extend ROC curve and ROC area to multi-label classification, it is necessary to binarize the output. 2. Statement 2: In SGDClassifier, setting warm_start=True retains the weight values of the model after max_iter and hence produce different results for each execution. Choose the correct option:
Statement 1 is correct but statement 2 is incorrect.
Statement 1 is incorrect but statement 2 is correct.
Statement 1 and statement 2 both are incorrect.
Statement 1 and statement 2 both are correct.
Q24MCQ3 marks
Which of the following options represents the correct output for the following block of code?
Which of the following options represents the correct output for the following block of code?
(11, 1)
(1, 11)
(10, 1)
(1, 10)
Q25MCQ3 marks
Which of the following options represents the correct output for the following block of code?
Which of the following options represents the correct output for the following block of code?
Which of the following options represents the correct output of the following block of code?
Which of the following options represents the correct output of the following block of code?
array([2])
array([1.5])
array([1])
array([0])
Q27MCQ3 marks
You have a regression problem to solve with following information: 1. All features are numerical. 2. The dataset has size of 40 GB. 3. The data has to be preprocessed. 4. After data preprocessing, train the model with gradient descent or its variations. Which of the following will perform the above task?
Perform one hot encoding followed by training with LinearRegression model(from sklearn.linear_model).
Perform standard scaling followed by training with KNeighborsRegressormodel (from sklearn.neighbors).
Perform min-max scaling followed by training with DecisionTreeRegressormodel (from sklearn.tree).
Perform min-max scaling followed by training with SGDRegressor model (fromsklearn.linear_model).
Q28MSQ3 marksselect all that apply
Consider the following code and select the correct options. (Note: Assume necessary imports.)
Consider the following code and select the correct options. (Note: Assume necessary imports.)
Scaled data have values in between [0, 1].
Regressor has three hidden layers.
Regressor has 150 hidden layers.
Regressor applies stochastic gradient decent to update the weights.
Q29SA3 marks
Refer the dataframe(df) given below and enter the correct output (up to 2 decimal points) for the following block of code:
Refer the dataframe(df) given below and enter the correct output (up to 2 decimal points) for the following block of code:
Q30SA3 marks
The output of the following block of code will be:
The output of the following block of code will be:
Q31SA3 marks
Enter the output (up to 2 decimal points) for the following block of code.
Enter the output (up to 2 decimal points) for the following block of code.
Q32SA3 marks
What is the correct output of the following block of code? [Note: LinearSVC implements “one-vs-the-rest” multi-class strategy]
What is the correct output of the following block of code? [Note: LinearSVC implements “one-vs-the-rest” multi-class strategy]
Q33MCQ4 marks
Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1? [Note: All 3 values should be correct in the same option]
Which of the following options represents all the correct precision, Recall, and accuracy values for the confusion matrix shown in Figure 1? [Note: All 3 values should be correct in the same option]
Which of the following options represents the correct output of the following block of code?
Which of the following options represents the correct output of the following block of code?
1
0
0.210
0.105
0.233
Q35MCQ4 marks
Rajesh wants to tune hyper parameters of an AdaBoost model for a classification problem with following specifications: 1. Base estimator as Decision trees classifier with max_depth=1. 2. Number of estimators range from 10 to 20 (both inclusive) at the interval of 1. 3. Cross validation =4. 4. Learning rate must vary between 0.1 to 1.0 (both inclusive) at the intervals of 0.1. 5. Train the best model on the entire training set. 6. Print score on test set. Which of the following code blocks will correctly execute Rajesh’s task? [Note: Assume necessary imports and variables for training and test sets.]
Q36MCQ4 marks
Asha wants to train a bagging classifier with following specifications: 1. Base estimator as k nearest neighbour classifier with default parameter values. 2. 70% of the data is used to create a bag of samples. 3. Create subsets of training set with replacement. 4. Take all features when bootstrapping. 5. Train the model on training set. 6. Print score on test set. Which of the following code blocks will correctly execute Asha’s task? [Note: Assume necessary imports and variables for training and test sets.]
Comprehension passage - the questions below it refer to this
Go through the code snippet given below and answer the given subquestions.
Go through the code snippet given below and answer the given subquestions.
Q37MSQ3 marksselect all that apply
Based on the given code, select all option which will be considered as input alpha value for our RidgeCV estimator.
0.03
0.7
0.01
0.1
1
Q38MCQ3 marks
Which of the following could be the possible output of print(results.best_score_)?
Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.
Here’s a structured summary of core topics, concepts, principles, and equations essential for the "Diploma Level: Machine Learning Practice" exam, along with Mermaid knowledge graphs to visualize relationships.