ML Important Questions
ML Important Questions
i) Let “xxx” be some class label. We denote by pxxx the proportion of examples with class label “xxx”. Calculate
Entropy,
ii)Let S be a set of examples, A be a feature (or, an attribute), Sv be the subset of S with A = v, and Values (A) be
the set of all possible values of A. Calculate the information gain of an attribute A relative to the set S, denoted
by Gain (S, A) .
iii) Calculate the Gini index of S.
Q.8 (a) Explain working of Random Forest algorithm, give its complete python code. Specify its Pros
and Cons.
(b) What is a Decision tree? Explain Entropy, Information gain and Gini impurity/index with
formula for each.
Q.9(a) Explain the working of Naïve Bayes' Classifier. Consider the data file of email “spam.csv”
having two columns Category and Message, classify the emails into two categories spam (good email)
and ham (bad email). Give the complete code.
(b) What is curse of Dimensionality Reduction? How PCA is used of Dimensionality Reduction?
Q10. (a) Give the complete implementation of KNN classifier on ‘iris.csv’ dataset (Sepal Length, Sepal
Width, Petal Length, Petal Width) also write the code for plotting confusion matrix and classifier
Report.
(b) What is the objective of K Means method. How does the K-Means algorithm work.Give its
complete code
Q.13 (a) Under what circumstances Precision, or Recall are better performance metrics in comparison with
Accuracy? Give an example each for the situations where “Recall is a more important evaluation metric than
Precision”and “Precision is a more important evaluation metric than Recall”
(b) What is a Decision tree? Explain its
advantage and disadvantage. By taking example explain
Entropy, Information gain and Gini impurity.
Q14. (a) Explain Support Vector Machine. Define the terms Hyperplane, Support Vectors, Kernel, Hard
and Soft Margin.
(b) What is Activation functions? Explain any three
Q15 (a) Explain Gradient Descent and its types. What are the different steps used in Gradient Descent Algorithm.
(b) What do you mean by Feature selection? Explain various methods of feature selection.
Q16. (a) Explain various clustering methods. Explain k means clustering algorithm with example
(b) Explain k nearest neighbor algorithm.
Q.20 (a) Explain in brief binary, multi-class, multi-label, and imbalanced classifications.
(b) What is the difference between linear and logistic regression? When would you use logistic
regression instead of linear regression?
Q 21 (a) What is a Decision tree? Explain its advantage and disadvantage. By taking example
explain Entropy, Information gain and Gini impurity with formula for each.
(b)How does Random Forest algorithm work, give its complete code. Give its advantage and
Applications.
Q22 (a) Explain the working of Naïve Bayes' Classifier. For the file “spam.csv” of emails , classify
the emails into two categories spam(good email) and ham(bad email).
(b) Give the complete implementation of KNN classifier also write the code for plotting
confusion matrix and classifier Report
Q. 23 (a)What is the role of the Activation functions in Neural Networks? Explain any two
(b)Explain ANN diagrammatically. Give its advantage and disadvantage.
Q. 26 (a)What is the difference between supervised and unsupervised learning, and where does
clustering fit in? Describe various clustering techniques briefly.
(b)What is the objective of K Means method. How does the K-Means algorithm work.Give its
complete code.
Q.28 (a) What is difference between Linear and Logistic Regression. Consider a file “home .csv”,
build a machine learning model that can predict home prices based on square feet area
using Linear regression. Give the complete code in python.
Q.29 (a) Consider a binary classification problem of car making company that has recently launched a
new SUV car. So the company wanted to check how many users from the dataset, wants to
purchase the car. Build a Machine Learning model using the Logistic regression algorithm that
will predict the purchased variable (Dependent Variable) by using age and salary
(Independent variables).Given below is sample data set “carpurchase.csv”.
Q.30 (a) What is a Decision tree? Explain its advantage and disadvantage. By taking example explain
Entropy, Information gain and Gini impurity.
(b) What is Pruning in Decision Trees, and How Is It Done?
Q31 (a) Explain the working of Naïve Bayes' Classifier. For the file “spam.csv” of emails , use
MultinomialNB and classify the emails into two categories spam(good email) and ham(bad
email).
(b) Explain Support Vector Machine. Define the terms Hyperplane, Support Vectors, Kernel,
Hard and Soft Margin.
Q. 32 (a)What is the role of the Activation functions in Neural Networks? Give the names of
three popular Activation Functions used in Neural Networks.
(b)Explain hebbian learning rule. Implement AND gate using hebbian rule.
Q. 33 (a) Explain Gradient Descent and its types. What are the different steps used in Gradient
Descent Algorithm.
(b)Differentiate Single layer and Multi- layered perceptron
(b)What do you mean by Feature selection? Explain Filter methods, Wrapper methods
and
Embedded methods of feature selection.