machine learning

[vc_row][vc_column][vc_custom_heading text=”Interview Questions and Answers” font_container=”tag:h2|text_align:center” css=”.vc_custom_1561618668047{background-color: #5fa4e4 !important;}”][/vc_column][/vc_row][vc_row full_width=”stretch_row” css=”.vc_custom_1559286923229{background-color: #f6f6f7 !important;}”][vc_column width=”1/2″][vc_tta_accordion color=”peacoc” active_section=”1″][vc_tta_section title=”How would you explain Machine Learning to a school-going kid?” tab_id=”1559286383409-ab730398-6c03″][vc_column_text]

  • Suppose your friend invites you to his party where you meet total strangers. Since you have no idea about them, you will mentally classify them on the basis of gender, age group, dressing, etc.
  • In this scenario, the strangers represent unlabeled data and the process of classifying unlabeled data points is nothing but unsupervised learning.
  • Since you didn’t use any prior knowledge about people and classified them on-the-go, this becomes an unsupervised learning problem.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What do you understand by selection bias?” tab_id=”1559286522681-3bf94e12-e7b7″][vc_column_text]

  • It is a statistical error that causes a bias in the sampling portion of an experiment.
  • The error causes one sampling group to be selected more often than other groups included in the experiment.
  • Selection bias may produce an inaccurate conclusion if the selection bias is not identified.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What do you understand by Precision and Recall?” tab_id=”1561382593569-b1979b66-b066″][vc_column_text]Let me explain you this with an analogy:

  • Imagine that, your girlfriend gave you a birthday surprise every year for the last 10 years. One day, your girlfriend asks you: ‘Sweetie, do you remember all the birthday surprises from me?’
  • To stay on good terms with your girlfriend, you need to recall all the 10 events from your memory. Therefore, recall is the ratio of the number of events you can correctly recall, to the total number of events.
  • If you can recall all 10 events correctly, then, your recall ratio is 1.0 (100%) and if you can recall 7 events correctly, your recall ratio is 0.7 (70%)

[/vc_column_text][/vc_tta_section][vc_tta_section title=”Explain false negative, false positive, true negative and true positive with a simple example.” tab_id=”1561382595833-dd54d407-26c0″][vc_column_text]Let’s consider a scenario of a fire emergency:

  • True Positive: If the alarm goes on in case of a fire.
    Fire is positive and prediction made by the system is true.
  • False Positive: If the alarm goes on, and there is no fire.
    System predicted fire to be positive which is a wrong prediction, hence the prediction is false.
  • False Negative: If the alarm does not ring but there was a fire.
    System predicted fire to be negative which was false since there was fire.
  • True Negative: If the alarm does not ring and there was no fire.
    The fire is negative and this prediction was true.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is a Confusion Matrix?” tab_id=”1561382597303-5168678c-55b9″][vc_column_text]

  • TN = True Negative
  • TP = True Positive
  • FN = False Negative
  • FP = False Positive

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is the difference between inductive and deductive learning?” tab_id=”1561382598718-1fee5a6b-29dd”][vc_column_text]

  • Inductive learning is the process of using observations to draw conclusions 
  • Deductive learning is the process of using conclusions to form observations 

[/vc_column_text][/vc_tta_section][vc_tta_section title=”Is it better to have too many false positives or too many false negatives? Explain.” tab_id=”1561382602352-48d936eb-64df”][vc_column_text]It depends on the question as well as on the domain for which we are trying to solve the problem. If you’re using Machine Learning in the domain of medical testing, then a false negative is very risky, since the report will not show any health problem when a person is actually unwell. Similarly, if Machine Learning is used in spam detection, then a false positive is very risky because the algorithm may classify an important email as spam.[/vc_column_text][/vc_tta_section][vc_tta_section title=”Which is more important to you – model accuracy or model performance?” tab_id=”1561382603416-a2e0c7df-e6f8″][vc_column_text]Well, you must know that model accuracy is only a subset of model performance. The accuracy of the model and performance of the model are directly proportional and hence better the performance of the model, more accurate are the predictions.[/vc_column_text][/vc_tta_section][vc_tta_section title=” What is the difference between Gini Impurity and Entropy in a Decision Tree?” tab_id=”1561382604362-41fc1dd4-d143″][vc_column_text]

  • Gini Impurity and Entropy are the metrics used for deciding how to split a Decision Tree.
  • Gini measurement is the probability of a random sample being classified correctly if you randomly pick a label according to the distribution in the branch.
  • Entropy is a measurement to calculate the lack of information. You calculate the Information Gain (difference in entropies) by making a split. This measure helps to reduce the uncertainty about the output label.

[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][vc_column width=”1/2″][vc_tta_accordion color=”peacoc” active_section=”1″][vc_tta_section title=”What is the difference between Entropy and Information Gain?” tab_id=”1561382561432-7f73ef2a-cc67″][vc_column_text]

  • Entropy is an indicator of how messy your data is. It decreases as you reach closer to the leaf node.
  • The Information Gain is based on the decrease in entropy after a dataset is split on an attribute. It keeps on increasing as you reach closer to the leaf node.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is Overfitting? And how do you ensure you’re not overfitting with a model?” tab_id=”1561382561455-654071d3-eb53″][vc_column_text]Over-fitting occurs when a model studies the training data to such an extent that it negatively influences the performance of the model on new data.

This means that the disturbance in the training data is recorded and learned as concepts by the model. But the problem here is that these concepts do not apply to the testing data and negatively impact the model’s ability to classify the new data, hence reducing the accuracy on the testing data.

Three main methods to avoid overfitting:

  • Collect more data so that the model can be trained with varied samples.
  • Use ensembling methods, such as Random Forest. It is based on the idea of bagging, which is used to reduce the variation in the predictions by combining the result of multiple Decision trees on different samples of the data set.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”How would you screen for outliers and what should you do if you find one?” tab_id=”1561382611424-56181e07-6453″][vc_column_text]The following methods can be used to screen outliers:

  1. Boxplot: A box plot represents the distribution of the data and its variability. The box plot contains the upper and lower quartiles, so the box basically spans the Inter-Quartile Range (IQR). One of the main reasons why box plots are used is to detect outliers in the data. Since the box plot spans the IQR, it detects the data points that lie outside this range. These data points are nothing but outliers.
  2. Probabilistic and statistical models: Statistical models such as normal distribution and exponential distribution can be used to detect any variations in the distribution of data points. If any data point is found outside the distribution range, it is rendered as an outlier.
  3. Linear models: Linear models such as logistic regression can be trained to flag outliers. In this manner, the model picks up the next outlier it sees.
  4. Proximity-based models: An example of this kind of model is the K-means clustering model wherein, data points form multiple or ‘k’ number of clusters based on features such as similarity or distance. Since similar data points form clusters, the outliers also form their own cluster. In this way, proximity-based models can easily help detect outliers.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What are collinearity and multicollinearity?” tab_id=”1561382613753-7c9c9136-4ca1″][vc_column_text]

  • Collinearity occurs when two predictor variables (e.g., x1 and x2) in a multiple regression have some correlation.
  • Multicollinearity occurs when more than two predictor variables (e.g., x1, x2, and x3) are inter-correlated.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What do you understand by Eigenvectors and Eigenvalues?” tab_id=”1561382614729-6b63842b-62b1″][vc_column_text]

  • Eigenvectors: Eigenvectors are those vectors whose direction remains unchanged even when a linear transformation is performed on them.
  • Eigenvalues: Eigenvalue is the scalar that is used for the transformation of an Eigenvector.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is A/B Testing?” tab_id=”1561382615672-42dd66a8-6425″][vc_column_text]

  • A/B is Statistical hypothesis testing for randomized experiment with two variables A and B. It is used to compare two models that use different predictor variables in order to check which variable fits best for a given sample of data.
  • Consider a scenario where you’ve created two models (using different predictor variables) that can be used to recommend products for an e-commerce platform.
  • A/B Testing can be used to compare these two models to check which one best recommends products to a customer.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is Cluster Sampling?” tab_id=”1561382616984-e392adb7-34cd”][vc_column_text]

  • It is a process of randomly selecting intact groups within a defined population, sharing similar characteristics.
  • Cluster Sample is a probability sample where each sampling unit is a collection or cluster of elements.
  • For example, if you’re clustering the total number of managers in a set of companies, in that case, managers (samples) will represent elements and companies will represent clusters.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”Running a binary classification tree algorithm is quite easy. But do you know how the tree decides on which variable to split at the root node and its succeeding child nodes?” tab_id=”1561382618152-4fb6fc3a-9883″][vc_column_text]

  • Measures such as, Gini Index and Entropy can be used to decide which variable is best fitted for splitting the Decision Tree at the root node.
  • We can calculate Gini as following:
    Calculate Gini for sub-nodes, using the formula – sum of square of probability for success and failure (p^2+q^2).
  • Calculate Gini for split using weighted Gini score of each node of that split
  • Entropy is the measure of impurity or randomness in the data, (for binary class):

Entropy - Machine Learning Interview Questions - EdurekaHere p and q is the probability of success and failure respectively in that node.[/vc_column_text][/vc_tta_section][vc_tta_section title=”How are NumPy and SciPy related?” tab_id=”1561382619930-3767e1f0-f3d6″][vc_column_text]

  • NumPy is part of SciPy.
  • NumPy defines arrays along with some basic numerical functions like indexing, sorting, reshaping, etc.
  • SciPy implements computations such as numerical integration, optimization and machine learning using NumPy’s functionality.

[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][/vc_row][vc_row full_width=”stretch_row” overlay_color=”rgba(12,12,12,0.58)” css=”.vc_custom_1528340415800{padding-bottom: 104px !important;background-image: url(https://wordpresslms.thimpress.com/wp-content/uploads/sites/4/2017/06/layer-532.jpg?id=231) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}” el_class=”overflow-visible become-teacher”][vc_column width=”1/2″][vc_column_text el_class=”align-right”]

Please login to send your request!
[/vc_column_text][/vc_column][vc_column width=”1/2″ el_class=”talk”][vc_column_text el_class=”thim-content-talk”]I’m a Copywriter in a Digital Agency, I was searching for courses that’ll help me broaden my skill set. Before signing up for Rob’s.[/vc_column_text][/vc_column][/vc_row]

WhatsApp us