Sandra Otubushin – ML 02 Features Project¶
This project demonstrates how feature engineering can improve machine learning by creating more meaningful input variables before model training.
The project extends the original example by creating a custom application named app_sandra.py, which engineers a new feature and uses it to train a regression model.
How-To Guide¶
Many instructions are common to all our projects.
See ⭐ Workflow: Apply Example to get the example projects running on your machine.
Project Documentation Pages (docs/)¶
- Home – Project documentation landing page
- Project Instructions
- Your Files
- Glossary
- API
Phase 4 – Technical Modification¶
For my technical modification, I created a new application named app_sandra.py instead of modifying the instructor's example.
The primary enhancement was creating a new engineered feature named study_efficiency.
The engineered feature is calculated as:
study_efficiency = hours_studied × attendance_pct ÷ 100
Instead of using the original feature set, my custom model predicts student scores using:
- study_efficiency
- practice_quizzes
- sleep_hours
- prior_score
I selected this modification because feature engineering is the focus of this module. Rather than simply using the original variables, I created a new feature that combines study time and attendance into a single measure that better represents student learning effort.
I verified that the modification worked by successfully running:
The application completed successfully, generated new charts, saved the visualizations into docs/images, and displayed "Executed successfully!" in the terminal.
Compared to the original project, my version introduces an engineered feature and custom visualizations while preserving the overall machine learning workflow.
Although the modification was moderate, it helped me better understand how feature engineering improves data before model training.
Phase 5 – Custom Project¶
My custom project demonstrates how engineered features can improve a supervised machine learning workflow.
Rather than relying only on the original variables, I created a new feature that represents study efficiency and used it as one of the predictors in the regression model.
Basis and Data¶
The project uses the original hours_scores_case.csv dataset located in the data/raw folder.
I chose to keep the original dataset because it clearly demonstrates how new features can be engineered from existing variables.
The dataset contains information such as:
- Hours studied
- Practice quizzes
- Attendance percentage
- Sleep hours
- Prior score
- Final score
One limitation of the dataset is that it contains only a small number of observations, so the results should be viewed as a learning example rather than a production machine learning model.
Modeling Approach¶
This project uses supervised machine learning because the correct target values are already known.
The project is a regression problem because the target variable is a continuous numeric value (student score).
Linear Regression is an appropriate model because the goal is predicting a numeric outcome while understanding how each feature contributes to the prediction.
Target¶
The original example predicted:
score
My custom project also predicts:
score
Although the target remained the same, the predictor variables changed by introducing a newly engineered feature.
Features¶
The original example used:
- hours_studied
- practice_quizzes
- attendance_pct
- sleep_hours
- prior_score
My custom project uses:
- study_efficiency
- practice_quizzes
- sleep_hours
- prior_score
The new study_efficiency feature combines two existing variables into a more meaningful measure of student effort.
This demonstrates one of the most important concepts in feature engineering: creating better input variables from existing data.
Evaluation and Results¶
The model was evaluated using:
- Mean Absolute Error (MAE)
- R-squared (R²)
The project also generated custom visualizations showing:
- Study Efficiency vs Student Score
- Custom Model Coefficients
The workflow executed successfully, generated predictions, created the new engineered feature, and automatically saved the charts in docs/images.
If I continued improving the project, I would experiment with additional engineered features and compare multiple regression models to determine whether prediction accuracy could be improved.
Summary¶
For this project, I created a custom feature engineering application named app_sandra.py.
The application:
- loads the dataset,
- creates an engineered feature,
- prepares a clean modeling dataset,
- trains a Linear Regression model,
- predicts student scores,
- generates professional visualizations,
- saves the charts automatically,
- and documents the workflow.
This project strengthened my understanding of feature engineering and reinforced how creating meaningful features can improve machine learning models before training.
The skills practiced in this project can be applied to many real-world problems, including education, healthcare, finance, and business analytics where thoughtful feature engineering often leads to better predictive performance.
Example Visualization¶
Study Efficiency vs Student Score¶

The engineered study_efficiency feature shows a strong positive relationship with student scores and illustrates how creating meaningful features can improve data preparation for machine learning.