Skip to content

eddieX-2021/mlGradAdmission

Repository files navigation

UCLA Graduate Admission Predictor

Overview

This project is a machine learning-powered web application that predicts the chance of admission to UCLA graduate school based on applicant data. It leverages a Kaggle dataset and demonstrates a full ML workflow, including data ingestion, transformation, model training, and deployment using Flask.

Features

  • Interactive Web App: Users can input their academic and research credentials to get real-time predictions of their admission chances.
  • Robust ML Pipeline: Includes data cleaning, preprocessing, feature engineering, and model selection.
  • Custom Exception Handling: All errors are managed with detailed custom exceptions for easier debugging and reliability.
  • Logging: Key steps and errors are logged for traceability.
  • Packaging & Deployment: The project is structured for easy packaging and deployment, including AWS Elastic Beanstalk support.
  • Model Selection: Multiple regression models are evaluated (Random Forest, Decision Tree, Gradient Boosting, Linear Regression, XGBoost, CatBoost, AdaBoost), with hyperparameter tuning via GridSearchCV.

Dataset

How It Works

  1. Data Ingestion: Loads and splits the Kaggle dataset into train/test sets.
  2. Data Transformation: Cleans column names, imputes missing values, scales features, and encodes categorical variables.
  3. Model Training: Trains and evaluates several regression models, saving the best-performing model.
  4. Prediction Pipeline: Loads the trained model and preprocessor to make predictions on new user input.
  5. Web Interface: Users enter their scores and credentials; the app returns the predicted chance of admission.

Usage

Local Setup

  1. Clone the repository
  2. Install dependencies
    pip install -r requirements.txt
  3. Run the application
    python application.py
  4. Access the app
    • Visit http://localhost:5000 in your browser.

AWS Deployment

  • The project includes configuration files for deployment on AWS Elastic Beanstalk (.ebextensions/python.config, pipeline.yml).

Example

  • Home Page: Enter GRE, TOEFL, University Rating, SOP, LOR, CGPA, and Research experience.
  • Prediction: The app displays your predicted chance of admission as a percentage.

Notebooks

  • EDA Graduate Admission.ipynb: Exploratory data analysis and visualization.
  • Model Training.ipynb: Model training, evaluation, and comparison.

Key Technologies

  • Python, Flask, scikit-learn, pandas, numpy, CatBoost, XGBoost, AWS Elastic Beanstalk

Custom Exception Example

class CustomException(Exception):
    def __init__(self, error_message, error_detail: sys):
        super().__init__(error_message)
        self.error_message = error_message_detail(error_message, error_detail=error_detail)
    def __str__(self):
        return self.error_message

License

This project is for educational purposes.


Author: Eddie Xiao

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages