Machine Learning Interview Questions & Answers - MIQ
Machine Learning Interview Questions & Answers - MIQ
For example, Robots are coded in such a way that they can perform the tasks based on
data they collect from sensors. They automatically learn programs from data and improve
with experiences.
For example, if we have to explain to a kid that playing with fire can cause burns. There
are two ways we can explain this to a kid; we can show training examples of various fire
accidents or images of burnt people and label them as "Hazardous". In this case, a kid will
understand with the help of examples and not play with the fire. It is the form of Inductive
machine learning. The other way to teach the same thing is to let the kid play with the fire
and wait to see what happens. If the kid gets a burn, it will teach the kid not to play with
fire and avoid going near it. It is the form of deductive learning.
ADVERTISEMENT
ADVERTISEMENT
o In supervised machine learning, the machine is trained using labeled data. Then a
new dataset is given into the learning model so that the algorithm provides a
positive outcome by analyzing the labeled data. For example, we first require to
label the data which is necessary to train the model while performing classification.
o In the unsupervised machine learning, the machine is not trained using labeled
data and let the algorithms make the decisions without any corresponding output
variables.
o Machine learning is all about algorithms which are used to parse data, learn from
that data, and then apply whatever they have learned to make informed decisions.
o Deep learning is a part of machine learning, which is inspired by the structure of
the human brain and is particularly useful in feature detection.
o Supervised Learning
o Semi-supervised Learning
o Unsupervised Learning
o Transduction
o Reinforcement Learning
11) What do you understand by Reinforcement Learning
technique?
Reinforcement learning is an algorithm technique used in Machine Learning. It involves
an agent that interacts with its environment by producing actions & discovering errors or
rewards. Reinforcement learning is employed by different software and machines to
search for the best suitable behavior or path it should follow in a specific situation. It
usually learns on the basis of reward or penalty given for every action it performs.
Classification Regression
o Classification is the task to predict a o Regression is the task to predict a continuous quantity.
discrete class label.
o A classification having problem with two o A regression problem containing multiple input variables i
classes is called binary classification, and called a multivariate regression problem.
more than two classes is called multi-
class classification
o Classifying an email as spam or non- o Predicting the price of a stock over a period of time is
spam is an example of a classification regression problem.
problem.
Variance is an error due to too much complexity in the learning algorithm. It leads to the
algorithm being highly sensitive to high degrees of variation in the training data, which
can lead the model to overfit the data.
To optimally reduce the number of errors, we will need to tradeoff bias and variance.
Decision Trees
o Probabilistic Networks
o Neural Networks
o Support Vector Machines
o Nearest Neighbor
17) What are the three stages of building the hypotheses or model
in machine learning?
There are three stages to build hypotheses or model in machine learning:
o Model building
It chooses a suitable algorithm for the model and trains it according to the
requirement of the problem.
o Applying the model
It is responsible for checking the accuracy of the model through the test data.
o Model testing
It performs the required changes after testing and apply the final model.
On the other side, recall is the fraction of relevant instances that have been retrieved over
the total amount or relevant instances. The recall is also known as sensitivity.
o Classification
o Speech Recognition
o Regression
o Predict Time Series
o Annotate Strings
ADVERTISEMENT
ADVERTISEMENT
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:
o Elements are stored consecutively in the o New elements can be stored anywhere in
memory. memory.
o Size of the array must be declared at the o Size of a Linked list is variable. It grows at runtime
time of array declaration. whenever nodes are added to it.
Where,
33) Explain True Positive, True Negative, False Positive, and False
Negative in Confusion Matrix with an example.
o 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.
o 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.
o 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.
o 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.
36) What are the similarities and differences between bagging and
boosting in Machine Learning?
Similarities of Bagging and Boosting
o Although they are built independently, but for Bagging, Boosting tries to add new
models which perform well where previous models fail.
o Only Boosting determines the weight for the data to tip the scales in favor of the
most challenging cases.
o Only Boosting tries to reduce bias. Instead, Bagging may solve the problem of
over-fitting while boosting can increase it.
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.
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.
o Logical
It contains a set of Bayesian Clauses, which capture the qualitative structure of the
domain.
o Quantitative
It is used to encode quantitative information about the domain.
Reduced error pruning is the simplest version, and it replaces each node. If it is unable to
decrease predictive accuracy, one should keep it pruned. But, it usually comes pretty close
to an approach that would optimize for maximum accuracy.
ADVERTISEMENT
The functions factor() and as.factor() are used to convert variables into factors.
The navigation system can also be considered as one of the examples where we are using
machine learning to calculate a distance between two places using optimization
techniques. Surely, people are going to more engage with machine learning in the near
future.