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.
- 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.
-
Clone the repository:
git clone https://github.com/saboye/Course-Demand-Projection.git cd Course-Demand-Projection
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
Due to large file sizes, the model files are stored externally. Please download the following files and place them in the specified directories:
- Model File:
best_random_forest_model.zip
- Download Link
- Place the file in the root directory of the project and unzip it.
-
Download the necessary files as mentioned above.
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Access the application: Open your web browser and go to
http://127.0.0.1:5000
.
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
-
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.
-
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.
The model and application can handle previously unseen labels in the input data dynamically, ensuring that predictions are not limited by known labels.
This project is licensed under the MIT License - see the LICENSE file for details.