0% found this document useful (0 votes)
6 views13 pages

Research Paper 1

Uploaded by

gurusahab413
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views13 pages

Research Paper 1

Uploaded by

gurusahab413
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Pers Ubiquit Comput

DOI 10.1007/s00779-017-1039-8

ORIGINAL ARTICLE

Social recommendations for personalized fitness assistance


Saumil Dharia1 · Magdalini Eirinaki1 · Vijesh Jain1 · Jvalant Patel1 ·
Iraklis Varlamis2 · Jainikkumar Vora1 · Rizen Yamauchi1

Received: 30 November 2016 / Accepted: 21 April 2017


© Springer-Verlag London Ltd. 2017

Abstract Wearable technology allows users to monitor both new activities, as well as fitness buddies, are being
their activity and pursue a healthy lifestyle through the use recommended to each user.
of embedded sensors. Such wearables usually connect to a
mobile application that allows them to set their profile and Keywords Wearable technology · Activity tracking ·
keep track of their goals. However, due to the relatively Social recommendation · Collaborative filtering ·
“high maintenance” of such applications, where a signifi- Personalized assistant
cant amount of user feedback is expected, users who are
very busy, or not as self-motivated, stop using them after a
while. It has been shown that accountability improves com- 1 Introduction
mitment to an exercise routine. In this work, we present the
PRO-Fit framework, a personalized fitness assistant aiming Fitness-related smartphone applications have gained popu-
at engaging users in fitness activities, incorporating a social larity in recent years as they help users integrate health and
element. The PRO-Fit architecture collects information fitness activities into their daily lives creating better per-
from activity tracking devices and automatically classifies sonal health engagement and raise health adherence. The
their activity type. Moreover, the framework incorporates advancements in wearable technology, where embedded
a social recommender system. Using collaborative filtering accelerometers, gyroscopes, GPS tracking, and other sen-
on user profile and activity data, PRO-Fit generates per- sors enable the users to actively monitor their activity have
sonalized fitness schedules based on their availability and revolutionized the field, by allowing users to engage in sim-
wellbeing goals. We also incorporate the social network pler activities, such as walking or running. However, most of
community of the application’s users and identify different the existing technologies are based on an interactive model,
tie strengths based on the user’s connections and location. expecting from the users to actively keep track of their
The output of the recommendation process is twofold, as workouts and other fitness and health goals, leading less
self-motivated individuals to soon loose interest and stop
exercising. According to a study that reviewed 200 existing
health and fitness applications, the main priority for users
is to have an application that makes any physical activity
 Magdalini Eirinaki entertaining and rewarding and motivates them to continue
[email protected] striving for achieving targets they set [10]. It is therefore
Iraklis Varlamis essential for activity tracking and well-being applications
[email protected] to incorporate these two factors to allow people to have a
positive attitude towards fitness activities. It is also impor-
1 Computer Engineering Department, San Jose State University, tant to convince them that they have the ability to attain the
San Jose, CA, USA
goals that they have set for themselves. This demand can
2 Department of Informatics and Telematics, be met by quantifying and setting accurate goals for each
Harokopio University of Athens, Athens, Greece individual.
Pers Ubiquit Comput

Sometimes, it is observed that due to lack of company The rest of the paper is organized as follows: In Section 2,
in performing a fitness activity, people get complacent and we review the related work. In Section 3, we present
lose interest. There are many studies that have shown that an overview of the PRO-Fit personalized fitness assistant
exercising as part of a group leads to higher exercise adher- framework and outline the basic components of the activity
ence [8, 13]. One well-studied phenomenon is the Köhler classifier and calendar management, introduced as part of
effect [14, 26] where researchers have shown that people our previous work [11, 12]. In Section 4, we present in detail
working out on dyads (i.e., pairs) keep each other moti- the proposed social recommendation system. The experi-
vated and exercise longer. This important element can be mental evaluation of the social recommendation module is
partially addressed by embedding rewards systems or credit discussed in Section 5. In Section 6, we present the results
points in the applications that support the wearable devices, of a user study conducted with real users of the PRO-Fit pro-
however incorporating social recommendations by suggest- totype application. Finally, we conclude with our plans for
ing friends with similar interests and goals, would be much future work in Section 7.
more effective.
In this paper, we present PRO-Fit (standing for Per-
sonalized Recommender and Organizer Fitness assistant), 2 Related work
a personalized fitness assistant framework, that integrates
multiple sources of information, including the user’s pref- The activity trackers allow for recording various types of
erences, their calendar, and their social network, and proac- data using their inbuilt accelerometers, gyroscopes, GPS
tively pushes notifications to the user, in an effort to keep her and other sensors. The data collected from these devices can
motivated and focused on her goals. Our motivation draws be used to determine the type of activity and fitness level
from the fact that for busy individuals, the existing interac- of an individual. A lot of research work has been done in
tive models might not be enough to keep them motivated to this area, by employing machine learning algorithms on past
engage in fitness-related activities. user activity data [20], heart rate data [6], and accelerome-
The proposed framework incorporates two critical mod- ter data [4, 5] to identify the type of activity, and/or estimate
ules: an activity classifier and a ranking and recommenda- caloric consumption. In [15], the authors use the phone
tion engine. We use machine learning algorithms on activity accelerometer data and the WEKA tool to aggregate raw
data to build predictive models that classify the user’s activ- time series data and generate a predictive model for activ-
ity into specific types. We build user profiles reflecting their ity recognition. Contrary to prior work, this paper focuses
current lifestyle (e.g., sedentary vs. active), age, weight, on using a single device conveniently kept anywhere, rather
goals (e.g., time spent exercising each week), and prefer- than multiple devices distributed over the body for tracking
ences (e.g., favorite fitness activities, level of intensity). purposes. In [16], the authors use an on-body chest sen-
This user profile is fed to a hybrid recommendation system sor in coordination with a smartphone to collect the data
that matches the user’s profile to available activities, ranked for the activities performed by the individual, whether static
in terms of similarity, but also taking into consideration the or dynamic. In [17], the authors propose a fitness architec-
geo-location and time availability. ture named Digital Fitness Connector (DFC), which allows
In addition, PRO-Fit uses collaborative filtering to gener- the user to monitor physical activity in real-time as well
ate activity and “fitness buddy” recommendations to users as post-workout. It captures and stores data collected from
of fitness tracking applications. In a nutshell, the recom- health and fitness related sensors. DFC works with smart-
mendation engine takes as input the user’s activity profile, phone platform but the user has the flexibility in carrying
availability and location, and finds similar users. The ones the smartphone or just the DFC. The majority of the pro-
with whom the user has stronger ties (in terms of location, posed approaches employ decision trees and their scalable
social relationship, and preferences) are ranked higher. The variations (such as random forests) to perform the activity
system uses these similarities to identify potential “fitness classification [31], however clustering approaches have also
buddies” but also to generate new activity recommenda- been used to split activity data into categories [24]. While
tions for the user. For instance, PRO-Fit might recommend most of existing works focus on improving the activity pre-
a 1-h yoga class at the University fitness center during diction process, most require extensive user profiling and
lunch time for user A, who is employee at the University, interaction throughout the day. In our previous work [11],
and 20-min jogging at the nearest park for user B, who we proposed the use of Gradient Boosted Trees to clas-
is a student and has 30 min between classes. In addition, sify a user’s activity, as recorded by a wearable device’s
it might recommend user B as a cardio fitness buddy to accelerometer. We integrated it in an application that sched-
user A when both of them are available for one hour dur- uled workout sessions based on user’s goals, their preferred
ing lunch time on a day that both of them are located on activity, and their availability, requiring minimal interaction
campus. from the user.
Pers Ubiquit Comput

While research has shown that exercising in groups or system. The only recommender system found so far in
having accountability partners or fitness buddies leads to the healthcare domain that extends the collaborative filter-
higher exercise adherence [13, 14], very few research works ing approach with topic- and sentiment-related information
exist that have focused on this subject from a technical from user-provided reviews is a doctor recommender sys-
standpoint. In [9], the authors propose the use of gamifi- tem called iDoctor [33]. In that work, authors employ the
cation through an application and show that cooperation Yelp dataset for extracting reviews and ratings for doctors
among users increased the effort put and enhanced the and evaluating their system. However, the incorporation of
physical activities of participants. In this study, the user social information is included in their plans for future work.
connections were virtual (using the app). Other related In a nutshell, we propose a framework that minimizes
studies focus mostly on the user experience, through a the need for user input and allows the end user to keep a
human-computer interaction and human factors’ point of healthy, active lifestyle by proactively reminding him/her
view [2, 19]. about their goals and generating personalized fitness rec-
In this work, we view this problem from a social rec- ommendations. Contrary to previous work, this framework
ommendation systems’ perspective. Tang et al. [30] give a integrates collaborative filtering to generate activity and fit-
narrow definition of social recommendation as “any rec- ness buddy recommendations, using as input both its users’
ommendation with online social relations as an additional activities and schedules, as well as their social network and
input, i.e., augmenting an existing recommendation engine geo-location. To the best of our knowledge, this is the first
with additional social signals,” while a broader defini- work to integrate social recommendations in a personalized
tion refers to recommender systems targeting social media fitness assistant framework.
domains such as blogs and microblogs, multimedia, ques-
tion answering, job finding, and news sites [18]. In all
the above domains, typical collaborative filtering (other 3 PRO-Fit architecture
user preferences) is combined with social-based filtering
(friends’ preferences) and individual filtering (user prefer- The high-level system architecture is shown in Fig. 1.
ences) in order to improve the quality of recommendations. The framework’s main modules are the PRO-Fit UI, the
In the survey work of Bernardes et al. [7], authors con- Activity Tracking & Classification module, the Calendar
clude that the field of social Recommenders Systems (RS) Integration Manager, and the Social Recommendation Sys-
built on implicit social networks seems particularly promis- tem. The application collects and generates various types of
ing, propose a social filtering formalism, and with their data; it collects and analyzes accelerometer data, integrates
experiments on music and movie preference datasets, they the user’s external calendar data, as well as their contacts
find that one has to test and try a full repertoire of can- (address book and social network-derived data), GPS sig-
didate RS, fine-tune parameters and select the best RS for nal, but also stores profile and preference data as input by
the performance indicator he/she cares for. Authors in [32] the user through the application. All the data are stored in
study the efficiency of social recommender networks merg- the application’s data store.
ing the social graph with the co-rating graph and consider In this section, we provide an overview of the Pro-Fit UI,
several variations by altering the graph topology and edge Activity Tracking & Classification and Calendar Integration
weights. With experiments on the Yelp dataset, they con- Manager modules. For more details the reader may refer to
clude that social network can improve the recommendations [6, 7]. The Social Recommendation System is discussed in
produced by collaborative filtering algorithms when a user detail in Section 4.
makes more than one connection.
In our work, we consider our recommendation system to 3.1 User interface and PRO-fit UI
be a social one as (a) it applies to the social network of the
users of the application, but also (b) it can integrate social The activity tracking front-end can be any wearable device,
graph-based information to enhance the recommendation including the user’s cell phone, as long as it has an
process. The literature survey performed so far shows that accelerometer. The accelerometer sends activity data to the
most works employ existing datasets from music or movie front-end mobile application. The users interact with the
rating networks to experimentally evaluate the models or mobile application through a dashboard where they can cre-
algorithms proposed, but none of them actually applies the ate and update their profile, including rating several types
proposed solution to a real-world application. Moreover, of activities and set their health and fitness goals. More
despite the positive results attained from the use of social specifically, once the user logs in to the system for the first
networks in motivating the users of fitness applications to time, the system requires from them to build their profile,
exercise [3, 29], no fitness applications currently exist that by providing demographic information (such as age, gen-
recommend activities to users using a social recommender der, and location), as well as their health and fitness goals
Pers Ubiquit Comput

Fig. 1 PRO-Fit architecture

(such as times of exercise per time period t, and calories that will be used as input to the classification process. The
burnt per time period t). Most importantly, the users are pro- time windows are parameters of the system and can be dif-
vided with a list of activities (e.g., running, walking, and ferent for each user and each activity. Figure 2 details the
biking) and are asked to rate them, in a scale of 1 to 10, in process of defining these windows. In the first step, the
terms of how much they enjoy to participate in each activ- records in the original data store are grouped by user id and
ity. This process, handled by the Profile Manager and the activity. After grouping is done, the records are sorted by
Goal Manager, needs to be performed only once, unless the timestamp in ascending order. The next step is to identify
user wants to update their profile or set new goals. The third the so-called “jumps,” that are time periods when no data
component of this module, the Session Manager, is respon- is collected (the jump time interval is a parameter of the
sible for pushing notifications to the user regarding available framework that is determined experimentally).
time slots, fitness buddies, etc., as discussed in the following Using the preprocessed accelerometer data, we identify the
subsections. It also allows the user to set her own schedule following features that are subsequently used as input to the
manually. The system connects to each user’s address book machine learning algorithm that classifies the user’s activ-
and/or social network, and also interfaces with the user’s ity in one of the pre-defined types: average acceleration
calendar through the Calendar Integration Manager. (calculated for each axis), standard deviation (calculated for
each axis), average absolute difference (the average of the
3.2 Activity tracking and classification module difference between the value of each input sample records
and mean of the total input sample records, calculated for
The system collects accelerometer data from the user’s each axis), average resultant acceleration (the average of
wearable device or phone and feeds them into a classi- the square root of sum the squares of values of each axis),
fier that has been trained to recognize and classify the and time between peaks (the time in milliseconds between
user’s activity into one of pre-defined types of activi- the peaks in the sine wave for each axis).
ties (e.g., walking, running, jogging, cycling, and climb- The features are calculated for a particular window size
ing/descending stairs). such that the user’s activity is classified for each of these
The collected accelerometer data consists of the user id, windows. The feature “time between peaks” is useful to
a timestamp, and the x, y and z values in the accelerometer find repetitive patterns such as walking and jogging. In
coordinate system. The activity data needs to be first pre- our previous work, we performed an experimental evalua-
processed to identify features within a specific time window tion of various machine learning algorithms and concluded
Pers Ubiquit Comput

Fig. 2 Data processing


architecture

that tree-based models, and specifically Gradient Boosted continuously updated through the Activity Tracker & Clas-
Trees, outperformed other methods in correctly classifying sification module) and recommends several fitness sessions
the users’ activity [6]. to the user. To achieve this, the system first calculates the
Every time the user works out, the Classification Module time needed to complete each preferred activity, and then
automatically identifies and logs their activity and updates finds available slots in their calendar. The user can accept
the user’s profile. Moreover, the updated profile data is fed or decline the recommendations. The accepted sessions are
in the Activity Recommendation Engine that, when applica- registered on the user’s calendar, and prior to the beginning
ble, recommends new activities to the user (the Activity Rec- of the session, the application sends a push notification on
ommendation Engine is part of the Social Recommendation the user’s device.
Engine discussed in Section 4).

3.3 Calendar integration manager and fitness session 4 Social recommendation system
recommendations
The social recommendation system includes two main mod-
The Calendar Integration Manager is responsible for the ules, namely the Activity Recommendation Engine and the
integration of the user’s external calendar accounts with the Fitness Buddies Recommendation Engine. The main input
PRO-Fit application. The PRO-Fit application syncs all the to the recommendation process is the m × n utility matrix of
events from all integrated calendars and recommends the m users and n activities. We denote a user profile as:
best time for the workout as per the goal set by the user. The
u =< pu1 , ..., pun >, puj ∈ [0, r]
user can add and delete calendar accounts into the PRO-Fit
application through the UI. Credentials are stored securely where puj represents the preference of user u for activity
in PRO-Fit’s data store to access the user’s calendar data aj , r is the maximum rating, and puj = 0 means that the
offline. The user’s availability and blocked time slots from user has not expressed any positive or negative opinion for
all integrated calendars, along with the user’s profile and a particular activity. One major problem for recommender
activity data are used as input to recommend both fitness systems, which are based on user profile information is the
sessions, described here, as well as social recommendations, cold-start problem that refers to new users who have not yet
described in Section 4. used the system [23]. Since the system does not contain any
As previously mentioned, the user is able to set weekly information about such users’ activities (and as a result their
or monthly fitness goals (e.g., total calories to burn, total user profile is empty), it is not possible to provide recom-
duration of activities). Each week, PRO-Fit takes as input mendations based on users with similar profiles. In order to
the user’s BMI (Body Mass Index), their goal, and their avoid this cold-start problem, the PRO-Fit system requests
activity preferences (originally input during registration and from new users to rate their favorite activities on a scale 1 to
Pers Ubiquit Comput

5 (upon registration) and this information is used to initialize Table 2 Example: user pairwise similarity scores using Pearson’s
their profiles. Correlation Coefficient on the matching activities and a normalization
to [0, 1]
User preference may change over time, and these stated
preferences may also differ from the actual activities the sim(u,v) A B C
user ends up performing. In PRO-Fit, the user profiles are
not static and the preference scores are updated each time A 1.000 0.005 0.854
the system logs a user activity. More specifically, the pref- B 0.005 1.000 0.371
erence score puj of user u for an activity j is updated using C 0.854 0.371 1.000
the following formula:
 
|auj | where Iu denotes the list of activities the user u has per-
puj = max puj , puj + n (1) formed or rated, p̄u and p̄v are the average ratings of users u
j =1 |auj |
or v respectively and pui , pvi are the ratings of users u and
where |auj | represents the number of times user u per- v, respectively, for activity i.1 The values of r range in the
formed activity j so far. In essence, the user-provided [−1, 1], so we normalize them to [0, 1] with the following
ratings remain unchanged until the user starts participating transformation (3).
in that activity. The frequency of participation affects the
r(u, v) + 1
overall rating thereafter. According to (1), each time the sim(u, v) = (3)
user repeats the activity (i.e., |auj |), the respective prefer- 2
ence score increases by a fraction which depends on the The similarity matrix generated by the data of Table 1 is
total numberof performed activities of any kind in the same shown in Table 2.
period (i.e. nj=1 |auj |). In order to avoid preference scores These scores may be used directly to rank the users based
to reach the highest value after some time, we normalize on similarity. In this example, as empirically inferred, user
the preference scores for all activities at the end of each C is more similar to user A than user B. Accordingly, users
period, 
according to themaximum preference score for that A and B have a relatively small similarity. However, this is
puj not the final ranked list provided to the user. Instead, we
period puj = maxpu . A month-sized period is used in calculate the social similarity, which factors in the strength
j
our prototype implementation but any other period can be of the connection between two users of the framework and
used instead. As a result, the preference score for activities is defined as:
that are not performed frequently decreases over time. 1
socSim(u, v) = · sim(u, v) (4)
d[u, v]
4.1 Fitness buddies’ recommendations
where d[u, v] measures the degree of connectivity between
users u and v within a social network. This may be imple-
Once the user profiles are established, we calculate the user
mented in various ways, the simplest being to define the
similarities, based on the intuition that the more similar
distance between edges u and v in the social graph (so
likes/dislikes two users have in terms of activities, the more
for direct connections, socSim(u, v) is equal to sim(u, v)),
similar they are. For instance, in the toy example depicted
and is set to a very small number or zero for users with
in Table 1, we can (empirically) infer that users A and C are
no connection in the social graph. However, more socially-
more similar than any of them is with B.
enhanced metrics may be used, such as incorporating the
To formally calculate such similarities, we use the Pear-
total number of common friends (i.e., the overlap of the two
son’s correlation coefficient (r) :
 users’ social graphs), etc.

(pui − p̄u )(pvi − p̄v ) Once the social similarities are calculated, the last step
i∈Iu Iv
r(u, v) =     (2) is to rank the users based on their geolocation and avail-

(pui − p̄u )2 
(pvi − p̄v )2 ability, as the system needs to recommend fitness buddies
i∈Iu Iv i∈Iu Iv who are physically located close to the user and available
around the same time for exercise. To perform this, the sys-
Table 1 Example: user profiles for three users and five activities tem calculates a mileage radius around each user and rejects
(preference scale 1–5) users falling outside the radius, while ranking higher the
Users/activities Walking Running Cycling Cardio Yoga users who are closer to the center of the circle (i.e., the
user’s current location, as identified by their device’s GPS).
A 3 2 5
1 Actually,Pearson correlation coefficient examines all pairs of ratings
B 5 4 4 1
C 3 3 5 4 assuming 0 when a rating is missing. In order to avoid the effect of
missing ratings, we consider only activities rated by both users.
Pers Ubiquit Comput

The Calendar Integration Module then helps to filter out will put it high in the list of recommendations. In the case
the users with conflicting schedules, and the system finally of item-based recommendations, which are more applicable
recommends as fitness buddies those users who are simi- to systems with many users and few items, the algorithm
lar in terms of activity preferences and social relations, are chooses the activities that have a similar preference profile
close-by, and have non-conflicting schedules. among users with the top ranked activities of the current
user and adds them to the recommendation list. For exam-
4.2 Activity recommendations ple, in Fig. 3, activities 2 and 5 present a high similarity
in user ratings (Pearson’s r is 0.91), which makes either of
In order to recommend new activities, we can employ any them an ideal (item-based) recommendation for users who
collaborative filtering approach, having as input the user- perform the other. Finally, matrix factorization techniques,
activity matrix introduced previously. In this work, we which scale better in large preference datasets, do not calcu-
considered the three most widely used collaborative fil- late similarities to predict ratings. Instead, taking the same
tering techniques, namely user-based [1] and item-based user-activity preference matrix as input, they train a model
[27] collaborative filtering, and matrix factorization [21]. which learns the latent factors (also called latent features)
Given a user-activity matrix as input (like the one shown for users and activities from the actual ratings. The number
in Table 1, or the example shown in Fig. 3), the objective of factors f is usually smaller than the number of users or
of collaborative filtering is to predict the missing values, activities and matrix factorization predicts the missing pref-
which correspond to the missing activity preferences of each erence scores (ratings) by multiplying the user factors by
user’s profile. The intuition behind this prediction process activity factors.
is to find activities of potential interest to the user, that the Due to the size of the input data (which in the social
user has not yet rated (or performed) but other, similar users, recommender context include a social network), and after a
have already performed and liked. Once the missing values preliminary experimental evaluation of the three approaches
are predicted, the system ranks and recommends to the user with small-scale datasets, we decided to adopt a latent factor
the activities that receive the highest scores. The social net- approach to this problem. In the context of rating-based rec-
work information is employed to re-evaluate the similarity ommender systems, the intuition behind latent factor models
between user preferences. For example, in Fig. 3, the prefer- is that both users and items can be characterized by a num-
ences of u1 will be affected by u2 who is a direct friend but ber of factors. These factors, not necessarily understandable
also by u5 who is a friend of a friend (foaf) and has similar by humans, are inferred by the users’ rating patterns. Latent
interests in the activities. factors can be interpreted in our case as the amount of skills
In the case of user-based recommendations, the algorithm (speed, power, agility, etc) required by an activity or the
chooses the top-k users with similar interests to the current amount of skills that a user is interested in. For example,
user and predicts the preference scores for any activity that in Fig. 3, the latent factors may correspond to the activity
the current user has not yet practiced or rated, by averag- using a bicycle (factor #1) or being a running (factor #2) or
ing the scores of other users. For example, in Fig. 3, user static (factor #3) activity. In the new space of latent factors
u1 and user u5 have very similar preferences, based on the activities 2 and 5, which both include a bicycle (mountain
ratings they provided, with the sim(u1 , u5 ) being at 0.92. or street) will have high values in the first factor and lower
So if u5 has high preference in another activity that is cur- in the other two, whereas the yoga activity (in the third col-
rently missing from u1 ’s profile, the user-based algorithm umn) will be mapped to high values in the static activity

Fig. 3 An illustrative example,


comprising social network
information and activity ratings
Pers Ubiquit Comput

factor and lower or zero values to the other two factors. how good it predicts user ratings. For this purpose, popular
Similar mappings will be applied to user preference vectors, error-based metrics can be employed, such as mean abso-
through factorization. lute error (MAE) or root mean squared error (RMSE), which
The most successful realization of latent factor models only consider predictions on items in the test set. Error-
for recommender systems is based on matrix factorization. based metrics are useful under the assumption that a system
In this approach, the utility (user-activity) matrix is decom- that provides more accurate predictions is preferred by the
posed into a user-factor and an activity-factor matrix. High user [28].
correspondence between user and activity factors leads to Assuming that the recommender system generates pre-
higher predicted ratings. dicted ratings p̂ua for a test set T of user-activity pairs
More formally, let the users U and the activities A be (u,a) for which the true ratings pua are known. Root mean
mapped to a joint latent factor space of dimensionality f , squared error (RMSE) between the predicted and actual
where each user u is associated with a vector xu ∈ R f ratings is given by:
and each activity a is associated with a vector ya ∈ R f . In
1
this representation, the elements of xu and ya respectively RMSE =  (p̂ua − pua )2 (7)
represent the extent to which each user/activity possesses n
(u,a)∈T
these factors (i.e., the skills that are required or trained by
the activity). Therefore, the dot product of the two vectors where n is the size of set T . Mean absolute error (MAE) is
yaT · xu is expected to capture the interest of the user for the a simpler alternative, given by:
activities’ factors and, thus, serve to estimate p̂ua as follows: 1
MAE = |p̂ua − pua | (8)
n
p̂ua = yaT · xu (5) (u,a)∈T

The training phase of the model, assumes the prediction


of several preference scores (similar to p̂ua ) and compares
5 Experimental evaluation
them to the actual scores given by users (e.g., to the actual
pua ). The calibration of the two feature vectors aims at the
Our objective in this experimental evaluation is twofold: (a)
minimization the regularized square error on the existing
to evaluate the activity recommendation engine in terms of
user preferences:
prediction accuracy and (b) to assess whether the introduc-
minx,y pua − yaT · xu + λ(xu 2 + ya 2 ) (6) tion of the social element improves the overall recommen-
dation process. Unfortunately, while some real-life datasets
where the constant λ is used to control the extent of regular- that include information on users and their preferred activ-
ization. We solve (6) using Alternating Least Squares (ALS) ities exist, these do not incorporate any social information.
[21]. In essence, ALS alternates between keeping either the We therefore decided to evaluate the accuracy of the activ-
xu ’s or the ya ’s fixed, and recomputes the other by solving ity recommendation engine using the activity dataset, but
a least squares problem. In that way, the factor vectors can without the social input, and employ a non-activity dataset
be computed independently of each other, resulting in faster that includes a social graph and can be directly applied to
real-time responses. Another advantage of ALS compared our problem, in order to evaluate our social recommender
to other matrix factorization techniques, such as stochas- system. The first experiment aims to evaluate the quality of
tic gradient descent is that it is highly parallelizable with activity recommendations in the absence of social informa-
implementations on parallel and distributed platforms such tion, using real activity data for building and evaluating the
as Mahout or Spark. PRO-Fit employs the ALS implemen- activity preference model. The second experiment aims to
tation of Mahout (ALSWR), an iterative algorithm which highlight that the use of social information can be beneficial
aims at minimizing a cost function at each step and stops for the quality of recommendations. We discuss our findings
when a certain stopping criterion is met or a predefined in the subsections that follow.
number of iterations (maxIteration) is executed.
Once p̂ua is calculated for each user u, and their non- 5.1 Evaluation of activity recommendations
previously rated activities a, the system ranks all activities
and recommends to the user the activities that receive the In order to evaluate how accurately the system is able to
highest predicted preference score. predict the preferred activities of each user, we used the
Actitracker dataset collected by Kwapisz et al. [22], publicly
4.3 Evaluation of recommendations available through the wireless sensor data mining (WISDM)
lab2 [25]. This dataset includes activity data collected from
The last but most important step when developing a recom-
mender system is to measure its performance on the basis of 2 http://www.cis.fordham.edu/wisdm/dataset.php#actitracker.
Pers Ubiquit Comput

Table 3 RMSE on validation set for Matrix Factorization algorithm Table 4 MAE on validation set for Matrix Factorization algorithm
(λ = 0.1) (λ = 0.1)

RMSE MAE

0.01 0.05 0.1 0.5 1 0.01 0.05 0.1 0.5 1

5 0.1999 0.1925 0.1868 0.2411 0.256 5 0.1179 0.1141 0.1103 0.1455 0.1593
10 0.2016 0.1912 0.1877 0.2412 0.256 10 0.1176 0.114 0.1113 0.1454 0.1593
20 0.1936 0.192 0.1887 0.2412 0.256 20 0.1243 0.1142 0.1112 0.1454 0.1593
30 0.2023 0.1916 0.1889 0.2412 0.256 30 0.1295 0.1138 0.1113 0.1454 0.1593

android devices of a number of volunteers who participated algorithms, namely user-based and item-based collaborative
in the experiment performing one or more out of 6 distinct filtering. From that experimental evaluation, we observed
activities. Although the tracked activities are not strictly that user-based collaborative filtering was performing sim-
related to fitness (for example standing or lying down) ilarly to matrix factorization. Due to the scalability and
they do expose each user’s preferences of specific physi- flexibility advantages of the matrix factorization approach,
cal activities versus others, and are recorded in a level of and its ability to handle better sparse matrices, we decided
detail (in terms of data collected) that reflects what would to adopt this algorithm in the prototype’s implementation.
be collected by the PRO-Fit application. Since this real-life
dataset has been used previously to evaluate similar sys- 5.2 Evaluation of social recommendations
tems, we decided to use it in our evaluation as well. The
data was collected at an interval of 50 ms, which means As mentioned previously, there is currently no activity
it contains 20 samples per second. It contains user infor- dataset available that also incorporates a social element.
mation along with their tri-axial axis information and the Therefore, we had to employ a different dataset, that could
timestamp showing when it was collected. Since our aim is be used as an approximation of the “users having activity
to evaluate the activity recommendation algorithm and not preferences” scenario, while incorporating a social element
the activity classification algorithm,3 we employed only the at the same time. Our goal is to evaluate whether the prefer-
manually labeled dataset, which comprises data from 225 ences of close friends can affect (positively) the recommen-
users and kept only the first three attributes of each tuple, dations, when weighed more heavily in the recommendation
namely the user id, activity and timestamp. In order to cal- process. For this reason, we decided to use the well-known
culate the preferences of a user for a particular activity, and broadly used Yelp challenge dataset.4 This is a very
we calculated the normalized sum of each activity for each rich dataset, but for the purposes of our study, we only used
user, as described in Eq. 1 (please note, that in this dataset, the following information for each user: user id, friends ids,
the user preferences puj are initially set to 0 as no such restaurants rated, ratings. Of course, restaurant preferences
explicit information is provided). As a result, we ended with are not fitness activity preferences. However, they still have
a dataset comprising 480 (activity) preference scores for the an activity preference aspect and, more importantly, such
225 users. preferences can be affected by close friends. The premise
In order to find the optimal values for the parameters is very similar in both scenarios: in the PRO-Fit recom-
λ and f of the Matrix Factorization model, we performed mendations, we expect that users will share similar activity
multiple random sampling (5 times), on a 60/20/20 split preferences with those who are closer to them (in a social
(for training/validation/testing respectively) measuring the network context), while in the restaurant context, we assume
RMSE and MAE errors (both measuring the error between that users will share similar preferences with their closest
the predicted and the actual value of the activity preference). friends (again reflected as connections in the virtual social
Looking at the results of the evaluation, shown in Tables 3 network).
and 4, we observe that the optimal values are given when Similarly to the previous set of experiments, our main
λ = 0.1 and f = 5 for both RMSE and MAE. input is the triplet user id, restaurant (as in activity), rat-
At this point, we would like to point out that we have ing (as in preference). However, a fourth very important
performed similar experiments (on the same dataset) for input is the social network of friends and friends-of-friends
the two most popular neighborhood collaborative filtering

3 This algorithm was evaluated in our previous work [11]. 4 https://www.yelp.com/dataset challenge.
Pers Ubiquit Comput

of the user. Since Yelp’s social network is secondary to its Table 6 RMSE and optimal parameter settings for various input
main goal (of allowing users to rate businesses), it is rather datasets
sparse. Moreover, it only made sense to select user connec- Experiment f λ numIter RMSE
tions who share the same restaurant preferences, i.e. reside
in the same area. Therefore, we focused only on the city of #1 OneD 20 0.50 20 1.215
Las Vegas, and selected, as starting “seed” the 2030 users #2 - BasOneD 30 0.50 20 1.27
who had at least one rating of a Las Vegas business and the #3 - TwoD 30 0.10 20 1.09
highest number of friends. We then performed five experi- #4 - BasTwoD 5 0.50 20 1.28
ments, using different instantiations of the social similarity #5 - BasAll 20 0.50 10 1.18
metric socSim(u, v) of (4), depending on the value of the
social connectivity parameter d[u, v], that in turn resulted
in a different input dataset: one degree of separation, d[u, v] = 1/2 when users u and
v have two degrees of separation, and 0 otherwise. Let Fu
denote the friends of user u, then (4) becomes:

Experiment 1 – 1-degree of separation (OneD) In this ⎨ sim(u, v), if v ∈ Fu
experiment, we expanded the original “seed” dataset of socSim(u, v) = sim(u,v) , if v ∈ Fz &z ∈ Fu (11)
2030 users with their connections. In this experiment, ⎩ 2
0, otherwise
d[u, v] = 1 when users u and v have one degree of sepa-
rations and 0 otherwise. Let Fu denote the “friends” of user
u (i.e. u’s direct connections in the social graph), then (4) Experiment 4 – Baseline two (BasTwoD) In this exper-
becomes: iment, we expanded the original “seed” dataset of 2030
users u to become as big (in terms of number of users) as

sim(u, v), if v ∈ Fu that of the one in Experiment 3, by randomly selecting the
socSim(u, v) = (9)
0, otherwise additional users. Let BB denote the set of users that were
randomly selected in this experiment, then social similarity
is computed as:
Experiment 2 – Baseline one (BasOneD) In this experi- 
sim(u, v), if v ∈ BB
ment, we expanded the original “seed” dataset of 2030 users socSim(u, v) = (12)
0, otherwise
to become as big (in terms of number of users) as that of the
one in Experiment 1, by randomly selecting the additional
users. Let BA denote the set of users that were randomly Experiment 5 – Baseline three (BasAll) In this experi-
selected in this experiment, social similarity is computed as: ment, we used the entire Las Vegas dataset as input to the
 recommendation algorithm, eliminating the social factor.
sim(u, v), if v ∈ BA
socSim(u, v) = (10) We should point out that, since the users used as
0, otherwise
input in each experiment are different, the number of rat-
ings and businesses are also different. The numbers of
users/businesses/ratings for each of the five experiments are
Experiment 3 – 2-degrees of separation (TwoD) In this
shown in Table 5.
experiment, we expanded the original “seed” dataset of
We calculated the RMSE and MAE using a 60/20/20
2030 users with their friends and friends of their friends. In
split and 10-fold cross-validation for all possible combi-
other words, we expanded the social graph of each user to
nations of the following parameters: f = {5, 10, 20},
include all users within two degrees of separation. In this
λ = {0.01, 0.05, 0.2, 0.5, 1}, and number of iterations =
experiment, we set d[u, v] = 1 when users u and v have

Table 7 MAE and optimal parameter settings for various input


Table 5 Input datasets datasets

Dataset #Users #Businesses #Ratings Experiment f λ numIter RMSE

OneD 61,128 16,009 435,129 #1 OneD 30 0.50 20 0.954


BasOneD 61,128 11,105 235,869 #2 - BasOneD 10 0.50 10 0.917
TwoD 108,191 16,934 1,003,766 #3 - TwoD 30 0.05 20 0.782
BasTwoD 108,191 11,738 407,206 #4 - BasTwoD 10 0.50 20 0.925
BasAll 146,763 17,386 1,022,826 #5 - BasAll 30 0.50 20 0.821
Pers Ubiquit Comput

Table 8 PRO-Fit user study


responses’ summary Question Responses
(Range or %)

How many sessions did you create manually per week? 2 to 6


How many session recommendations did you get per week? 4 to 7
How many calendar events do you have on average per day? 0 to 5
Did you find session rescheduling useful Yes 60%
No 40%
How many reschedule recommendations did you accept? 58% Accepted
42% Rejected
What time did you prefer to schedule your session? Morning 30%
Afternoon 15%
Evening 55%
Do you feel the PRO-Fit app helped you Yes 45%
be motivated to do your workout? No 55%
Do you feel the PRO-Fit app helped you be motivated Yes 70%
to do workout on scheduled time? No 30%
How do you rate the rescheduling sessions placed? Useful avg. 60%
Did your analytics help you to know your workout pattern? Yes 67%
No 33%
What is the best feature you like about the app you are using? Session recommendation 25%
Session reschedule 45%
Goal tracking 30%
Would you like to recommend PRO-Fit app Yes 64%
to your friends & family? No 36%

{10, 20}5 for the five input datasets. Tables 6 and 7 show values of 0.1 on a 0–5 scale rating and of 1 on a 0–10 scale
the combinations that generated the best (lowest) RMSE are considered very good.
and MAE errors for each experiment. We observe that in
both cases, the social recommender system that uses as
input the extended network spanning two degrees of sep- 6 User study
aration for each “seed” user, outperforms the remaining
approaches. This verifies our intuition that incorporating the In order to evaluate the usability of the PRO-Fit application
social element results in more accurate preference predic- and measure the engagement of end users, we conducted a
tions. Although there is no direct comparison between the user study including 24 people, who were relatively active
results of this and the previous experiment that evaluated (workout for at least 3 days a week or more). The user
the activity recommendations (Section 5.1), the increased group consisted of 16 males and 8 females, between 20 and
MAE and RMSE values in the second experiment can also 35 years old, all residing in the broader San Francisco bay
be explained by the different scale of user ratings in the area. We requested the users to install the PRO-Fit app on
two datasets. More specifically, the user ratings in the Yelp their smartphones and asked them to use it for 15 days.6
dataset have been normalized to a 0–10 integer scale, since At the end of the 15-day period, we asked the participants
the original dataset contained 0–5 “star” ratings allowing for to respond to a set of questions and also give us some ver-
half stars, whereas the ratings we created for user activity bal feedback. Table 8 includes a summary of the survey
preferences were on a 0–5 integer scale. As a result, MAE questions and responses. Below are some of the comments
received from the survey:
5 The (maximum) number of iterations is one of the stopping criteria – “I really liked the session reschedule recommendation
for the iterative implementation of ALS for Mahout that we employed. as it automatically detected conflicting sessions”
The more iterations, the most possible for the algorithm to find an opti-
mum solution. Using 15 iterations is a reasonable default to try (https://
mahout.apache.org/users/recommender/intro-als-hadoop.html). How- 6A more detailed description of the PRO-Fit prototype as well as
ever, we also tested 10 and 20 iterations. application screenshots can be found in [12]
Pers Ubiquit Comput

– “I like the app feature of scanning all my calendar In the evaluation, we experimented with three different
events and providing proactive session recommenda- parameters of the matrix factorization algorithm for collabo-
tions without any manual pain to organize things” rative filtering and found that the optimum number of latent
– “Overall, the app experience and its functionality is factors was 5. However, one must be careful in a differ-
good, however there can be lot of improvements in the ent setup. For example, if the system detects 60 activities
performance of the app.” instead of 6, or monitors activities with completely diverse
– “I found this app really amazing to plan out my exercise skills’ profile, then the optimum number of latent factors
plan for over a 2-week period, which really motivated may differ. In the second experiment, the structure of the
me to strictly follow the plan until completed.” social network (e.g., if it is more dense or sparse), will affect
– “Looks interesting, but should reduce the data the choice of parameters. However, the experiments with
consumption” several parameter combinations reported the best results
– “Great app, useful for lazy and laid back people to get when the second degree friends (friends of a friend) were
motivated and workout :)” used for recommending activities.
We also performed a user study having 24 participants
From the quantitative and qualitative responses, we use the PRO-Fit prototype to set fitness goals and sched-
observed that even in its prototype mode, the PRO-Fit appli- ule activity sessions. As with any pilot study, there are
cation was successful in motivating the majority of the par- limitations to the validity of any resultant claims made.
ticipants, with automatic session scheduling and reschedul- However,the results from this study were very encourag-
ing whenever they added entries to their personal/work ing and, even though the participants used a prototype, the
calendars, being the most popular features. Some of the majority of them rated it very positively. A detailed anal-
criticism we received had to do with the performance of ysis of usage analytics that will highlight the time of the
the application itself, something expected as this applica- day they tend to accept recommendations, their preference
tion still runs in prototype mode. We should also note that to social-based or similarity-based recommendations etc, is
the socially enhanced part of the application could not be within our next steps and is expected to improve the system
thoroughly evaluated in this small-scale user study as there performance in the user acceptance tests.
was no overlap between the participants’ contacts and the As part of our future work, we plan to explore and eval-
rest user group. Finally, we observed that the majority of uate different ways to calculate the tie strengths (and as a
users said that this application was successful in motivating consequence the social similarity) between the users of the
them to keep their planned activities, and that they would application, and extend the prototype to incorporate exter-
recommend it to a friend. nal social networks in addition to the user’s contacts, such
that we can better evaluate empirically the user’s experience.
Moreover, we aim to publicize anonymous data from the
7 Conclusions PRO-Fit social network and activity preference database,
once we reach a reasonably sized user-base.
In this paper, we presented PRO-Fit, a personalized fitness
assistant framework that integrates activity data collected Acknowledgements This work was partially funded by San Jose
by the user’s wearable device or smart phone, their activ- State University’s Charles W. Davidson College of Engineering stu-
dent research mini-grant.
ity preferences and fitness goals, their availability and their
social network, and automatically generates fitness sched-
ules and socially enhanced recommendations of new activ-
References
ities, as well as fitness buddies. One of the issues faced by
this study is that there does not exist a publicly available
1. Adomavicius G, Tuzhilin A (2005) Toward the next generation of
dataset that comprises both social information and activity recommender systems: a survey of the state-of-the-art and possible
related preferences. For this reason, we used two differ- extensions. IEEE Trans Knowl Data Eng 17(6):734–749
ent datasets: one for extracting physical activity preferences 2. Ahtinen A, Isomursu M, Mukhtar M, Mäntyjärvi J, Häkkilä J,
and one that includes both user preferences and social Blom J (2009) Designing social features for mobile and ubiqui-
tous wellness applications. In: Proceedings of the 8th international
network information collected in a different context. Our conference on mobile and ubiquitous multimedia. ACM, p 12
experimental evaluation, including two real-life datasets, 3. Anderson I, Maitland J, Sherwood S, Barkhuus L, Chalmers M,
showed that the socially enhanced recommendations out- Hall M, Brown B, Muller H (2007) Shakra: tracking and shar-
perform the non-socially enhanced ones. More specifically, ing daily activity levels with unaugmented mobile phones. Mobile
Netw Appl 12(2–3):185–199
the algorithm that predicts a user’s preference when the 4. Anjum A, Ilyas M (2013) Activity recognition using smartphone
social network includes connections up to two degrees of sensors. In: Consumer communications and networking confer-
separation, was the most accurate among all we examined. ence (CCNC), 2013 IEEE, pp 914–919
Pers Ubiquit Comput

5. Ayu MA, Mantoro T, Matin AFA, Basamh SS (2011) Recognizing International conference on persuasive technology. Springer, pp
user activity based on accelerometer data from a mobile phone. In: 150–161
2011 IEEE symposium on computers & informatics (ISCI). IEEE, 20. Hong J-H, Ramos J, Dey AK (2016) Toward personalized activity
pp 617–621 recognition systems with a semipopulation approach. IEEE Trans
6. Bajpai A, Jilla V, Tiwari VN, Venkatesan SM, Narayanan R Human-Mach Syst 46(1):101–112
(2015) Quantifiable fitness tracking using wearable devices. In: 21. Koren Y, Bell R, Volinsky C (2009) Matrix factorization
2015 37th annual international conference of the IEEE engi- techniques for recommender systems. Computer 42(8):30–37
neering in medicine and biology society (EMBC). IEEE, pp 22. Kwapisz JR, Weiss GM, Moore SA (2011) Activity recogni-
1633–1637 tion using cell phone accelerometers. ACM SigKDD Explorations
7. Bernardes D, Diaby M, Fournier R, FogelmanSoulié F, Viennet E Newsletter 12(2):74–82
(2015) A social formalism and survey for recommender systems. 23. Lam XN, Vu T, Le TD, Duong AD (2008) Addressing cold-start
ACM SIGKDD Explorations Newsletter 16(2):20–37 problem in recommendation systems. In: Proceedings of the 2nd
8. Centola D (2011) An experimental study of homophily in the international conference on ubiquitous information management
adoption of health behavior. Science 334(6060):1269–1272 and communication. ACM, pp 208–211
9. Chen Y, Pu P (2014) Healthytogether: exploring social incen- 24. Li Y, Zhang Y (2012) Application of data mining techniques in
tives for mobile fitness applications. In: Proceedings of the second sports training. In: 2012 5th international conference on biomedi-
international symposium of chinese CHI. ACM, pp 25–34 cal engineering and informatics (BMEI). IEEE, pp 954–958
10. Comstock J (2014) Mobihealthnews: half of mobile health app 25. Lockhart JW, Weiss GM, Xue JC, Gallagher ST, Grosner AB,
users are using fitness apps. http://mobihealthnews.com/30199/ Pulickal TT (2011) Design considerations for the wisdm smart
half-of-mobile-health-app-users-are-using-fitness-apps/ [online; phone-based sensor mining architecture. In: Proceedings of the
posted 21-february-2014] fifth international workshop on knowledge discovery from sensor
11. Dharia S, Jain V, Patel J, Vora J, Chawla S, Eirinaki M (2016) data. ACM, pp 25–33
Pro-Fit: a personalized fitness assistant framework. In: Proceed- 26. Messé LA, Hertel G, Kerr NL, Lount Jr RB, Park ES (2002)
ings of the 28th international conference on software engineering Knowledge of partner’s ability as a moderator of group motivation
and knowledge engineering (SEKE 2016), Redwood City, CA gains: an exploration of the Köhler discrepancy effect. J Pers Soc
12. Dharia S, Jain V, Patel J, Vora J, Yamauchi R, Eirinaki M, Psychol 82(6):935
Varlamis I (2016) Pro-Fit: exercise with friends. In: 2016 27. Sarwar B, Karypis G, Konstan J, Riedl J (2001) Item-based col-
IEEE/ACM international conference on advances in social net- laborative filtering recommendation algorithms. In: Proceedings
works analysis and mining (ASONAM). IEEE, pp 1430–1433 of the 10th international conference on world wide web. ACM, pp
13. Dishman R, Buckworth J (1996) Increasing physical activity: a 285–295
quantitative synthesis. Med Sci Sports Exerc 28(6):706 28. Shani G, Gunawardana A (2011) Evaluating recommendation sys-
14. Feltz DL, Kerr NL, Irwin BC (2011) Buddy up: the Köhler effect tems. In: Recommender systems handbook. Springer, pp 257–297
applied to health games. J Sport Exerc Psychol 33(4):506–526 29. Silva PA, Holden K, Nii A (2014) Smartphones, smart seniors,
15. Ghose S, Barua JJ (2013) A systematic approach with data mining but not-so-smart apps: a heuristic evaluation of fitness apps. In:
for analyzing physical activity for an activity recognition sys- International conference on augmented cognition. Springer, pp
tem. In: 2013 international conference on advances in electrical 347–358
engineering (ICAEE). IEEE, pp 415–420 30. Tang J, Hu X, Liu H (2013) Social recommendation: a review. Soc
16. Guiry JJ, van de Ven P, Nelson J (2012) Classification techniques Netw Anal Min 3(4):1113–1133
for smartphone based activity detection. In: 2012 IEEE 11th inter- 31. Uddin MT, Uddiny MA (2015) Human activity recognition from
national conference on cybernetic intelligent systems (CIS). IEEE, wearable sensors using extremely randomized trees. In: 2015
pp 154–158 international conference on electrical engineering and information
17. Gupta N, Jilla S (2011) Digital fitness connector: smart wearable communication technology (ICEEICT). IEEE, pp 1–6
system. In: 2011 first international conference on informatics and 32. Wong FMF, Liu Z, Chiang M (2016) On the efficiency of
computational intelligence (ICI). IEEE, pp 118–121 social recommender networks. IEEE/ACM Trans Networking
18. Guy I (2015) Social recommender systems. In: Recommender 24(4):2512–2524
systems handbook. Springer, pp 511–543 33. Zhang Y, Chen M, Huang D, Wu D, Li Y (2017) iDoctor: person-
19. Halko S, Kientz JA (2010) Personality and persuasive technology: alized and professionalized medical recommendations based on
an exploratory study on health-promoting mobile applications. In: hybrid matrix factorization. Futur Gener Comput Syst 66:30–35

You might also like