CloudyML - Data Science & Analytics
46.6K subscribers
260 photos
54 videos
33 files
1.1K links
My Assignment Driven Data Science Courses
https://linktr.ee/cloudyml

My LinkedIn profile
https://www.linkedin.com/in/akashraj001

My Instagram
https://www.instagram.com/cloudyml.akash
Download Telegram
Today's Interview Quest

Company Name - Tiger Analytics
Role - Data Scientist



Q. Explain the difference between an array and a linked list.

A. An array is a collection of elements of a similar data type. A linked list is a collection of objects known as a node where node consists of two parts, i.e., data and address. Array elements store in a contiguous memory location. Linked list elements can be stored anywhere in the memory or randomly stored.


Q. How do you ensure you are not overfitting a model?

A. Keep your model simple. Use regularization technique. Use cross-validation.


Q. How do you fix high variance in a model?

A. You can reduce High variance, by reducing the number of features in the model. There are several methods available to check which features don't add much value to the model and which are of importance. Increasing the size of the training set can also help the model generalize.


Q. What are hyperparameters? How do they differ from model parameters?

A. Model Parameters: These are the parameters in the model that must be determined using the training data set. These are the fitted parameters. Hyperparameters: These are adjustable parameters that must be tuned in order to obtain a model with optimal performance.



Q. You are told that your regression model is suffering from multicollinearity. How do verify this is true and build a better model?

A. A simple method to detect multicollinearity in a model is by using something called the variance inflation factor or the VIF for each predicting variable. We can follow these steps in order to build a better model:
Remove some of the highly correlated independent variables.
Linearly combine the independent variables, such as adding them together.
Perform an analysis designed for highly correlated variables, such as principal components analysis or partial least squares regression.


Q. You build a random forest model with 10,000 trees. Training error as at 0.00, but validation error is 34.23. Explain what went wrong.

A. It means that the model has mimicked the training pattern perfectly that it will cause overfitting problem in test samples. To avoid this overfitting, use techniques like less complex model or cross validation etc.


Q. What is the recall, specificity and precision of the confusion matrix?

A. The recall is the ratio of the relevant results returned by the search engine to the total number of the relevant results that could have been returned. Specificity (SP) is calculated as the number of correct negative predictions divided by the total number of negatives. The precision is the proportion of relevant results in the list of all returned search results.

Happy Learning with CloudyML๐Ÿ’™
Channel name was changed to ยซCloudyML - Data Science Interview QnAยป
Today's Interview Quest

Company Name - EY
Role - AI/ML engineer



Q. Kernels in SVM?

A. Kernel Function is a method used to take data as input and transform into the required form of processing data. โ€œKernelโ€ is used due to set of mathematical functions used in Support Vector Machine provides the window to manipulate the data.


Q. Overfitting and Underfitting? How do you handle them?

A. Your model is underfitting the training data when the model performs poorly on the training data. Your model is overfitting your training data when you see that the model performs well on the training data but does not perform well on the evaluation data.

To avoid overfitting: Keep your model simple, Use regularization technique, Use cross-validation. To avoid underfitting: Decrease regularization, increase the training duration.


Q. P value? Why threshold is 0.05 or less?

A. A p-value is a measure of the probability that an observed difference could have occurred just by random chance. The lower the p-value, the greater the statistical significance of the observed difference. P-value can be used as an alternative to or in addition to pre-selected confidence levels for hypothesis testing. A p-value less than 0.05 is statistically significant. It indicates strong evidence against the null hypothesis, as there is less than a 5% probability the null is correct (and the results are random). Therefore, we reject the null hypothesis, and accept the alternative hypothesis.


Q. Regularization and its use?

A. Regularization is a technique used for tuning the function by adding an additional penalty term in the error function. Regularization, significantly reduces the variance of the model, without substantial increase in its bias.


Q. Type 1 and type 2 error in confusion matrix?

A. A type I error is the mistaken rejection of the null hypothesis (also known as a "false positive" finding or conclusion; example: "an innocent person is convicted"), while a type II error is the mistaken acceptance of the null hypothesis (also known as a "false negative" finding or conclusion; example: "a guilty person is not convicted").


Q. How root node is selected in decision tree.

A. While building the decision tree, we would prefer choosing the attribute/feature with the least Gini index as the root node.


Q. Std deviation vs variance?

A. Variance is the average squared deviations from the mean, while standard deviation is the square root of this number. Both measures reflect variability in a distribution, but their units differ:
Standard deviation is expressed in the same units as the original values (e.g., minutes or meters).
Variance is expressed in much larger units (e.g., meters squared).
Variance helps to find the distribution of data in a population from a mean, and standard deviation also helps to know the distribution of data in population, but standard deviation gives more clarity about the deviation of data from a mean.

Happy Learning with CloudyML๐Ÿ’™
Today's Interview Quest

Company Name - HP
Role - Data Scientist


Q. If through training all the features in the dataset, an accuracy of 100% is obtained but with the validation set, the accuracy score is 75%. What should be looked out for?

A. Training accuracy is much higher than validation accuracy, proving that it's the case of overfitting, so in this case, try regularization or making less complex model or any other method to avoid overfitting.


Q. How is skewness different from kurtosis?

A. Skewness basically measures the asymmetry in data. Kurtosis on the other hand, measures the bulge / peak of a distribution curve.



Q. How to calculate the accuracy of a binary classification algorithm using its confusion matrix?

A. Accuracy is calculated as the total number of two correct predictions (TP + TN) divided by the total number of a dataset (P + N).


Q. How will you measure the Euclidean distance between the two arrays in numpy?

A. eucl_distance = np. linalg. norm(point_a - point_b) where np stands for numpy.


Q. In a survey conducted, the average height was 164cm with a standard deviation of 15cm. If Alex had a z-score of 1.30, what will be his height?

A. Alex's height = 164 + 1.30*15 = 183.5 cm.

Happy Learning with CloudyML๐Ÿ’™
โค1
Today's Interview Quest

Company Name - Legato
Role - Data Scientist



Q. Different activation function?

A. Binary Step Function, Linear Activation Function, Sigmoid/Logistic Activation Function, Tanh Function (Hyperbolic Tangent), ReLU Activation Function.



Q. How do you handle imbalance data?

A. Follow these techniques:

Use the right evaluation metrics.
Use K-fold Cross-Validation in the right way.
Ensemble different resampled datasets.
Resample with different ratios.
Cluster the abundant class.
Design your own models.
Q. Difference between sigmoid and softmax ?
A. The sigmoid function is used for the two-class logistic regression, whereas the softmax function is used for the multiclass logistic regression (a.k.a. MaxEnt, multinomial logistic regression, softmax Regression, Maximum Entropy Classifier).



Q. Explain about optimizers?

A. Optimizers are algorithms or methods used to change the attributes of the neural network such as weights and learning rate to reduce the losses. Optimizers are used to solve optimization problems by minimizing the function.



Q. Precision-Recall Trade off ?

A. The Idea behind the precision-recall trade-off is that when a person changes the threshold for determining if a class is positive or negative it will tilt the scales. It means that it will cause precision to increase and recall to decrease, or vice versa.


Q. Decision Tree Parameters?

A. These are the parameters used for building Decision Tree: min_samples_split, min_samples_leaf, max_features and criterion.


Q. Bagging and boosting ?

A. Bagging is a way to decrease the variance in the prediction by generating additional data for training from dataset using combinations with repetitions to produce multi-sets of the original data. Boosting is an iterative technique which adjusts the weight of an observation based on the last classification.

Happy Learning with CloudyML๐Ÿ’™
Today Interview Quest

Company Name - Infosys
Role - Data Scientist


Q1. curse of dimensionality? How would you handle it?

Ans. To overcome the issue of the curse of dimensionality, Dimensionality Reduction is used to reduce the feature space with consideration by a set of principal features.



Q2. How to find the multi collinearity in the data set

Ans. A simple method to detect multicollinearity in a model is by using something called the variance inflation factor or the VIF for each predicting variable.



Q3. Explain the difference ways to treat multi collinearity!

Ans. 1. Remove some of the highly correlated independent variables.

2. Linearly combine the independent variables, such as adding them together.

3. Perform an analysis designed for highly correlated variables, such as principal components analysis or partial least squares regression.



Q4. How you decide which feature to keep and which feature to eliminate after performing multi collinearity test?

Ans. It is advisable to get rid of variables iteratively. We would begin with a variable with the highest VIF score since other variables are likely to capture its trend. As a result of removing this variable, other variablesโ€™ VIF values are likely to reduce.



Q5. Explain logistic regression

Ans. Logistic regression is a statistical analysis method used to predict a data value based on prior observations of a data set. A logistic regression model predicts a dependent data variable by analyzing the relationship between one or more existing independent variables.



Q6. P value and its significance in statistical testing?

Ans. In statistics, the p-value is the probability of obtaining results at least as extreme as the observed results of a statistical hypothesis test, assuming that the null hypothesis is correct. A smaller p-value means that there is stronger evidence in favor of the alternative hypothesis.

Happy learning with CloudyML ๐Ÿ’™
โค1
Today's Interview Quest

Company Name -  Accenture
Role -  Data Scientist

Q1.  Difference between R square and Adjusted R Square.

Ans. One main difference between R2 and the adjusted R2: R2 assumes that every single variable explains the variation in the dependent variable. The adjusted R2 tells you the percentage of variation explained by only the independent variables that actually affect the dependent variable.


Q2. Difference between Precision and Recall.

Ans.  When it comes to precision we're talking about the true positives over the true positives plus the false positives. As opposed to recall which is the number of true positives over the true positives and the false negatives.


Q3.  Assumptions of Linear Regression.
Ans.  There are four assumptions associated with a linear regression model: Linearity: The relationship between X and the mean of Y is linear. Homoscedasticity: The variance of residual is the same for any value of X. Independence: Observations are independent of each other. The fourth one is normality.


Q4. Difference between Random Forest and Decision Tree.

Ans. A decision tree combines some decisions, whereas a random forest combines several decision trees. Thus, it is a long process, yet slow. Whereas, a decision tree is fast and operates easily on large data sets, especially the linear one. The random forest model needs rigorous training.


Q5. How does K-means work?

Ans.  K-means clustering uses โ€œcentroidsโ€, K different randomly-initiated points in the data, and assigns every data point to the nearest centroid. After every point has been assigned, the centroid is moved to the average of all of the points assigned to it.


Q6.  How do you generally choose among different classification models to decide which one is performing the best?

Ans. Here are some important considerations while choosing an algorithm:

Size of the training data, Accuracy and/or Interpretability of the output, Speed or Training time, Linearity and number of features.


Q7. How do you perform feature selection?

Ans. Unsupervised: Do not use the target variable (e.g. remove redundant variables). Correlation. 

Supervised: Use the target variable (e.g. remove irrelevant variables). Wrapper: Search for well-performing subsets of features. RFE.


Q8. What is an intercept in a Linear Regression? What is its significance?

Ans. The intercept (often labeled as constant) is the point where the function crosses the y-axis. In some analysis, the regression model only becomes significant when we remove the intercept, and the regression line reduces to Y = b*X + error.  The intercept (often labeled the constant) is the expected mean value of Y when all X="0. Start with a regression equation with one predictor, X. If X sometimes equals 0, the intercept is simply the expected mean value of Y at that value. If X never equals 0, then the intercept has no intrinsic meaning.

Happy learning with CloudyML๐Ÿ’™
โค1
The shape of a Normal Curve is:
Anonymous Quiz
75%
Bell Shaped
10%
Flat
10%
Circular
5%
Spiked
Today's Interview Quest

Company Name - TCS
Role - Data Scientist

Q1. How can you assess a good logistic model?

A. Measuring the performance of Logistic Regression:

1. One can evaluate it by looking at the confusion matrix and count the misclassifications (when using some probability value as the cutoff)

2. One can evaluate it by looking at statistical tests such as the Deviance or individual Z-scores.


Q2. How Regularly Must an Algorithm be Updated?

A. It can vary time to time depending upon number of updates happened in the algorithm as per the requirement.



Q3. Why Is Resampling Done?
A. Resampling methods are used to ensure that the model is good enough and can handle variations in data. The model does that by training it on the variety of patterns found in the dataset.



Q4. Write the formula to calculate R-square?

A. R^2 = 1 - (RSS/TSS) where RSS = sum of squares of residual and TSS = Total sum of squares



Q5. Goal of A/B Testing?

A. A/B testing is a basic randomized control experiment. It is a way to compare the two versions of a variable to find out which performs better in a controlled environment.



Q6. Do Gradient Descent Methods at All-Time Converge to a Similar Point?

A. No, they always don't. That's because in some cases it reaches a local minima or a local optima point.



Q7. Feature Vectors?

A. A feature vector is a vector containing multiple elements about an object. Putting feature vectors for objects together can make up a feature space.



Q8. If p value is more than 0.05 what does it mean?

A. A p-value higher than 0.05 (> 0.05) is not statistically significant and indicates strong evidence for the null hypothesis. This means we retain the null hypothesis and reject the alternative hypothesis.

Happy learning with CloudyML ๐Ÿ’™
โค1
Today's Interview Quest

Company Name - Deloitte
Role - Data Analyst



Q1. What is R2? What are some other metrics that could be better than R2 and why?

Ans. R-squared (R2) is a statistical measure that represents the proportion of the variance for a dependent variable that's explained by an independent variable or variables in a regression model. R-squared does not measure goodness of fit. R-squared does not measure predictive error. R-squared does not allow you to compare models using transformed responses. R-squared does not measure how one variable explains another. Some better metrics that could be better than R2 are:

Mean Squared Error (MSE).
Root Mean Squared Error (RMSE).
Mean Absolute Error (MAE)

Q2. What is the curse of dimensionality?

Ans. The curse of dimensionality basically means that the error increases with the increase in the number of features. It refers to the fact that algorithms are harder to design in high dimensions and often have a running time exponential in the dimensions.



Q3. What are advantages of plotting your data before performing analysis ?

Ans. It can help identify obvious errors, as well as better understand patterns within the data, detect outliers or anomalous events, find interesting relations among the variables.



Q4. How would you explain a confidence interval to an engineer with no statistics background? What does 95% confidence mean?

Ans. A 95% confidence interval, for example, implies that were the estimation process repeated again and again, then 95% of the calculated intervals would be expected to contain the true parameter value.



Q5. How do you deal with some of your predictors being missing?

Ans. Simple approaches include taking the average of the column and use that value, or if there is a heavy skew the median or mode might be better. A better approach, you can perform regression or nearest neighbor imputation on the column to predict the missing values. Then continue on with your analysis/model.

Happy learning with CloudyML๐Ÿ’™
โค1
Today's Interview Quest

Company Name - JPMorgan
Role - Data Analyst




Q1. What is a sensitivity analysis in the decision making process?

Ans. Sensitivity analysis is a method for predicting the outcome of a decision if a situation turns out to be different compared to the key predictions. It helps in assessing the riskiness of a strategy. Helps in identifying how dependent the output is on a particular input value.



Q2. How do you interpret the data using statistical techniques

Ans. Most Important Methods For Statistical Data Analysis Mean.

1. Standard Deviation.

2. Regression.

3. Sample Size.

4. Determination.

5. Hypothesis Testing.



Q3. KNN imputation method?

Ans. The idea in kNN methods is to identify 'k' samples in the dataset that are similar or close in the space. Then we use these 'k' samples to estimate the value of the missing data points. Each sample's missing values are imputed using the mean value of the 'k'-neighbors found in the dataset.



Q4. Map Reduce?

Ans. MapReduce facilitates concurrent processing by splitting petabytes of data into smaller chunks, and processing them in parallel on Hadoop commodity servers. In the end, it aggregates all the data from multiple servers to return a consolidated output back to the application.




Q5. What is a Pivot Table?

Ans. A pivot table is a table of grouped values that aggregates the individual items of a more extensive table within one or more discrete categories.

Q6. difference between 1-Sample T-test, and 2-Sample T-test?

Ans. The 2-sample t-test takes your sample data from two groups and boils it down to the t-value. The process is very similar to the 1-sample t-test, and you can still use the analogy of the signal-to-noise ratio. Unlike the paired t-test, the 2-sample t-test requires independent groups for each sample.



Q7. variance and covariance difference?

Ans. Variance and covariance are mathematical terms frequently used in statistics and probability theory. Variance refers to the spread of a data set around its mean value, while a covariance refers to the measure of the directional relationship between two random variable.

Happy learning with CloudyML๐Ÿ’™
โค1
Today's Interview Quest

Company Name - ZS
Role - Data Scientist



Q1. Meaning when p values are high or low?

Ans. High p-values indicate that your evidence is not strong enough to suggest an effect exists in the population. An effect might exist but it's possible that the effect size is too small, the sample size is too small, or there is too much variability for the hypothesis test to detect it. The smaller the p-value, the stronger the evidence that you should reject the null hypothesis.



Q2. Difference between expected and mean value

Ans. While mean is the simple average of all the values, expected value of expectation is the average value of a random variable which is probability-weighted.



Q3. How time series problems different from regression problem

Ans. Regression is Intrapolation. Time-series refers to an ordered series of data. Time-series models usually forecast what comes next in the series - much like our childhood puzzles where we extrapolate and fill patterns.



Q4. RoC curve

Ans. An ROC curve (receiver operating characteristic curve) is a graph showing the performance of a classification model at all classification thresholds. This curve plots two parameters: True Positive Rate. False Positive Rate.



Q5. Random forest or multiple decision trees. Which is better?

Ans. Random Forest is suitable for situations when we have a large dataset, and interpretability is not a major concern. Decision trees are much easier to interpret and understand. Since a random forest combines multiple decision trees, it becomes more difficult to interpret.




Q6. Example when false positive is important than false negative

Ans. A false positive is where you receive a positive result for a test, when you should have received a negative results. Some examples of false positives: A pregnancy test is positive, when in fact you aren't pregnant. A cancer screening test comes back positive, but you don't have the disease. Innocent party is found guilty in such cases.


Happy learning with CloudyML๐Ÿ’™
Today's Interview Quest

Company Name - TCS
Role - Data Scientist


Q1. What is bias?


Ans. The bias is known as the difference between the prediction of the values by the ML model and the correct value. Being high in biasing gives a large error in training as well as testing data. Its recommended that an algorithm should always be low biased to avoid the problem of underfitting.

Q2. Normal Distribution? Skewed distribution? Solution?

Ans. The normal distribution is a continuous probability distribution that is symmetrical on both sides of the mean, so the right side of the center is a mirror image of the left side. The area under the normal distribution curve represents probability and the total area under the curve sums to one. If one tail is longer than another, the distribution is skewed. These distributions are sometimes called asymmetric or asymmetrical distributions as they don't show any kind of symmetry. Symmetry means that one half of the distribution is a mirror image of the other half.
Dealing with skew data: log transformation: transform skewed distribution to a normal distribution:
1. Remove outliers.
2. Normalize (min-max)
3. Cube root: when values are too large.
4. Square root: applied only to positive values.
5. Reciprocal.
6. Square: apply on left skew.

Q3. capture the correlation between continuous and categorical variable? How?

Ans. There are three big-picture methods to understand if a continuous and categorical are significantly correlated - point biserial correlation, logistic regression, and Kruskal Wallis H Test. The point biserial correlation coefficient is a special case of Pearson's correlation coefficient.

Q4. variance? Is it good or bad in data?

Ans. Variance refers to the changes in the model when using different portions of the training data set. Simply stated, variance is the variability in the model predictionโ€”how much the ML function can adjust depending on the given data set.

Q5. error and a residual error?

Ans. The error (or disturbance) of an observed value is the deviation of the observed value from the (unobservable) true value of a quantity of interest (for example, a population mean), and the residual of an observed value is the difference between the observed value and the estimated value of the quantity of interest.


Q6. select an appropriate value of k in k-means?

Ans. There is a popular method known as elbow method which is used to determine the optimal value of K to perform the K-Means Clustering Algorithm. The basic idea behind this method is that it plots the various values of cost with changing k. As the value of K increases, there will be fewer elements in the cluster.

Happy learning with CloudyML ๐Ÿ’™
โค1
Hello Friends, I'm Planning to share some Quizzes to increase your Knowledge ๐Ÿง ๐Ÿš€ โ€ผ๏ธ Choose Your Favourite Topics So i'll Upload Quiz Related to that topics โ€ผ๏ธ
Anonymous Poll
67%
Data Science
44%
SQL
61%
Python
53%
Machine Learning
31%
Artificial Intelligence
12%
Java
11%
C++