Data Science with Python

Python is one of the best choice for Data Science professionals, if you are looking to build a career in data science then you must have a sound knowledge of Python. These interview questions can help you to build a solid foundation of your career.

Q.1 What do you understand by feature vectors?
We define a feature vector as an n-dimensional vector of numerical features that represent some object. In machine learning, feature vectors are primarily used to represent numeric or symbolic characteristics, referred as features, of an object in a mathematical, easily analyzable way.
Q.2 What are steps in making a decision tree?
The steps in making a decision tree -
1. Take the entire data set as input.
2. Look for a split that maximizes the separation of the classes. A split is any test that divides the data into two sets.
3. Apply the split to the input data.
4. Then re-apply steps 1 to 2 to the divided data.
5. Stop when you meet some stopping criteria.

This step is called pruning. Clean up the tree if you went too far doing splits.
Q.3 What do you understand by root cause analysis?
Root cause analysis has been developed to analyze industrial accidents but is now widely used in other areas. Root cause analysis is a problem-solving technique used for isolating the root causes of faults or problems. Such that a factor is referred as a root cause if its deduction from the problem-fault-sequence averts the final undesirable event from reoccurring.
Q.4 What do you understand by logistic regression?
Logistic Regression referred as the logit model. It is a technique to forecast the binary outcome from a linear combination of predictor variables.
Q.5 What do you understand by Recommender Systems?
Recommender systems are a subclass of information filtering systems that are users to predict the preferences or ratings that a user would give to a product.
Q.6 What do you understand by cross-validation?
Cross-Validation is a model validation technique used for evaluating how the outcomes of a statistical analysis will generalize to an independent data set. This technique is mainly used in backgrounds where the objective is forecast and one wants to estimate how accurately a model will accomplish in practice.
Q.7 How do you define Collaborative Filtering?
Collaborative Filtering refers to the process of filtering used by most recommender systems to find patterns and information by collaborating perspectives, numerous data sources, and several agents.
Q.8 Can you say that gradient descent methods at all times converge to a similar point?
No we cannot say that gradient descent methods at all times converge to a similar point, because in some cases they reach a local minima or a local optima point. You would not reach the global optima point since this is governed by the data and the starting conditions.
Q.9 What is the primary goal of A/B Testing?
A/B Testing is a statistical hypothesis testing used for randomized experiments with two variables, A and B. The objective of A/B testing is to detect any changes to a web page to maximize or increase the outcome of a strategy.
Q.10 How do you define Law of Large Numbers?
Law of Large Numbers is a theorem that describes the result of performing the same experiment a large number of times. Law of Large Numbers theorem forms the basis of frequency-style thinking. It infers that the sample mean, the sample variance and the sample standard deviation converge to what they are trying to estimate.
Q.11 What do you understand by confounding variables?
Confounding variables refers to extraneous variables in a statistical model that correlate directly or inversely with both the dependent and the independent variable. Such that the estimate fails to account for the confounding factor.
Q.12 What do you understand by star schema?
Star schema is a traditional database schema with a central table. Satellite tables map IDs to physical names or descriptions and can be connected to the central fact table using the ID fields; such that these tables are referred as lookup tables and are principally useful in real-time applications, as they save a lot of memory. Star schemas involve several layers of summarization to recover information faster.
Q.13 How often must an algorithm be updated?
We would want to update an algorithm when -

1. The model to evolve as data streams through infrastructure
2. The underlying data source is changing
3. There is a case of non-stationarity
Q.14 What do you understand by Eigenvalue and Eigenvector?
Eigenvectors are used for understanding linear transformations. In the process of data analysis, we usually calculate the eigenvectors for a correlation or covariance matrix. On the other hand Eigenvalues are the directions along which a particular linear transformation acts by flipping, compressing or stretching.
Q.15 What is the purpose of resampling ?
The purpose of resampling is done in the following cases -
1. Estimating the accuracy of sample statistics by using subsets of accessible data or drawing randomly with replacement from a set of data points
2. Substituting labels on data points when performing significance tests
3. Validating models by using random subsets
Q.16 What do you understand by selective bias?
We can define selection bias, as is a problematic situation in which error is introduced due to a non-random population sample.
Q.17 During Sampling, what are the types of biases that can occur?
The types of biases that can occur in sampling are - Selection bias, Under coverage bias and Survivorship bias
Q.18 What is survivorship bias?
Survivorship bias is the logical error of focusing aspects that support surviving some process and casually overlooking those that did not due to the lack of prominence. This can lead to wrong conclusions in numerous different means.
Q.19 How will you work towards a random forest?
Given the underlying principle of this technique several weak learners combined to provide a strong learner. Some of the steps involved are -
1. Build several decision trees on bootstrapped training samples of data 2. Secondly on each tree, each time a split is considered, a random sample of mm predictors is chosen as split candidates, out of all pp predictors
Rule of thumb: At each split m=p√m=p
Predictions: At the majority rule
Q.20 What is the usage of decorators?
Decorators in Python is primarily used to modify or inject code in functions or classes. By using decorators, we can wrap a class or function method call so that a piece of code can be executed before or after the execution of the original code. Also decorators can be used to check for permissions, modify or track the arguments passed to a method, logging the calls to a specific method, etc.
Get Govt. Certified Take Test