1. How are AI, ML, and Deep Learning related and different?
Ans:
Artificial Intelligence is the field that aims to make machines perform tasks requiring human intelligence. Machine Learning is a branch of AI that allows systems to learn from data automatically and improve performance. Deep Learning is a specialized subset of ML that leverages multi-layered neural networks to handle complex tasks, such as object recognition in images, speech analysis, and natural language understanding.
2. Explain supervised, unsupervised, and reinforcement learning with practical examples.
Ans:
Supervised learning involves labeled data for predictions, like estimating housing prices from features such as size and location. Unsupervised learning identifies patterns or clusters in unlabeled data, for example, grouping customers for marketing campaigns. Reinforcement learning trains agents to make sequential decisions using feedback in the form of rewards or penalties, such as teaching robots to navigate obstacle courses efficiently.
3. How can overfitting in machine learning be avoided?
Ans:
Overfitting occurs when a model memorizes training data but does not perform well on new inputs. Techniques to prevent this include using cross-validation, L1/L2 regularization, dropout in neural networks, pruning decision trees, expanding datasets, or applying data augmentation. These strategies help models generalize better for real-world scenarios.
4. What does the bias-variance tradeoff mean?
Ans:
The bias-variance tradeoff is about finding the right balance between model simplicity and sensitivity to training data. High bias leads to underfitting, and high variance causes overfitting. Techniques such as ensemble methods, cross-validation, and regularization help achieve a balance, reducing total prediction errors and improving model reliability.
5. What are common evaluation metrics for classification models?
Ans:
Classification performance is assessed using metrics like accuracy, precision, recall, F1-score, and AUC-ROC. These metrics measure different aspects of how well a model predicts outcomes. The metric chosen often depends on the application, for example, prioritizing recall in critical systems to minimize false negatives.
6. Why are activation functions necessary in neural networks?
Ans:
Activation functions allow neural networks to capture non-linear relationships in the data. Popular functions include ReLU for efficient learning in deep networks, Sigmoid for probability outputs, and Tanh for scaling between -1 and 1. Without activation functions, networks would only model linear relationships, limiting their ability to solve complex problems.
7. How is the right machine learning algorithm chosen?
Ans:
Selecting an algorithm depends on the data type, dataset size, problem requirements, interpretability, and expected accuracy. Linear regression works well with structured numerical data, deep learning handles unstructured data like images and audio, and ensemble techniques like Random Forest or XGBoost are effective for high-accuracy tabular data tasks.
8. What is Gradient Descent and its types?
Ans:
Gradient Descent is an approach to optimize model parameters by minimizing the loss function. Variants include Batch Gradient Descent (using all data), Stochastic Gradient Descent (per sample updates), and Mini-batch Gradient Descent (subset-based updates). Adaptive optimizers like Adam enhance stability and accelerate convergence.
9. What are common challenges in deploying AI/ML models?
Ans:
Deployment can face issues like data distribution shifts, latency limitations, scalability, explainability, and continuous monitoring. These are addressed with model retraining, containerization with Docker, version control, and performance tracking using tools such as MLflow or Prometheus to ensure models operate reliably in production.
10. Describe an AI/ML project you implemented and its results.
Ans:
In a predictive maintenance initiative, sensor readings were analyzed to predict equipment failures. Challenges such as missing data, class imbalance, and feature selection were solved using data imputation, SMOTE, and feature engineering. The project reduced machine downtime by 20% and optimized maintenance workflows, improving operational efficiency.