1. What distinguishes supervised learning from unsupervised learning?
Ans:
Supervised learning uses labeled datasets where both inputs and outputs are known, allowing the model to make predictions or classifications accurately on new data. In contrast, unsupervised learning works with unlabeled datasets to uncover hidden patterns, relationships, or clusters, such as grouping customers based on purchasing behavior, without predefined outcomes.
2. How does transfer learning enhance the effectiveness of AI models?
Ans:
Transfer learning applies knowledge gained from training a model on a large dataset to improve performance on a smaller, domain-specific dataset. This method reduces training time, conserves computational resources, and increases accuracy. It is particularly useful when sufficient data for training a new model is limited.
3. Can you explain overfitting in machine learning and ways to avoid it?
Ans:
Overfitting occurs when a model memorizes the training data, including noise, instead of learning general patterns, resulting in poor performance on unseen data. To prevent overfitting, techniques like regularization, pruning, dropout, and cross-validation are applied, helping the model generalize better to new situations.
4. What are Generative Adversarial Networks (GANs) and how do they work?
Ans:
GANs consist of two neural networks, the generator and the discriminator, that compete with each other. The generator creates synthetic data while the discriminator evaluates whether it is real or fake. Through this adversarial process, both networks improve over time, leading to the production of highly realistic outputs.
5. How do attention mechanisms improve transformer model outputs?
Ans:
Attention mechanisms help models focus on the most relevant parts of the input data when generating predictions. In transformers, self-attention enables each element in a sequence to consider its relationships with others, improving context understanding and resulting in more accurate outputs for tasks like translation, text generation, or sequential modeling.
6. What role does feature engineering play in building AI models?
Ans:
Feature engineering involves creating, transforming, or selecting input variables to enhance a model’s ability to learn from data. Well-engineered features help models identify meaningful patterns, improving prediction accuracy and training efficiency. Poorly designed features can reduce model performance and lead to inaccurate predictions.
7. How can missing or incomplete data be handled effectively?
Ans:
Managing missing data depends on its extent and context. Common approaches include imputing missing values using mean, median, or mode, using models that handle missing data natively, or removing rows or columns with excessive missing entries. Proper handling ensures dataset integrity and reliable model results.
8. What differentiates Random Forest from XGBoost algorithms?
Ans:
Random Forest creates multiple independent decision trees and averages their outputs to reduce variance and prevent overfitting. XGBoost, on the other hand, builds trees sequentially, where each new tree corrects the errors of the previous ones. This gradient boosting approach often provides higher accuracy but requires careful tuning.
9. How is the performance of machine learning models evaluated?
Ans:
Model performance depends on the task type. Regression models are evaluated using metrics such as Mean Squared Error (MSE), Mean Absolute Error, and R-squared, while classification models use accuracy, precision, recall, F1-score, and ROC-AUC. These metrics help assess the model’s reliability, effectiveness, and ability to generalize to new data.
10. What ethical considerations are important when developing AI systems?
Ans:
Ethical AI development emphasizes fairness, accountability, and transparency. It is crucial to minimize bias in training data, safeguard user privacy, and ensure model decisions are explainable. Following ethical principles builds public trust, ensures responsible use, and prevents misuse of AI technology.