Q.1
14 MarksAlso asked in Summer 2025 Q1b
Well-Posed Learning Problem
According to Tom Mitchell (1997), a computer program is said to learn from experience if it satisfies three formal criteria:
"A computer program is said to learn from Experience with respect to some class of Tasks and Performance measure , if its performance at tasks in , as measured by , improves with experience ."
The Three Fundamental Components:
- Task (): The specific real-world problem to be executed (e.g., Playing Chess).
- Performance Measure (): The quantitative metric used to assess the system's success (e.g., Percentage of games won against human grandmasters).
- Training Experience (): The historical observation data or practice trials the model learns from (e.g., Playing practice games against itself).
Classification vs Regression
| Parameter | Classification | Regression |
|---|---|---|
| Output Type | Discrete / Categorical values (Classes or labels). | Continuous numerical quantities (Real numbers). |
| Prediction Goal | Assigns an input instance into one of predefined discrete classes. | Predicts an unconstrained quantity on a continuous scale. |
| Decision Boundary | Divides feature space into discrete class regions via hyperplanes or decision surfaces. | Fits a continuous line, curve, or multi-dimensional surface to data points. |
| Evaluation Metrics | Accuracy, Precision, Recall, F1-Score, Confusion Matrix, ROC-AUC. | Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Score. |
| Standard Algorithms | Logistic Regression, Decision Trees, SVM, Naive Bayes, Random Forest. | Linear Regression, Ridge/Lasso, Support Vector Regression (SVR), Polynomial Regression. |
| Example Use Case | Email spam detection (Spam vs Ham), Disease diagnosis (Positive vs Negative). | House price prediction, Stock market valuation, Temperature forecasting. |
Explain steps and activities to use machine learning for any real word application.
End-to-End Machine Learning Workflow
Developing and deploying a machine learning solution for any real-world problem follows a structured lifecycle:
+----------------------+ +----------------------+ +----------------------+
| 1. Problem Framing | ---> | 2. Data Collection | ---> | 3. EDA & Cleaning |
+----------------------+ +----------------------+ +----------------------+
|
v
+----------------------+ +----------------------+ +----------------------+
| 6. Deployment & Mon. | <--- | 5. Model Eval & Tune | <--- | 4. Feature Engg & |
| | | | | Model Training |
+----------------------+ +----------------------+ +----------------------+Key Steps and Activities:
- Problem Definition & Framing:
- Translate business objectives into a concrete ML problem: Supervised vs Unsupervised vs Reinforcement learning.
- Define key metrics for success (e.g., F1-score , inference latency ).
- Data Collection & Ingestion:
- Aggregate raw data from databases, REST APIs, web scrapers, IoT sensors, or public repositories.
- Ensure data quality, volume, and balance across target labels.
- Exploratory Data Analysis (EDA) & Data Preprocessing:
- Handling Missing Values: Imputation via mean/median/mode or removal.
- Outlier Treatment: Detection via Z-score / IQR and winsorization.
- Data Normalization: Min-Max scaling () or Standard Z-Score scaling ().
- Feature Engineering & Selection:
- One-hot encoding for nominal categories; target encoding for high-cardinality features.
- Creating domain-specific interaction features.
- Selecting optimal feature subsets via correlation matrices or PCA to prevent curse of dimensionality.
- Model Selection, Training & Cross-Validation:
- Partition data into Train (), Validation (), and Test () sets.
- Train candidate baseline models (Linear/Logistic, Tree ensembles like XGBoost, Neural Nets).
- Perform -fold cross-validation to assess generalization.
- Hyperparameter Tuning & Evaluation:
- Tune parameters using Grid Search, Random Search, or Bayesian Optimization.
- Evaluate against held-out test data using unseen edge cases.
- Production Deployment & Monitoring:
- Containerize model using Docker and expose via high-performance REST APIs (FastAPI/Flask).
- Monitor for Data Drift (input distributions changing over time) and Concept Drift (statistical relationships shifting), triggering automated retraining pipelines.