Data Science and Machine Learning - MCQ

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Unit 6

1. A graph is a set of points, called?


A. Nodes
B. Edge
C. fields
D. lines
View Answer
Ans : A

Explanation: A graph is a set of points, called nodes or vertices, which are


interconnected by a set of lines called edges

2. Graph consists of a?
A. non-empty set of vertices
B. empty set of vertices
C. Both A and B
D. None of the above
View Answer
Ans : A

Explanation: Graph consists of a non-empty set of vertices or nodes V and a set of


edges E.

3. Number of edges incident with the vertex V is called?


A. Degree of a Graph
B. Handshaking Lemma
C. Degree of a Vertex
D. None of the above
View Answer
Ans : C

Explanation: Degree of a Vertex − The degree of a vertex V of a graph G (denoted by


deg (V)) is the number of edges incident with the vertex V.

4. Which of the following is true about Handshaking Lemma?


A. In Handshaking lemma, If the degree of a vertex is even, the vertex is
called an even vertex
B. The degree of a graph is the largest vertex degree of that graph.
C. The degree of a vertex is odd, the vertex is called an odd vertex.
D. The sum of all the degrees of all the vertices is equal to twice the number
of edges.
View Answer
Ans : D

Explanation: The Handshaking Lemma : In a graph, the sum of all the degrees of all the
vertices is equal to twice the number of edges.

5. What is Null Graph?


A. A null graph has no nodes
B. null graph has no edges
C. null graph has no odd vertex
D. null graph has no even vertex
View Answer
Ans : B

Explanation: A null graph has no edges.

6. If in a graph multiple edges between the same set of vertices are


allowed, it is called?
A. Hamiltonian Graphs
B. Simple graph
C. Multi graph
D. Euler Graphs
View Answer
Ans : C

Explanation: If in a graph multiple edges between the same set of vertices are allowed, it
is called Multigraph.

7. The graph in which, there is a closed trail which includes every edge
of the graph is known as?
A. Hamiltonian Graphs
B. Euler Graphs
C. Planar graph
D. Directed Graph
View Answer
Ans : B

Explanation: A connected graph is called an Euler graph, if there is a closed trail which
includes every edge of the graph
8. In a 7-node directed cyclic graph, the number of Hamiltonian cycle
is to be
A. 180
B. 720
C. 360
D. 540
View Answer
Ans : C

Explanation: A Hamiltonian cycle in a connected graph G is defined as a closed path


that traverses every vertex of G exactly once except the starting vertex, at which the
path also terminates. In an n-complete graph, there are (n-1)!/2 hamiltonian cycles and
so the answer is 360.

9. If G is the forest with 54 vertices and 17 connected components, G


has _______ total number of edges.
A. 35
B. 36
C. 37
D. 38
View Answer
Ans : C

Explanation: Here we are given a forest with 54 vertices and 17 components. A


component is itself a tree and since there are 17 components means that every
component has a root, therefore we have 17 roots. Each new vertex of the forest
contributes to a single edge to a forest. So for remaining 54-17 = 37 vertices we can
have m-n=37 edges. Hence, answer is 37.

10. Triangle free graphs have the property of clique number is


__________
A. More than 10
B. less than 5
C. equal to 5
D. greater than 3
View Answer
Ans : A

Explanation: In an undirected triangle-free graph no three vertices can form a triangle of


edges. It can be described as graphs with clique number less than 2 and the graphs with
girth greater than 4.
1. What is the number of edges present in a complete graph having n vertices?
a)(n*(n+1))/2
b)(n*(n-1))/2
c)n

Answer:b
Explanation: Number of ways in which every vertex can be connected to each
other is nC2.

Facebook is an example of undirected graph

Twitter us example of direct graph(follower)

By clustering of graph we find communities in social networks.

k-means clustering is also known as non-hierarchical clustering.

5 The given Graph is regular.

Answer:yes
Explanation: In a regular graph, degrees of all the vertices are equal. In the given
graph the degree of every vertex is 3.

A graph with all vertices having equal degree is known as a __________


a)MultiGraph
b)RegularGraph
c)SimpleGraph
d)CompleteGraph

Answer:b
Explanation: The given statement is the definition of regular graphs.

k-means clustering is also known as non-hierarchical clustering.


Unit 5#CLUSTERING
1. The goal of clustering is to-
A. Divide the data points into groups
B. Classify the data point into different classes
C. Predict the output values of input data points
D. All of the above

2. Clustering is a-
A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. None

3. Which of the following clustering algorithms suffers from the problem of convergence
at local optima?
A. K- Means clustering
B. Hierarchical clustering
C. Diverse clustering
D. All of the above

4. Which version of the clustering algorithm is most sensitive to outliers?


A. K-means clustering algorithm
B. K-modes clustering algorithm
C. K-medians clustering algorithm
D. None

5. Which of the following is a bad characteristic of a dataset for clustering analysis-


A. Data points with outliers
B. Data points with different densities
C. Data points with non-convex shapes
D. All of the above

6. For clustering, we do not require-


A. Labeled data
B. Unlabeled data
C. Numerical data
D. Categorical data

7. Which of the following is an application of clustering?


A. Biological network analysis
B. Market trend prediction
C. Topic modeling
D. All of the above

8. On which data type, we can not perform cluster analysis?


A. Time series data
B. Text data
C. Multimedia data
D. None
9. Netflix’s movie recommendation system uses-
A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. All of the above

10. The final output of Hierarchical clustering is-


A. The number of cluster centroids
B. The tree representing how close the data points are to each other
C. A map defining the similar data points into individual groups
D. All of the above

11. Which of the step is not required for K-means clustering?


A. a distance metric
B. initial number of clusters
C. initial guess as to cluster centroids
D. None

12. Which is the following is wrong?


A. k-means clustering is a vector quantization method
B. k-means clustering tries to group n observations into k clusters
C. k-nearest neighbor is same as k-means
D. None

13. Which of the following uses merging approach?


A. Hierarchical clustering
B. Partitional clustering
C. Density-based clustering
D. All of the above

14. Which of the following is a method of choosing the optimal number of clusters for k-
means?
A. cross-validation
B. the silhouette method
C. the elbow method
D. All of the above

15. When does k-means clustering stop creating or optimizing clusters?


A. After finding no new reassignment of data points
B. After the algorithm reaches the defined number of iterations
C. Both A and B
D. None

16. Which of the following clustering algorithm follows a top to bottom approach?
A. K-means
B. Divisible
C. Agglomerative
D. None
17. Which algorithm does not require a dendrogram?
A. K-means
B. Divisible
C. Agglomerative
D. All of the above

18. Which of the following clustering algorithms suffers from the problem of convergence
at local optima?
A. Takes each data point as an individual cluster
B. Goes on making clusters until it reaches to an optimal number of cluster
C. Follows a top to bottom approach
D. All of the above

19. For topic modeling what should we use?


A. Random forest
B. Support vector machine
C. K-means
D. K-nearest neighbors

20. What is a dendrogram?


A. A hierarchical structure
B. A diagram structure
C. A graph structure
D. None

Unit 2 #data pre-processing iz Category

1. What are the different types of attributes?

A. Nominal
B. Ordinal
C. Spacial
D. All of the Above

2. Examples of Nominal can be:


A. ID Numbers, eye color, zip codes
B. Rankings, taste of potato chips, grades, height
C. Calendar dates, temperatures in celsius or Fahrenheit, phone numbers
D. The temperature in Kelvin, length, time, counts

3. Examples of Ordinal can be:


A. ID Numbers, eye color, zip codes
B. Rankings, taste of potato chips, grades, height
C. Calendar dates, temperatures in Celsius or Fahrenheit, phone numbers
D. Temperature in Kelvin, length, time, counts

4. Examples of Interval can be:


A. ID Numbers, eye color, zip codes
B. Rankings, taste of potato chips, grades, height
C. Calendar dates, temperatures in celsius or Fahrenheit
D. Temperature in Kelvin, length, time, counts

5. The type of a Nominal attribute depends on which of the following


properties:

A. Distinctness & order


B. Distinctness, order & addition
C. Distinctness
D. All 4 properties

6. The type of an Interval attribute depends on which of the following


properties:

A. Distinctness & order


B. Distinctness, order & addition
C. Distinctness
D. All 4 properties

7. The type of an Ordinal attribute depends on which of the following


properties:

A. Distinctness & order


B. Distinctness, order & addition
C. Distinctness
D. All 4 properties
8. Important Characteristics of Structured Data are:

A. Generality
B. Dimensionality
C. Resolution
D. All of the Above

9. What are some examples of data quality problems:

A. Noise and outliers


B. Duplicate data
C. Missing values
D. All of the Above

10. Which Method is used for encoding the categorical variables?


A. LabelEncoder
B. OneHotEncoder
C. CategoryEncoder
D. All of the Above

11. Under fitting happens due to -


A. A fewer number of features
B. Data has a high variance
C. No use of regularization
D. All of the Above

12. Over fitting happens due to -


A. Imbalance in data
B. Noise in data
C. Data has a high variance
D. All of the Above

13. Why do we need feature transformation?


A. Converting non-numeric features into numeric
B. Resizing inputs to a fixed size
C. Both A and B
D. None
14. Which of the following is true about outliers -
A. Data points that deviate a lot from normal observations
B. Can reduce the accuracy of the model
C. Both A and B
D. None
15. Some of the Imputation methods are -
A. Imputation with mean/median
B. Imputing with random numbers
C. Imputing with one
D. All of the above

16. Which algorithm does not require feature scaling?


A. Naive Bayes
B. Decision Tree
C. B. Decision Tree
D. None

17. The purpose of feature scaling is to -


A. Accelerating the training time
B. Getting better accuracy
C. Both A and B
D. None

18. In standardization, the features will be rescaled with -


A. Mean 0 and Variance 0
B. Mean 0 and Variance 1
C. Mean 1 and Variance 0
D. Mean 1 and Variance 1

19. What is a Dummy Variable Trap?


A. Multicollinearity among the dummy variables
B. One variable predicts the value of other
C. Both A and B
D. None of the Above

20. Which of the following(s) is/are features scaling techniques?


A. Standardization
B. Normalization
C. Min-Max Scaling
D. All of the Above

21. The characteristic of a good dataset is-


A. Sufficiently large for getting meaningful predictions
B. The bias is lower
C. Both A and B
D. None

22. How to handle the missing values in the dataset?


A. Dropping the missing rows or columns
B. Imputation with mean/median/mode value
C. Taking missing values into a new row or column
D. All of the above

23. The correct way of pre processing the data should be-
A. Imputation ->feature scaling-> training
B. Feature scaling->imputation->training
C. Feature scaling->label encoding->training
D. None

24. Which one is a feature extraction example?


A. Constructing a bag of words model
B. Imputation of missing values
C. Principal component analysis
D. All of the Above

25. Which of these techniques is used for normalization in text mining?


A. Stemming
B. Stop words removal
C. Lemmatization
D. All of the above

26. What stemming refers to in text mining?


A. Reducing a word to its root
B. Defining the parts of speech of a word
C. Converting sentences to words
D. None

27. Which is the correct order for pre processing in Natural Language
Processing?
A. tokenization ->stemming ->lemmatization
B. lemmatization ->tokenization ->stemming
C. stemming ->tokenization ->lemmatization
D. None

28. Bag of Words in text pre processing is a-


A. Feature scaling technique
B. Feature extraction technique
C. Feature selection technique
D. None

29. In text mining, how the words ‘lovely’ is converted to ‘love’-


A. By stemming
B. By tokenization
C. By lemmatization
D. None

30. Stop words are-


A. Words frequently found in a document
B. Words not important for text mining
C. Words having no use in prediction
D. All of the Above

Unit 3 and 4 #Regression

1 .Linear regression is-The regression line changes due to outliers. So, it is sensitive to
outliers.
2 Which of the following evaluation metrics can be used for Regression?
Regression gives continuous output. So, we use Mean-Squared-Error or MSE as
evaluation metric. Rest are used in classification.
3. If you fit 2 degree polynomial in linear regression-Higher degree
polynomials have chances to underfit at a lower degree.
4. What will happen when you increase the size of training data?
Bias increases and Variance decreases

5. Which methods are used to find the best fit line in linear regression?
Least Square Error

6. Regression is a-Supervised Learning Algorithm


7. Which of the following is/are true about Normal Equation?
The equation itself choose the learning rate
B. Becomes slower with a large number of features
C. Iteration is not required
D. All of them
8. Suppose you have to predict the salary of employees from their experience.
This is a- Regression task
9. Which of the following is a regression algorithm?
A. Linear Regression
B. Logistic Regression
C. Both A and B
D. None
10 What would be the best regression model for more than one independent
variable? Multiple Linear Regression

11 Suppose you have observed that you data has an exponential growth tendency.
Then what regression model you should use-Polynomial regression

12. Can we perform linear regression with a neural network? Ans yes

13 If you get a poor accuracy using a simple linear regression model. What will be the
cause behind it-A. The data was not linear

B. The data has outliers


C. Both A or B depending on the context
D. None
14 If your data grows in a non-linear fashion. Which model won’t perform well? Simple
linear regression

15. What is a support vector? The distance between two boundary data points
16 What is a kernel? A function that maps the value from one dimension to the other

17 What does epsilon represent in Support Vector Regression? Error threshold

#CLASSIFICATION

Which of the following metrics are used to evaluate classification models?

A. Area under the ROC curve


B. F1 score
C. Confusion matrix
D. All of the above

Which one is a classification algorithm?

A. Logistic regression
B. Linear regression
C. Polynomial regression
D. None

Classification is-Supervised learning

A classifier-

Inputs a vector of continuous values and outputs a single discrete value

B. Inputs a vector of discrete values and outputs a single discrete value


C. Both A and B
D. None

Classification is appropriate when you-

A. Try to predict a continuous valued output

B. Try to predict a class or discrete output


C. Both A and B for different contexts
D. None

With the help of a confusion matrix, we can compute-


A. Recall
B. Precision
C. Accuracy
D. All of the above

False negatives are-


Predicted negatives that are actually positives

Suppose your classification model predicted true for a class which actual value
was false. Then this is a-False positive

Which of the following is a lazy learning algorithm? KNN

What is the most widely used distance metric in KNN? Euclidean distance

Which of the following is the best algorithm for text classification? Naive Bayes

What does k stand for in the KNN algorithm?- Number of neighbors

Support Vector Machine is-a discriminative classifier

What are hyperplanes? Decision boundaries

What is a kernel? A function that maps the value from one dimension to the other

Why Naive Bayes is called naive? Because its assumption may or may not true

How does a decision tree work? Maximizes the information gain and minimizes the
entropy

Suppose you have a dataset that is randomly distributed. What will be the best
algorithm for that dataset? Decision tree

Which pair of the algorithms are similar in operation? Decision tree and Random
forest
Which metric is not used for evaluating classification models? Mean absolute
error

REINFORCEMENT LEARNING

Reinforcement learning is-

A. Unsupervised learning
B. Supervised learning
C. Award based learning
D. None

Which of the following is an application of reinforcement learning?

A. Topic modeling
B. Recommendation system
C. Pattern recognition
D. Image classification

Upper confidence bound is a

A. Reinforcement algorithm
B. Supervised algorithm
C. Unsupervised algorithm
D. None

Which of the following is true about reinforcement learning?

A. The agent gets rewards or penalty according to the action


B. It’s an online learning
C. The target of an agent is to maximize the rewards
D. All of the above

You have a task which is to show relative ads to target users. Which algorithm
you should use for this task?

A. K means clustering
B. Naive Bayes
C. Support vector machine
D. Upper confidence bound

Hidden Markov Model is used in-

A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. All of the above

Which algorithm is used in robotics and industrial automation?

‘A. Thompson sampling


B. Naive Bayes
C. Decision tree
D. All of the above

Thompson sampling is a-

A. Probabilistic algorithm
B. Based on Bayes inference rule
C. Reinforcement learning algorithm
D. All of the above

Google translator is an application of-

A. Sentiment analysis
B. Information extraction
C. Information retrieval
D. Machine translation

Which is the following is true about neurons?

A. A neuron has a single input and only single output


B. A neuron has multiple inputs and multiple outputs
C. A neuron has a single input and multiple outputs
D. All of the above

Which of the following is an example of deep learning?

A. Self-driving cars
B. Pattern recognition
C. Natural language processing
D. All of the above
Which of the following statement is not correct?

A. Neural networks mimic the human brain


B. It can only work for a single input and a single output
C. It can be used in image processing
D. None

Autoencoder is an example of-

A. Deep learning
B. Machine learning
C. Data mining
D. None

Neural networks can be used in-

A. Regression problems
B. Classification problems
C. Clustering problems
D. All of the above

For an image classification task, which of the following deep learning algorithm
is best suited?

A. Recurrent Neural Network


B. Multi-Layer Perceptron
C. Convolution Neural Network
D. All of the above
Which of the following neural networks has a memory?

A. 1D CNN
B. 2D CNN
C. LSTM
D. None

You might also like