From f07ba22f98a930b92408ffed44268de189ec4625 Mon Sep 17 00:00:00 2001 From: Meng Li <34143965+Meng6@users.noreply.github.com> Date: Fri, 19 Jun 2020 16:22:57 -0400 Subject: [PATCH] Minor fix for applications_foreground sensor --- config.yaml | 4 ++-- docs/features/extracted.rst | 2 ++ src/features/applications_foreground_features.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index f731b304..087f2665 100644 --- a/config.yaml +++ b/config.yaml @@ -104,12 +104,12 @@ ACCELEROMETER: APPLICATIONS_FOREGROUND: DAY_SEGMENTS: *day_segments - SINGLE_CATEGORIES: ["all", "video"] + SINGLE_CATEGORIES: ["all", "email"] MULTIPLE_CATEGORIES: social: ["socialnetworks", "socialmediatools"] entertainment: ["entertainment", "gamingknowledge", "gamingcasual", "gamingadventure", "gamingstrategy", "gamingtoolscommunity", "gamingroleplaying", "gamingaction", "gaminglogic", "gamingsports", "gamingsimulation"] SINGLE_APPS: ["top1global", "com.facebook.moments", "com.google.android.youtube", "com.twitter.android"] # There's no entropy for single apps - EXCLUDED_CATEGORIES: ["system_apps", "video"] + EXCLUDED_CATEGORIES: ["system_apps", "tvvideoapps"] EXCLUDED_APPS: ["com.fitbit.FitbitMobile", "com.aware.plugin.upmc.cancer"] FEATURES: ["count", "timeoffirstuse", "timeoflastuse", "frequencyentropy"] diff --git a/docs/features/extracted.rst b/docs/features/extracted.rst index 817d1a7d..9d7c1d86 100644 --- a/docs/features/extracted.rst +++ b/docs/features/extracted.rst @@ -373,6 +373,8 @@ frequencyentropy nats The entropy of the used apps within a category Features can be computed by app, by apps grouped under a single category (genre) and by multiple categories grouped together (meta categories). For example, we can get features for Facebook, for Social Network Apps (including Facebook and others) or for a meta category called Social formed by Social Network and Social Media Tools categories. +Apps installed by default like YouTube are considered systems apps on some phones. We do an exact match to exclude apps where "genre" == ``EXCLUDED_CATEGORIES`` or "package_name" == ``EXCLUDED_APPS``. + We provide three ways of classifying and app within a category (genre): a) by automatically scraping its official category from the Google Play Store, b) by using the catalogue created by Stachl et al. which we provide in RAPIDS (``data/external/``), or c) by manually creating a personalized catalogue. The way you choose strategy a, b or c is by modifying ``APPLICATION_GENRES`` keys and values. Set ``CATALOGUE_SOURCE`` to ``FILE`` if you want to use a CSV file as catalogue (strategy b and c) or to ``GOOGLE`` if you want to scrape the genres from the Play Store (strategy a). By default ``CATALOGUE_FILE`` points to the catalogue created by Stachl et al. (strategy b) and you can change this path to your own catalogue that follows the same format (strategy c). In addition, set ``SCRAPE_MISSING_GENRES`` to true if you are using a FILE catalogue and you want to scrape from the Play Store any missing genres and ``UPDATE_CATALOGUE_FILE`` to true if you want to save those scrapped genres back into the FILE. diff --git a/src/features/applications_foreground_features.py b/src/features/applications_foreground_features.py index 475e5598..9863381c 100644 --- a/src/features/applications_foreground_features.py +++ b/src/features/applications_foreground_features.py @@ -27,7 +27,7 @@ if "system_apps" in excluded_categories: apps_data = apps_data[apps_data["is_system_app"] == 0] apps_data = apps_data[~apps_data["genre"].isin(excluded_categories)] # exclude apps in the excluded_apps list -apps_data = apps_data[~apps_data["application_name"].isin(excluded_apps)] +apps_data = apps_data[~apps_data["package_name"].isin(excluded_apps)] apps_features = apps_features.merge(base_applications_foreground_features(apps_data, day_segment, requested_features, params), on="local_date", how="outer")