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.
SandyWagwa/machine-learning
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|