This project focuses on predicting an individual’s subjective well-being, represented by their overall life satisfaction, using demographic factors such as age, gender, and education. The process begins by importing and cleaning a dataset to ensure accuracy, including handling duplicates and missing values. After preparing the data, we separate it into features (predictors) and the target variable ("life.is.good") and then split it into training and testing sets. Two predictive models—linear regression and decision tree regression—are used to examine the relationships between demographic factors and life satisfaction. Predictions are then made and evaluated using metrics like mean absolute error (MAE) and R-squared (R²) scores to assess each model’s accuracy. Visualization techniques are applied to display predicted vs. actual values and to show feature importance in the decision tree model, highlighting that factors such as age and income are key predictors of life satisfaction. This analysis reveals how specific demographic attributes can influence subjective well-being, providing insights that could guide future research and interventions aimed at enhancing personal happiness and life satisfaction.
-
Notifications
You must be signed in to change notification settings - Fork 0
This project predicts life satisfaction using demographic factors like age, gender, and education. After cleaning and splitting the data, linear and decision tree regression models are applied, with accuracy assessed using MAE and R². Visualizations highlight key predictors, offering insights into factors influencing well-being.
SandyWagwa/machine-learning
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
This project predicts life satisfaction using demographic factors like age, gender, and education. After cleaning and splitting the data, linear and decision tree regression models are applied, with accuracy assessed using MAE and R². Visualizations highlight key predictors, offering insights into factors influencing well-being.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published