Untitled 10
Untitled 10
SECTION - A
Q.1 Answer the following questions (Compulsory)
Example: Consider a spam classi er. If trained with suf cient labeled emails, the algorithm should
classify new emails as spam/non-spam with high probability and within an acceptable error rate. If
this happens, the algorithm is PAC-learnable.
• Handling Missing Values: Replace missing data using mean, median, or mode, or remove
incomplete rows.
• Normalization: Scaling numerical values to a common range (e.g., 0-1) using Min-Max or
Z-score normalization.
• Outlier Detection: Use statistical methods like Z-score to identify and handle outliers that
can skew results.
• Feature Selection: Remove irrelevant or redundant features that don’t contribute to the
prediction.
• X = data point
• μ = mean
• σ = standard deviation
Use in Outlier Detection: If a data point has a Z-score greater than 3 or less than -3, it is usually
considered an outlier.
• Speci c Boundary (S): Most speci c hypothesis that ts all positive examples.
• General Boundary (G): Most general hypothesis that still ts all positive examples.
As more examples are provided, version space narrows until an optimal hypothesis is found.
Q.2B. What is the importance of model evaluation? Name and explain any two
metrics.
Important Metrics:
1. Accuracy: The ratio of correctly predicted observations to the total observations. Formula:
(TP + TN) / (TP + TN + FP + FN)
2. Precision: The ratio of correctly predicted positive observations to total predicted positives.
Formula: TP / (TP + FP)
These metrics help assess the reliability and robustness of models in real-world scenarios.
• Multi-Class Classi cation: Each instance is assigned to only one label from multiple
possible classes. Example:Classifying animals as cat, dog, or rabbit.
• Multi-Label Classi cation: Each instance can belong to multiple classes simultaneously.
Example: An email can be labeled as both "spam" and "promotional".
• ID3 (Iterative Dichotomiser 3) builds a decision tree by selecting the attribute that yields the
highest information gain.
• It uses entropy to measure the impurity in a dataset and splits data accordingly.
• The process continues recursively until all data is classi ed or stopping conditions are met.
Steps:
SECTION - B
Q.1 (Compulsory)
• Hidden Layers: Apply weighted sums and activation functions (ReLU, sigmoid)
Training: Uses backpropagation to minimize error through gradient descent by updating weights.
fi
fi
fi
fi
fi
2. How is Logistic Regression different from Linear Regression? Answer:
• Logistic Regression predicts probabilities and is used for classi cation tasks using the
sigmoid function to map values between 0 and 1.
3. What is the use of the kernel in SVM? Answer: Kernels enable Support Vector Machines
(SVMs) to operate in high-dimensional spaces ef ciently. They allow non-linear classi cation by
computing inner products in the transformed feature space.
Common kernels:
• Linear
• Polynomial
Steps:
Steps:
Q.3A. Explain ROC Curve. How does it help in evaluating classi cation models?
• ROC (Receiver Operating Characteristic) curve plots True Positive Rate (TPR) vs False
Positive Rate (FPR).
• AUC (Area Under Curve) measures classi er's ability to distinguish classes.
AUC Score:
• 1: Perfect classi er
◦ Reduces variance.
• Boosting:
• Supervised Learning: The model is trained on labeled data. Example: Spam detection in
emails.
• Unsupervised Learning: The model nds patterns from unlabeled data. Example:
Customer segmentation.
• Semi-supervised Learning: A small amount of labeled data is used with a large amount of
unlabeled data. Example: Web page classi cation.
Learning Paradigms
Basics of Probability
18. What is the difference between prior, likelihood, and posterior probabilities?
• Likelihood (P(B|A)): The probability of observing the data given the hypothesis.
fi
fi
fi
fl
fi
fi
fi
fi
fi
• Posterior (P(A|B)): The updated belief after observing the data.
20. Explain the difference between discrete and continuous probability distributions.
• Continuous distributions represent variables that take on an in nite number of values (e.g.,
Normal, Exponential).
Version Spaces
• General boundary (G): Most general hypotheses. As new training data arrives, the
algorithm updates S and G to retain only consistent hypotheses.
26. How can the version space be used for concept learning?
Concept learning involves identifying a general rule from speci c examples. The version
space helps track consistent hypotheses, and learners re ne it with each new example until
convergence.
27. What are the common methods for data collection in machine learning?
• Web scraping
• Public datasets
28. How can data quality impact the performance of a machine learning model?
Poor quality data can lead to inaccurate models. Missing values, noise, outliers, and biased
data reduce performance. Clean, accurate, and relevant data ensures better generalization
and model reliability.
Preprocessing
• Removal of rows/columns
• Train-test split
• Cross-validation
• Ensemble comparison
• Cross-validation
41. What are the common evaluation metrics for regression models?
42. What are the common evaluation metrics for classi cation models?
• Accuracy
• Precision
• Recall
• F1 Score
• ROC-AUC
• Curse of dimensionality
• Time-consuming
47. What are the common development environments for machine learning?
• Jupyter Notebooks
• Google Colab
• Anaconda
• PyCharm
Visualization of Results
50. What are some common visualization techniques used to interpret machine learning
results?
• Confusion Matrix
• ROC Curve
• Feature Importance
• Heatmaps