This repository contains Machine Learning laboratory practical assignments implemented in Python using Google Colab.
.
├── Assignment_01_LinearRegression/
│ ├── Assignment_01.ipynb
│ ├── data/
│ │ └── dataset.csv # Medical Cost Personal Datasets (Insurance)
│ └── outputs/ # Plots & correlation heatmap
│
├── Assignment_02_LogisticRegression/
│ ├── Assignment_02.ipynb
│ ├── data/
│ │ ├── binary_dataset.csv # Diabetes Prediction Dataset
│ │ └── multiclass_dataset.csv # Mobile Price Classification Dataset
│ └── outputs/ # Confusion matrices, ROC curves & boxplots
│
├── generate_notebook.py
├── generate_assignment_02.py
└── README.md
-
Objective: Predict continuous medical insurance costs (
charges) based on demographic and lifestyle attributes (age,bmi,smoker, etc.). - Dataset: Medical Cost Personal Datasets (Kaggle)
-
Metrics: MAE, MSE, RMSE,
$R^2$ Score. - Visualizations: Feature Correlation Heatmap, Age vs. Charges Scatter Plot, Actual vs. Predicted Plot, Residual Distribution.
- Part A (Binary Logistic Regression):
- Objective: Predict patient diabetes status (
0vs1). - Dataset: Diabetes Prediction Dataset (Kaggle)
- Metrics: Accuracy, Precision, Recall, F1-Score, Classification Report, Confusion Matrix, ROC-AUC Curve.
- Objective: Predict patient diabetes status (
- Part B (Multinomial Logistic Regression):
- Objective: Classify mobile phones into 4 distinct price ranges (
0: Low,1: Medium,2: High,3: Very High). - Dataset: Mobile Price Classification (Kaggle)
- Metrics: Accuracy, Weighted Precision, Recall, F1-Score, Classification Report, Multiclass Confusion Matrix.
- Objective: Classify mobile phones into 4 distinct price ranges (
- Part C: Binary vs. Multinomial Comparison Table.
- Upload the project folder to Google Drive under
MyDrive/ML/. - Open
Assignment_01.ipynborAssignment_02.ipynbin Google Colab. - Execute the Colab Drive mount cell right after the introduction:
from google.colab import drive
import os
# Mount Google Drive
drive.mount('/content/drive')
# Change working directory to assignment folder
os.chdir('/content/drive/MyDrive/ML/Assignment_01_LinearRegression') # or Assignment_02_LogisticRegression
print("Current Working Directory:", os.getcwd())- Select Runtime > Run all.
- Python 3.8+
numpypandasmatplotlibseabornscikit-learn