Skip to content

Nikhitha-OpenSource/Machine-Learning-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machine Learning Projects

A collection of machine learning projects demonstrating regression models, Azure ML deployment, and predictive analytics.

📁 Project Structure

Machine Learning Projects/
├── linear.ipynb              # Linear regression example with sample data
├── data.csv                  # Sample dataset for linear regression
├── test.py                   # Azure ML endpoint test for house price model
├── test2.py                  # Azure ML endpoint test for vehicle MPG model
├── model.pkl                 # Trained model file
└── my_complete_project/
    ├── azure outputs/        # Azure deployment outputs
    ├── task1/                # House Price Prediction Task
    │   ├── house.ipynb       # House price prediction notebook
    │   ├── house_prices.csv  # Housing dataset
    │   ├── house_price_model.pkl  # Serialized trained model
    │   └── score.py          # Scoring script for Azure ML
    └── task2/                # Vehicle MPG Prediction Task
        ├── task2.ipynb       # Vehicle MPG prediction notebook
        ├── data.csv          # Vehicle dataset
        ├── score.py          # Scoring script for Azure ML
        └── mpg_model/        # Trained MPG model directory

📊 Project Overview

Task 1: House Price Prediction

  • File: my_complete_project/task1/
  • Description: Predicts house prices based on features like size, bedrooms, and age
  • Model: Linear/Regression models trained on house_prices.csv
  • Notebook: house.ipynb - Complete analysis and model training pipeline
  • Deployment: Azure ML deployment with REST API endpoint
  • Test Script: test.py - Tests the Azure ML endpoint

Task 2: Vehicle MPG Prediction

  • File: my_complete_project/task2/
  • Description: Predicts vehicle fuel efficiency (MPG) based on engine specifications
  • Features: Engine Size, Horsepower, Weight, Cylinders, Model Year
  • Model: Regression model stored in mpg_model/ directory
  • Notebook: task2.ipynb - Data exploration and model development
  • Deployment: Azure ML deployment with REST API endpoint
  • Test Script: test2.py - Tests the Azure ML endpoint

Linear Regression Example

  • File: linear.ipynb
  • Description: Introductory linear regression example with simple dataset
  • Purpose: Demonstrates basic ML workflow (train/test split, evaluation, visualization)
  • Metrics: MAE, MSE, RMSE, R² Score

🛠️ Technologies Used

  • Python 3.x
  • Libraries:
    • pandas - Data manipulation
    • numpy - Numerical operations
    • scikit-learn - Machine learning models
    • matplotlib - Data visualization
  • Azure ML - Model deployment and API endpoints

📈 Model Evaluation Metrics

All models are evaluated using:

  • MAE (Mean Absolute Error)
  • MSE (Mean Squared Error)
  • RMSE (Root Mean Squared Error)
  • R² Score (Coefficient of determination)

🚀 Usage

Running Notebooks

jupyter notebook linear.ipynb
jupyter notebook my_complete_project/task1/house.ipynb
jupyter notebook my_complete_project/task2/task2.ipynb

Testing Azure ML Endpoints

python test.py          # Test house price model
python test2.py         # Test vehicle MPG model

📝 Key Files Explanation

File Purpose
house.ipynb House price prediction: data loading, EDA, model training, evaluation
task2.ipynb Vehicle MPG prediction: data preprocessing, model development, predictions
linear.ipynb Educational example: linear regression from scratch
score.py Azure ML scoring function for house price model
test.py API test script with sample house data
test2.py API test script with sample vehicle data

📌 Model Deployment

Both models are deployed on Azure Machine Learning with:

  • REST API endpoints for real-time predictions
  • Authentication via API keys
  • Specific deployment names for routing requests

Testing Azure Endpoints

The test.py and test2.py files demonstrate how to:

  1. Prepare input data in JSON format
  2. Call Azure ML endpoints
  3. Handle authentication headers
  4. Parse predictions

💾 Datasets

  • House Prices: my_complete_project/task1/house_prices.csv
  • Vehicle MPG: my_complete_project/task2/data.csv

🔄 Workflow

  1. Data Preparation → Load and explore data in notebooks
  2. Model Training → Train regression models on datasets
  3. Model Evaluation → Calculate performance metrics
  4. Model Serialization → Save trained models as .pkl files
  5. Azure Deployment → Deploy models as REST API endpoints
  6. Testing → Validate endpoints with test scripts

📚 Learning Outcomes

  • Linear and regression modeling
  • Train/test data splitting
  • Model evaluation techniques
  • Azure ML deployment
  • REST API integration
  • Real-world predictive analytics

Date: April 29, 2026
Project Type: Machine Learning - Regression Models
Status: Complete with Azure ML deployment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors