• +91 9723535972
  • info@interviewmaterial.com

Machine Learning Interview Questions and Answers

Machine Learning Interview Questions and Answers

Question - 31 : - How will you explain a linked list and an array?

Answer - 31 : -

An array is a datatype which is widely implemented as a default type, in almost all the modern programming languages. It is used to store data of a similar type.

But there are many use-cases where we don't know the quantity of data to be stored. For such cases, advanced data structures are required, and one such data structure is linked list.

There are some points which explain how the linked list is different from an array:

                  ARRAY

              LINKED LIST

  • An array is a group of elements of a similar data type.
  • Linked List is an ordered group of elements of the same type, which are connected using pointers.
  • Elements are stored consecutively in the memory.
  • New elements can be stored anywhere in memory.
  • An Array supports Random Access. It means that the elements can be accessed directly using their index value, like arr[0] for 1st element, arr[5] for 6th element, etc.
    As a result, accessing elements in an array is fast with constant time complexity of O(1).
  • Linked List supports Sequential Access. It means that we have to traverse the complete linked list, up to that element sequentially which element/node we want to access in a linked list.
    To access the nth element of a linked list, the time complexity is O(n).
  • Memory is allocated at compile time as soon as the array is declared. It is known as Static Memory Allocation.
  • Memory is allocated at runtime, whenever a new node is added. It is known as Dynamic Memory Allocation.
  • Insertion and Deletion operation takes more time in the array, as the memory locations are consecutive and fixed.
  • In case of a linked list, a new element is stored at the first free available memory location.
    Thus, Insertion and Deletion operations are fast in the linked list.
  • Size of the array must be declared at the time of array declaration.
  • Size of a Linked list is variable. It grows at runtime whenever nodes are added to it.

Question - 32 : - What do you understand by the Confusion Matrix?

Answer - 32 : - A confusion matrix is a table which is used for summarizing the performance of a classification algorithm. It is also known as the error matrix.

       
Where,
TN= True Negative
TP= True Positive
FN= False Negative
FP= False Positive

Question - 33 : - Explain True Positive, True Negative, False Positive, and False Negative in Confusion Matrix with an example.

Answer - 33 : -

True Positive
When a model correctly predicts the positive class, it is said to be a true positive.
For example, Umpire gives a Batsman NOT OUT when he is NOT OUT.
True Negative
When a model correctly predicts the negative class, it is said to be a true negative.
For example, Umpire gives a Batsman OUT when he is OUT.
False Positive
When a model incorrectly predicts the positive class, it is said to be a false positive. It is also known as 'Type I' error.
For example, Umpire gives a Batsman NOT OUT when he is OUT.
False Negative
When a model incorrectly predicts the negative class, it is said to be a false negative. It is also known as 'Type II' error.
For example, Umpire gives a Batsman OUT when he is NOT OUT.

Question - 34 : - What according to you, is more important between model accuracy and model performance?

Answer - 34 : -

Model accuracy is a subset of model performance. The accuracy of the model is directly proportional to the performance of the model. Thus, better the performance of the model, more accurate are the predictions.

Question - 35 : - What is Bagging and Boosting?

Answer - 35 : -

  • Bagging is a process in ensemble learning which is used for improving unstable estimation or classification schemes.
  • Boosting methods are used sequentially to reduce the bias of the combined model.

Question - 36 : - What are the similarities and differences between bagging and boosting in Machine Learning?

Answer - 36 : -

Similarities of Bagging and Boosting

  • Both are the ensemble methods to get N learns from 1 learner.
  • Both generate several training data sets with random sampling.
  • Both generate the final result by taking the average of N learners.
  • Both reduce variance and provide higher scalability.
Differences between Bagging and Boosting

  • Although they are built independently, but for Bagging, Boosting tries to add new models which perform well where previous models fail.
  • Only Boosting determines the weight for the data to tip the scales in favor of the most challenging cases.
  • Only Boosting tries to reduce bias. Instead, Bagging may solve the problem of over-fitting while boosting can increase it.

Question - 37 : - What do you understand by Cluster Sampling?

Answer - 37 : -

Cluster Sampling is a process of randomly selecting intact groups within a defined population, sharing similar characteristics. Cluster sample is a probability where each sampling unit is a collection or cluster of elements.

For example, if we are clustering the total number of managers in a set of companies, in that case, managers (sample) will represent elements and companies will represent clusters.

Question - 38 : - What do you know about Bayesian Networks?

Answer - 38 : -

Bayesian Networks also referred to as 'belief networks' or 'casual networks', are used to represent the graphical model for probability relationship among a set of variables.

For example, a Bayesian network can be used to represent the probabilistic relationships between diseases and symptoms. As per the symptoms, the network can also compute the probabilities of the presence of various diseases.

Efficient algorithms can perform inference or learning in Bayesian networks. Bayesian networks which relate the variables (e.g., speech signals or protein sequences) are called dynamic Bayesian networks.

Question - 39 : - Which are the two components of Bayesian logic program?

Answer - 39 : -

A Bayesian logic program consists of two components:

Logical
  • It contains a set of Bayesian Clauses, which capture the qualitative structure of the domain.
Quantitative
  • It is used to encode quantitative information about the domain.

Question - 40 : - Describe dimension reduction in machine learning.

Answer - 40 : -

Dimension reduction is the process which is used to reduce the number of random variables under considerations.

Dimension reduction can be divided into feature selection and extraction.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners