Interview Questions Answers
Interview Questions Answers
---
- Supervised Learning: Models are trained on labeled data. Example: Classification and
Regression.
- Unsupervised Learning: Models are trained on unlabeled data to find patterns. Example:
Clustering.
cumulative rewards.
- Logistic Regression: Predicts binary outcomes. Uses a sigmoid function to map predictions
between 0 and 1.
- Linearity of relationships.
- Independence of errors.
- Overfitting: Model performs well on training data but poorly on test data.
Statistics
- States that the sampling distribution of the mean approaches a normal distribution as the sample
size increases.
- Use metrics like R-squared, Adjusted R-squared, and Mean Squared Error (MSE).
Quantization
- Process of reducing the precision of model parameters to optimize performance and reduce
memory usage.
- Reduces model size and computational requirements, making it suitable for resource-constrained
devices.
Neural Networks
1. How does an artificial neural network (ANN) work? What are its components?
- Components: Input layer, hidden layers, output layer, weights, biases, and activation functions.
- Recurrent Neural Network (RNN): Has loops allowing data to persist, suitable for sequential data.
1. What are RNNs? How do they differ from feedforward neural networks?
- RNNs process sequential data with hidden states, unlike feedforward networks.
- GRU has fewer parameters with combined forget and input gates.
---
import tensorflow as tf
model = tf.keras.Sequential([
tf.keras.layers.Dense(128, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax')
])
2. What are some common preprocessing techniques for image data using NumPy or PIL?
plt.plot(history.history['loss'], label='loss')
plt.plot(history.history['accuracy'], label='accuracy')
plt.legend()
plt.show()
- Load dataset, preprocess images, define CNN architecture, train, and evaluate.
2. How would you debug a deep learning model that is not converging during training?
- Check data preprocessing, learning rate, model architecture, and loss function.
3. How do you optimize hyperparameters in deep learning models?
Paper Implementation
- Read abstract, introduction, and conclusion first. Analyze methodology and experiments.
2. Given a new paper on a novel model, outline your steps to implement it from scratch.
- Understand architecture, preprocess data, implement model, train, and validate results.
3. What challenges have you faced in implementing models from research papers?
data.