MACHINE LEARNING/DEEP LEARNING INTERVIEW QUESTIONS
Want cool Future Vision Merch? Check out our store here
INTRODUCTION:
Hey, folks. This is the first time I am writing a blog and thought of starting it with the Machine Learning/ Deep Learning interview questions that was asked to me while being interviewed for a company for the position of AI Developer. It was a Skype interview and it went on for about 40 minutes where I was asked the maximum number of questions that could have been questioned in that duration. Here are some of the ML/DL questions asked:
1. Tell me something about yourself:
This is the first and foremost question that any interviewer would ask from you. Here, you need to give a very brief introduction about yourself followed by the till date work experience(Internships/Jobs/Courses) you own. This helps the interviewer to know the technical details about you and can be well prepared when asking technical questions.
2. What is gradient descent ?
Gradient descent is an optimization algorithm which is used to find the value of the parameters (using Linear Algebra) that minimizes the cost function. It is used when the parameters cannot be searched analytically using Linear Algebra. Gradient measures the change in all weights with regard to the change in the error. The higher the gradient, the steeper the slope and the faster a model can learn. But if the slope is zero, the model stops learning. Said it more mathematically, a gradient is a partial derivative with respect to its inputs. You start by defining the initial parameters values and from there on Gradient Descent iteratively adjusts the values, using calculus, so that they minimize the given cost-function.
3. How do you decide the epoch size for the model for training ?
The number of epochs for the training step depend heavily on the Neural Network structure/architecture as well as the complexity of the problem and also on the data available for the training (test and validation) procedures.
4. What do you mean activation function ? Have you ever used it ?
An activation function introduces non-linearity in the network and it is essentially used for converting an input signal to an output signal. Specifically in ANN we do the sum of products of inputs(X) and their corresponding Weights(W) and apply a Activation function f(x) to it to get the output of that layer and feed it as an input to the next layer.
They are defined into linear and non-linear activation functions. Link to detail explanation of activation functions, follow this link. ( https://towardsdatascience.com/activation-functions-neural-networks-1cbd9f8d91d6 )
5. What do you mean by Recurrent Neural Network ?
They’re especially useful with sequential data because each neuron or unit can use its internal memory to maintain information about the previous input. A RNN has loops in them that allow information to be carried across neurons while reading in input. It finds its vital use in the area of speech recognition, image captioning and so on.
6. What is LSTM ?
LSTMs(Long Short term Memory) are explicitly designed to avoid the long-term dependency problem. Remembering information for long periods of time is practically their default behavior, not something they struggle to learn! The key to LSTMs is the cell state which have the ability to remove or add information to the cell state, carefully regulated by structures called gates. Gates are a way to optionally let information through. They are composed out of a sigmoid neural net layer and a point wise multiplication operation. The sigmoid layer outputs numbers between zero and one, describing how much of each component should be let through. A value of zero means “let nothing through,” while a value of one means “let everything through!”
7. What would you do if the training results in very low accuracy ?
If the model is not doing anything better than random choice, then either there is no connection between the features and the class, or your classifier is not apt for the given data-set. One should even look if your model is suffering from high bias and high variance problem. You can also test if there is any correlation between the features and try to either use cross validation or remove the outliers/redundant features.
8. Do you need to normalize the data for PCA ? Why or why not?
PCA is about transforming the given data to the space which maximizes the variance. If the data-set is not normalized then PCA may select some feature with the highest variance in the original data-set making it more important which may not be correct.
9. Name the processes involved in Data pre-processing ?
The steps involved in it are Data cleaning, Data Integration, Data transformation, Data reduction. In data cleaning, we clean the raw data which consists of filling the missing values, removing noise from it and correcting the inconsistent data. During data integration, we put the data from various sources and in data reduction it helps reduce the number of features by removing unnecessary, less relevant and/or correlated features using Dimensionality Reduction techniques. It even performs sampling to reduce the total number of examples to be fed into the training process.
10. How do you ensure if your model is over-fitted or not ?
A simple way to check whether the model over-fits is to measure the error on the training and test data-sets. If the error on training data-set is low and high on test and/or validation data-set, then there likely is over-fitting in the model. If you keep improving the training set’s accuracy the beyond the optimal point, the model starts to over-fit and the test set’s accuracy starts decreasing. However, if you stop training early, then your model might under-fit and not learn from the training set completely.
11. Tell me about how did you solve a real life project in Machine Learning ?
Here, I had pointed about the transfer learning approach in Inception V3 for predicting the health parameter of senior citizens using the application of Computer Vision.
So, that was it. If you really liked this post then there are more interesting posts on its way.