Abstract
Research overview
Smartphones are deeply integrated into everyday life, but some usage patterns may indicate difficulty controlling phone use. This project investigates a machine learning approach to classifying behavioral patterns associated with problematic smartphone use using a dataset described as containing 50,000 user records.
The workflow constructs a target label using weighted behavioral rules, derives additional features, and compares Logistic Regression, Random Forest, and Gradient Boosting. SHAP is then used to examine the contribution of individual features to model predictions. In the reported analysis, Screen-to-Sleep Ratio has the highest mean absolute SHAP value.
Keywords
Digital wellness · Smartphone usage · Random Forest · Gradient Boosting · SHAP · Feature engineering · Explainable AI
Research motivation
Understanding behavior beyond screen time
Total screen time alone does not fully describe a person's relationship with a smartphone.
Heavy smartphone use and problematic use are not necessarily the same. Behavioral patterns involving sleep, stress, productivity, and social media may provide additional context for studying phone habits.
This project explores whether these signals can be combined into a classification pipeline and whether explainability methods can make the resulting predictions easier to interpret.
Behavioral signals
Study phone use alongside sleep, stress, and productivity.
Feature engineering
Represent relationships between measurements, not just isolated values.
Interpretability
Explore which input features influence model predictions.
Methodology
From raw data to model interpretation
The reported workflow combines label construction, feature engineering, preprocessing, model training, and explainability.
Dataset preparation
The project describes 50,000 user records containing demographic, occupational, device, and behavioral variables. User_ID is excluded from model inputs.
Rule-based label construction
A weighted behavioral score is calculated from predefined thresholds. Records with a total score of five or more receive the Is_Addicted label.
Feature engineering
Four additional features are derived: Screen-to-Sleep Ratio, Social Media Ratio, Productivity-Stress Gap, and Total Screen Time.
Preprocessing and data split
Categorical inputs are label-encoded. The reported workflow uses an 80/20 stratified train-test split with random_state 42.
Model training
Logistic Regression serves as a baseline, alongside Random Forest with 100 trees and Gradient Boosting with 100 estimators.
Model interpretation
TreeExplainer is used to calculate SHAP values for a sample of 1,000 test records from the Random Forest model.
Derived feature
Screen-to-Sleep Ratio
This feature represents the relationship between daily phone use and sleep duration. It is an engineered model input, not a validated clinical diagnostic threshold. Records with zero or missing sleep duration also require appropriate handling during feature construction.
Experimental results
Comparing the classifiers
The figures below reproduce the accuracy values reported in the supplied project code.
Random Forest accuracy
99.39%
Reported classification accuracy
Gradient Boosting accuracy
99.48%
Highest reported accuracy among the three models
Classification accuracy
Reported test-set results
Figure 1.Comparison of the three classifiers using the accuracy figures reported in the project. High accuracy should be interpreted in light of the rule-generated target labels and does not establish clinical validity.
Interpretation and evaluation caveat
The target labels were generated from behavioral scoring rules. Tree-based models may learn patterns closely related to those rules, resulting in very high accuracy. These figures alone do not establish clinical validity, diagnostic accuracy, or generalization to independently labeled populations.
Explainable AI
What influenced the predictions?
SHAP values provide a framework for examining how model inputs contribute to individual predictions and global model behavior.
Global feature importance
Mean absolute SHAP values for the reported Random Forest analysis
Figure 2.Feature importance values transcribed from the reported analysis and scaled visually against the largest listed value. These values describe model attribution, not causal effects.
In the reported analysis, Screen-to-Sleep Ratio ranks first, followed by Stress Level, Daily Phone Hours, and Sleep Hours. This indicates that the first feature has the largest mean absolute SHAP value among the features listed.
Mean absolute SHAP values summarize the magnitude of feature contributions, not their direction. A larger value does not establish that a feature causes problematic smartphone use, nor does it validate the target labels.
Critical evaluation
Limitations and responsible use
The reported performance must be considered alongside the data-generation process and evaluation design.
Rule-generated target labels
The target is derived from a weighted behavioral score rather than independently verified clinical diagnoses. The models may reproduce the scoring rules used to create the labels.
Independent validation
Evaluation on independently labeled data is necessary to determine whether the observed performance generalizes beyond the target-generation rules.
Measurement quality
Self-reported stress and productivity measurements may contain recall and reporting bias. The supplied page does not establish independent verification of these measures.
Temporal and population generalization
The reported workflow does not by itself demonstrate that the model generalizes across different populations or captures changes in behavior over time.
Evaluation transparency
Accuracy should be accompanied by confusion matrices, precision, recall, F1-score, class distributions, and leakage checks for a more complete assessment.
Conclusion
Prediction is only part of the story
This project brings together behavioral feature engineering, supervised classification, and SHAP-based interpretation in a single machine learning workflow. The reported analysis identifies Screen-to-Sleep Ratio as the leading feature by mean absolute SHAP value in the Random Forest model.
The next important step is independent evaluation using appropriately labeled data, additional performance metrics, and rigorous leakage checks. Such evaluation would help determine whether the observed patterns generalize beyond the rules used to construct the target variable.
Project implementation
Digital Addiction Detection
Explore the implementation, project files, and model workflow in the source repository.
Explore source codeBibliography
References and further reading
Selected publications relevant to smartphone-use assessment, ensemble learning, and explainable machine learning.
Development and Validation of a Smartphone Addiction Scale
Kwon et al., 2013
doi.org/10.1371/journal.pone.0056936
A Unified Approach to Interpreting Model Predictions
Lundberg and Lee, 2017
arxiv.org/abs/1705.07874
Random Forests
Breiman, 2001
doi.org/10.1023/A:1010933404324
Greedy Function Approximation: A Gradient Boosting Machine
Friedman, 2001
doi.org/10.1214/aos/1013203451
Increases in Depressive Symptoms and Links to Increased New Media Screen Time
Twenge et al., 2018
doi.org/10.1177/2167702617723376
Bibliographic details and the relationship of each publication to the project should be verified against the original sources before formal academic submission.