Practice Set
MTE- Machine Learning
1. Describe the role of cross-validation in evaluating ML models.
2. Given data points (2,5), (4,9), (6,12), (8,15), compute the linear regression line and
predict Y when X=10.
3. Design a machine learning workflow to predict the severity of road accidents using
traffic, vehicle, and weather data. Include the data preprocessing, feature
engineering (e.g., road-type embedding, interaction between speed and weather),
and evaluation metrics.
4. Explain how missing data and outliers can affect the performance of regression
models. Suggest suitable data preprocessing techniques to handle both issues.
5. Explain how feature correlation analysis helps prevent redundancy in model input
features. Provide an example using a correlation matrix.
6. A logistic regression model is trained to predict whether a tumor is malignant (1) or
benign (0) based on cell size and age:
𝑧 = −5.2 + 0.15 × CellSize + 0.03 × Age
Compute the probability of malignancy for a 45-year-old patient with CellSize = 28.
Interpret the result.
7. A dataset of apartments shows the following relationship:
Area ([Link]) 𝑋: [600, 800, 1000, 1200, 1500]
Rent (₹ per month) 𝑌: [10,000, 13,000, 16,000, 19,000, 24,000]
Compute the slope and intercept for the simple linear regression model and predict the rent
for an apartment with 1100 [Link] area.
8. A real-estate analyst predicts house prices using features such as area, number of rooms,
location rating, and house age.
Two models are trained:
• Model A: Multiple Linear Regression
• Model B: Lasso Regression
Both fit the training data well, but Model B’s predictions on test data are more stable and
rely on fewer features.
(a) Compare the two models in terms of feature selection and generalization ability.
(b) Explain how Lasso’s L1 regularization helps prevent overfitting and improve
interpretability.
9. A retail analytics team applies Ridge Regression to forecast monthly sales using features
such as advertising budget, price discounts, seasonal index, and competitor activity.
a) Demonstrate how adjusting λ reduces the effect of multicollinearity among promotional
features (e.g., advertising vs discount).
b) Discuss differences between Ridge and Lasso in handling redundant predictors and
explain which model would better retain correlated sales drivers.
c) Recommend an evidence-based method to tune λ for maximizing predictive stability
during future campaigns.
10. Propose an approach to monitor and maintain fairness in a loan approval ML model that
may exhibit bias based on gender or income. Suggest at least two strategies for detecting
and mitigating bias.
11. An industrial automation firm builds a Naïve Bayes classifier to predict whether a
machine is in a Faulty or Normal state based on sensor readings: temperature, vibration, and
pressure.
(a) Explain how the classifier would compute the posterior probability of a “Faulty” state for
a machine showing high temperature and vibration. Illustrate the step-by-step combination
of prior and conditional probabilities.
(b) Analyze the practical implications of the independence assumption when sensor readings
are correlated. Discuss how it could influence fault-prediction precision and suggest possible
remedies.
12. A company builds two regression models to predict car mileage (in km/litre) using
features such as engine size and weight. Four test samples yield the following results: actual
values = [15, 18, 20, 22]; predictions from Model A = [14.5, 16.8, 19.2, 21.0]; and predictions
from Model B = [15.3, 17.9, 19.5, 20.8]. Compute the Root Mean Squared Error (RMSE) for
both models and determine which one generalizes better to unseen data. Justify your
conclusion by analyzing the bias–variance trade-off and commenting on whether either
model is likely to be underfitted or overfitted.
13. A telecom company’s binary churn-prediction model was tested on 400 customers and
produced: 120 true positives, 30 false negatives, 40 false positives, and 210 true negatives.
Calculate Accuracy, Precision, Recall, Specificity, and F1-score.
Interpret whether the model is more effective in identifying churners or retained customers.