Skip to content

Course Enrollment Prediction: A machine learning project to forecast course enrollments using historical data. Features data cleaning, exploratory data analysis, model development with RandomForestRegressor, and deployment via a Flask web application.

License

Notifications You must be signed in to change notification settings

saboye/Course-Demand-Projection

Repository files navigation

Course Enrollment Prediction

GitHub contributors GitHub forks GitHub issues GitHub license GitHub last commit Flask scikit-learn Pandas NumPy

Overview

This project aims to forecast course enrollments for collage or University using machine learning. The predictive model uses historical enrollment data and various features such as course code, term code, delivery method, and capacity to forecast future enrollments. This allows the university to better allocate resources and ensure that courses are adequately staffed and resourced.

Features

  • Predict future course enrollments based on historical data.
  • Visualize historical vs predicted enrollments.
  • Handle unseen labels dynamically.
  • User-friendly web interface using Flask.
  • Tooltip hints for form inputs to guide users.

Installation

  1. Clone the repository:

    git clone https://github.com/saboye/Course-Demand-Projection.git
    cd Course-Demand-Projection
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Model

Due to large file sizes, the model files are stored externally. Please download the following files and place them in the specified directories:

  1. Model File: best_random_forest_model.zip
    • Download Link
    • Place the file in the root directory of the project and unzip it.

Usage

  1. Download the necessary files as mentioned above.

  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Run the Flask application:

    python app.py
  4. Access the application: Open your web browser and go to http://127.0.0.1:5000.

Project Structure

course_enrollment_prediction/
├── data/                               # Directory for data files
├── EDA/                                # Directory for Exploratory Data Analysis
   ├── cleaned_merged_data.csv         # Cleaned and merged data file
   ├── Data Cleaning and Exploratory Data analysis (EDA).ipynb  # EDA notebook
├── static/                             # Directory for static files (CSS, JS, images)
   ├── styles.css                      # CSS file for styling
├── templates/                          # Directory for HTML templates
   ├── index.html                      # Main HTML file for the web application
├── venv/                               # Virtual environment directory
├── .gitignore                          # Git ignore file
├── app.py                              # Main Flask application
├── best_random_forest_model.joblib     # Trained RandomForest model
├── data_preprocessing.py               # Script for data preprocessing
├── label_encoders.joblib               # Label encoders used for encoding categorical data
├── make_predictions.py                 # Helper functions for encoding and predicting
├── model_training.py                   # Script for training the model
├── README.md                           # Project README file
├── requirements.txt                    # Python dependencies

Usage

  1. Navigate to the Home page:

    • Fill out the form with course data such as course code, term code, delivery code, capacity, year, semester, and category.
    • Hover over the information icons for tips on each field.
  2. Submit the form:

    • The application will predict the enrollment for the specified course and display the predicted enrollment alongside a visualization comparing historical and predicted enrollments.

Handling Unseen Labels

The model and application can handle previously unseen labels in the input data dynamically, ensuring that predictions are not limited by known labels.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Course Enrollment Prediction: A machine learning project to forecast course enrollments using historical data. Features data cleaning, exploratory data analysis, model development with RandomForestRegressor, and deployment via a Flask web application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published