{"id":18951738,"url":"https://github.com/kawai-senpai/info-through-app-usage","last_synced_at":"2026-02-13T16:12:24.683Z","repository":{"id":212331493,"uuid":"542213765","full_name":"Kawai-Senpai/Info-Through-App-Usage","owner":"Kawai-Senpai","description":"This project aims to predict the gender of individuals based on their app usage patterns. The project leverages data collected through a custom survey to train machine learning models. By analyzing various app usage statistics, such as time spent on different categories of apps, we aim to determine the user's gender with high accuracy.","archived":false,"fork":false,"pushed_at":"2024-09-10T15:21:44.000Z","size":150,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T06:37:18.516Z","etag":null,"topics":["ad-tech","gender-prediction","prediction-model","profession-prediction","scikit-learn","survery"],"latest_commit_sha":null,"homepage":"https://forms.gle/gQFGemdu8aciNnZp6","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kawai-Senpai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-27T17:41:15.000Z","updated_at":"2025-06-14T18:23:36.000Z","dependencies_parsed_at":"2025-02-21T03:28:52.326Z","dependency_job_id":"98c37043-5b1d-4537-b878-0efe4e86705b","html_url":"https://github.com/Kawai-Senpai/Info-Through-App-Usage","commit_stats":null,"previous_names":["kawai-senpai/info-through-app-usage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kawai-Senpai/Info-Through-App-Usage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawai-Senpai%2FInfo-Through-App-Usage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawai-Senpai%2FInfo-Through-App-Usage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawai-Senpai%2FInfo-Through-App-Usage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawai-Senpai%2FInfo-Through-App-Usage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kawai-Senpai","download_url":"https://codeload.github.com/Kawai-Senpai/Info-Through-App-Usage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawai-Senpai%2FInfo-Through-App-Usage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29412050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ad-tech","gender-prediction","prediction-model","profession-prediction","scikit-learn","survery"],"created_at":"2024-11-08T13:29:17.960Z","updated_at":"2026-02-13T16:12:24.664Z","avatar_url":"https://github.com/Kawai-Senpai.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gender Tracking with App Usage\n\nProject by [Ranit Bhowmick](https://linktr.ee/ranitbhowmick) and [Sayanti Chatterjee](https://linktr.ee/sayantichatterjee)\n\n## Overview\n\nThis project aims to predict the gender of individuals based on their app usage patterns. The project leverages data collected through a custom survey to train machine learning models. By analyzing various app usage statistics, such as time spent on different categories of apps, we aim to determine the user's gender with high accuracy.\n\nThe project encompasses data collection, preprocessing, and model training, utilizing techniques such as one-hot encoding, outlier detection, and machine learning algorithms like Decision Trees and Random Forest.\n\n## Survey Information\n\nTo gather data for this project, we conducted a survey titled \"What's Your App Usage?\". The survey was designed to capture detailed information about participants' app usage across various categories. The data collected is crucial for training our machine learning models, and we appreciate the participation of everyone who took the time to contribute.\n\n### Survey Questions\nThe survey was structured to be clean and organized, with each question focusing on specific aspects of app usage. Participants could fill out the form anonymously, and the sections included:\n- Basic demographic information\n- App usage duration across various categories (e.g., Social, Gaming, Banking)\n- Time of app usage during the day\n\nYou can view and participate in the survey [here](https://forms.gle/gQFGemdu8aciNnZp6).\n\n## Data Description\n\nThe dataset used for this project was constructed from the survey responses. The raw data includes columns such as `Transportation Usage`, `Social Usage`, `Meet Usage`, and more, all of which represent the time spent on various app categories.\n\n### Dataset Features\nThe main features in the dataset are as follows:\n- **App Usage Duration:** Time spent on apps in different categories, represented in `HH:MM:SS` format.\n- **App Usage Time:** Time of day when apps in different categories were used, also in `HH:MM` format.\n- **Demographic Information:** Gender, Employment Status, Field of Work, and Date of Birth.\n\n### Data Preprocessing\n#### 1. Handling Missing Values\nThe dataset contained some missing values in the app usage duration columns. These missing values were filled with `'00:00:00'`, indicating no usage.\n\n#### 2. Outlier Detection and Correction\nWe implemented a custom outlier detection and correction function to handle invalid time entries. For instance, any time value with hours exceeding 23 was corrected to `'00:00:00'`.\n\n#### 3. Converting Time to Numerical Values\nTo make the time data suitable for machine learning models, we converted the `HH:MM:SS` and `HH:MM` formats into total seconds. This conversion allows the models to process and analyze the time data effectively.\n\n#### 4. Date of Birth Conversion\nThe `Date of Birth` was converted into the number of days since birth, which provides a numerical representation of the participant's age.\n\n#### 5. One-Hot Encoding\nCategorical variables such as `Gender`, `Employment Status`, and `Field` were converted into numerical values using one-hot encoding. This step is crucial for feeding the data into machine learning algorithms.\n\n## Machine Learning Models\n\n### 1. Decision Tree Classifier\nWe initially employed a Decision Tree Classifier to predict gender based on app usage patterns. The model was trained using the preprocessed dataset, and it achieved an accuracy of around 82% on the test data.\n\n```python\nfrom sklearn import tree\n\nmodel = tree.DecisionTreeClassifier()\nmodel.fit(x_train, y_train)\naccuracy = model.score(x_test, y_test)\nprint(f\"Decision Tree Accuracy: {accuracy}\")\n```\n\n### 2. Random Forest Classifier\nTo further improve the accuracy, we used a Random Forest Classifier with 15 estimators. The Random Forest model provided more robust results, achieving similar accuracy levels as the Decision Tree but with improved stability.\n\n```python\nfrom sklearn.ensemble import RandomForestClassifier as rf\n\nmodel2 = rf(n_estimators=15)\nmodel2.fit(x_train, y_train)\naccuracy_rf = model2.score(x_test, y_test)\nprint(f\"Random Forest Accuracy: {accuracy_rf}\")\n```\n\n## Results\n\n- The Random Forest model achieved an accuracy of **82%**, which is promising given the limited dataset size.\n- The Decision Tree model also performed well, but Random Forest's ensemble approach provided more consistent results.\n- The accuracy can be further improved with a larger and more diverse dataset, as well as by fine-tuning the hyperparameters of the models.\n\n## How to Run the Project\n\n### 1. Prerequisites\nMake sure you have Python 3.x installed along with the required libraries:\n```bash\npip install pandas numpy scikit-learn\n```\n\n### 2. Clone the Repository\n```bash\ngit clone https://github.com/Kawai-Senpai/Info-Through-App-Usage.git\ncd Info-Through-App-Usage\n```\n\n### 3. Run the Code\nEnsure that you have the dataset (`app_usage.csv`) in the same directory and run the Jupyter notebook or the Python script provided.\n\n### 4. Analyze the Results\nAfter running the models, you can view the accuracy scores and model performance metrics. The models can be further fine-tuned to improve predictions.\n\n## Future Work\n\n- **Expand the Dataset:** Collect more survey responses to enhance the training dataset's size and diversity.\n- **Feature Engineering:** Explore additional features that might improve model accuracy, such as app usage frequency or session length.\n- **Model Optimization:** Experiment with other machine learning models, such as Gradient Boosting or Support Vector Machines, and fine-tune hyperparameters.\n- **Deployment:** Consider deploying the model as a web service or integrating it into an app to provide real-time gender predictions based on app usage.\n\n## Acknowledgments\n\nWe thank all participants who took the time to complete our survey. Your contributions have been invaluable to this project. Special thanks to Sayanti Chatterjee for her collaboration and support.\n\n## Contact\n\nFor more information, feel free to reach out:\n- **Ranit Bhowmick:** [Linktree](https://linktr.ee/ranitbhowmick)\n- **Sayanti Chatterjee:** [Linktree](https://linktr.ee/sayantichatterjee)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkawai-senpai%2Finfo-through-app-usage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkawai-senpai%2Finfo-through-app-usage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkawai-senpai%2Finfo-through-app-usage/lists"}