π Behind the App: My Journey Building the Student Math Performance Predictor
π― What Inspired Me
As someone passionate about education and data science, Iβve always been fascinated by how background and environment influence student learning outcomes β especially in mathematics. I wanted to explore whether we could use simple, accessible indicators (like home resources and confidence levels) to predict a student's performance. This could help educators and parents better understand where support is needed most.
My goal was to build something thatβs not only data-driven but also usable by non-technical users β like a teacher or parent β through an interactive web app.
π οΈ How I Built It
The project was developed using R and Shiny. Here's how I approached it:
π 1. Feature Selection
I began by training a regression model on a student dataset, but the RΒ² score was only around 30%. That showed me that predicting exact performance scores wasn't reliable β so I pivoted to a classification model. To improve accuracy, I used Recursive Feature Elimination (RFE) to select the top 5 predictors that were most relevant to math performance:
- Student's confidence in math
- Home resources for learning
- Parents' education level
- Number of books at home
- Instructional hours per year
π§ 2. Model Training
I used caret with a Random Forest classifier, training it to predict High / Medium / Low performance categories instead of a numeric score. This turned out to be more robust and interpretable.
π 3. Web App with Shiny
I built a user-friendly Shiny app to allow users to:
- Input the values for each predictor using dropdowns and sliders
- Understand what each input means with clear descriptions
- Instantly see the predicted performance level
I also packaged the trained model as an .RData file so that the app could make predictions on the fly.
π§ What I Learned
- Switching from regression to classification can make a big difference when prediction uncertainty is high
- Feature engineering and variable explanation are just as important as the model itself when building user-facing apps
- Building with Shiny helped me think about how to make machine learning more accessible
- Deploying with shinyapps.io taught me how to manage dependencies, versioning, and user
π§ Challenges I Faced
- My first model had low predictive power β I had to rethink my approach
- Deploying to shinyapps.io was tricky due to package version conflicts and memory limits
- Some users didnβt understand the numeric input values, so I redesigned the UI with dropdowns and embedded descriptions for each variable
- Making the app lightweight enough to deploy without timeouts or crashes
β The Result
The final result is a responsive, educational app that predicts a student's math performance category based on five key inputs. It's built to be clear, user-friendly, and helpful for educators or researchers interested in exploring how background factors impact learning.
Log in or sign up for Devpost to join the conversation.