- Introduction
- Dataset
- Technology Used
- Installation
- Data Preprocessing
- Exploratory Data Analysis
- Model Training
- Model Evaluation
- Preview of Student Performance Indicator
- Conclusion
- Microsoft Azure CICD Deployment with GitHub Actions
This project aims to understand and analyze student performance (test scores) based on various variables such as gender, ethnicity, parental level of education, lunch type, and test preparation course. Additionally, it includes the implementation of machine learning models to predict student math scores based on these variables.
The dataset used for this project is sourced from Kaggle and contains the following columns:
- Gender
- Race/Ethnicity
- Parental Level of Education
- Lunch Type
- Test Preparation Course
- Math Score
- Reading Score
- Writing Score
You can access the dataset here: Student Performance Dataset
The following technologies were used in this project:
- Python
- Jupyter Notebook
- NumPy
- pandas
- scikit-learn
- Matplotlib
- Seaborn
- FastAPI
- Clone the repository:
git clone https://github.com/SahilChowkekar/Student-Performance-Indicator.git
- Navigate to the project directory:
cd Student-Performance-Indicator
- Create a conda environment after opening the repository:
conda create -n student-performance-env python=3.8 -y
- Activate the conda environment:
conda activate student-performance-env
- Install the required dependencies:
pip install -r requirements.txt
- Finally, run the following command to start the application:
python app.py
- Open your preferred web browser and visit:
http://127.0.0.1:5000
- Checked for missing values (there were none).
- Checked for duplicates (there were none).
- Examined data types and converted categorical columns using one-hot encoding.
- Created new features like "Total Score" and "Average" for analysis.
- Explored the distribution of scores and other variables.
- Visualized data using various plots such as histograms, bar plots, and pie charts.
- Identified insights and correlations between variables.
- Trained several machine learning models, including Linear Regression, Lasso, Ridge, K-Neighbors Regressor, Decision Tree Regressor, Random Forest Regressor, XGBRegressor, CatBoost Regressor, and AdaBoost Regressor.
- Split the data into training and testing sets.
- Evaluated model performance using metrics like Mean Absolute Error, Root Mean Squared Error, and R-squared (R2) score.
- Assessed the performance of each model on both the training and testing datasets.
- Analyzed which model performed the best for predicting math scores.
Here's a preview of the Student Performance Indicator in action:
- Summarized the key findings from the analysis.
- Highlighted the impact of various factors on student performance.
This guide will walk you through deploying your web app to Azure Web App via Azure Container Registry. Please follow the steps carefully.
Before you begin, make sure you have the following prerequisites in place:
- An Azure account.
- Docker installed on your local machine.
- Your web app code hosted in a GitHub repository.
To log in to your Microsoft Azure account, visit https://portal.azure.com, enter your account email and password, and follow the authentication steps if applicable.
- Navigate to the Azure portal.
- Click on "Container Registries."
- Create a new Azure Container Registry, filling in the required details.
- Inside your Azure Container Registry, go to "Access keys."
- Enable the Admin user.
- Save the login server and password as you'll need them later.
- Open your terminal.
- Navigate to your web app project directory.
- Build the Docker image with the following command:
docker build -t testdockersahil.azurecr.io/studentperformance:latest .
- In your terminal, log in to the Azure Container Registry using the credentials you saved earlier:
docker login testdockersahil.azurecr.io
- Push the Docker image to the Azure Container Registry:
docker push testdockersahil.azurecr.io/studentperformance:latest
- In the Azure portal, create a new Azure Web App.
- Fill in the required details and select "Azure Container Registry" as the image source.
- After the deployment of your Azure Web App is complete, go to the "Deployment Center" in the Azure portal.
- Click on "GitHub Action" under the "Source" section.
- Fill in all the details, including your GitHub repository.
- Be sure to update the workflow to use the updated master_studentperformancecheck.yml file.
- Go to your GitHub repository.
- Under the "Actions" tab, you will see the deployment happening.
- After the deployment is successful, click on the "Evaluated Environment URL" to access your web app.
- Alternatively, you can access your web app by going to your Azure Web App in the Azure portal and clicking on the "Browse" or "Default Domain" option.
These guidelines provide a step-by-step approach to deploying your Student Performance Indicator Web App to Azure Web App using Docker and GitHub Actions. Be sure to replace placeholders with your actual Azure and GitHub details.