scieee AI-readable full text Open interactive document viewer

Learning user well-being and comfort through smart devices

Sousa, David José Teixeira de

Abstract

The growth of concepts such as Intelligent Environments and Internet of things allows us to understand the habits of users and consequently act to improve people’s daily lives. Through information gathering, it is thus possible to gather patterns about different kinds of human behavior and consequently build a learning model with predictive capabilities. In addition, there are increasing concerns from large companies about the influence, positive or negative, that aspects such as comfort and well-being have on the behavior and health of the population. In fact, as human beings, we are greatly influenced by the environment in which we are inserted. There are therefore conditions in a place that give us certain levels of comfort that will eventually interfere with our well-being. However, it is difficult to identify which of these factors are relevant and how they intervene in our daily lives. Also, the habits we adopt as a result of the routines we follow can contribute to improving or worsening any of these indicators With the help of the various types of sensors present, for example, in the smart devices (smartphones, smartwatches, wristbands), it is increasingly possible to collect information on these factors, easily and comprehensively. In this sense, firstly the main objective of this dissertation is thus to collect data on factors that may influence the user in order to create a user profile. These factors can be inferred through its interests, the visited locations, and its main activities. This objective involves a large-scale analysis, where there are no geographical restrictions. Furthermore, the study will be independent of the type of space (open or closed) that is explored. In that way, the perspective that will be used is from the user. Then there is an exploration of the data so that some intelligence can be inferred, and in this sense, build a mobile application capable of providing smart notifications based on user needs.

Full text

Universidade do Minho Escola de Engenharia Departamento de Inform´ atica David Jos´ e Teixeira de Sousa Learning User Well-being and Comfort through Smart Devices January 2021 Universidade do Minho Escola de Engenharia Departamento de Inform´ atica David Jos´ e Teixeira de Sousa Learning User Well-being and Comfort through Smart Devices Master dissertation Integrated Master in Informatics Engineering Dissertation supervised by C´ esar Analide F´ abio Silva January 2021 DIREITOS DE AUTOR E CONDIC¸ ˜ OES DE UTILIZAC¸ ˜ A O D O TRABALHO POR TERCEIROS Este ´ e um trabalho acad ´ emico que pode ser utilizado por terceiros desde que respeitadas as regras e boas pr ´ aticas internacionalmente aceites, no que concerne aos direitos de autor e direitos conexos. Assim, o presente trabalho pode ser utilizado nos termos previstos na licenc¸a abaixo indicada. Caso o utilizador necessite de permiss ˜ ao para poder fazer um uso do trabalho em condi c¸ ˜ oes n ˜ ao previstas no licenciamento indicado, dever ´ a contactar o autor, atrav ´ es do Reposit ´ oriUM da Universidade do Minho. Licenc¸a concedida aos utilizadores deste trabalho Atribuic¸˜ ao CC BY https://creativecommons.org/licenses/by/4.0/ i ACKNOWLEDGEMENTS I would like to start by thanking the advisor and co-advisor for this dissertation. Professor C ´ esar Analide and Professor F ´ abio Silva were crucial for the writing of a good dissertation, as well as for the realization of a good project. All the advice provided and all the availability shown allowed greater security during the entire process. I would also like to thank my family, especially my parents and my brother for always being present in good and bad times and for having a friendly word when times were more controversial. All their support was essential not only during the writing of the dissertation but also during all the years that led to this being possible. Finally, I would like to thank all my friends, for the moments not only of leisure but also of mutual help through these years. Thank you for all the support provided. To all of them and to all those who in one way or another crossed my path, I am grateful. Without you, none of this would be possible. David Sousa ii STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. iii ABSTRACT The growth of concepts such as Intelligent Environments and Internet of things allows us to understand the habits of users and consequently act to improve people’s daily lives. Through information gathering, it is thus possible to gather patterns about different kinds of human behavior and consequently build a learning model with predictive capabilities. In addition, there are increasing concerns from large companies about the influence, positive or negative, that aspects such as comfort and well-being have on the behavior and health of the population. In fact, as human beings, we are greatly influenced by the environment in which we are inserted. There are therefore conditions in a place that give us certain levels of comfort that will eventually interfere with our well-being. However, it is difficult to identify which of these factors are relevant and how they intervene in our daily lives. Also, the habits we adopt as a result of the routines we follow can contribute to improving or worsening any of these indicators With the help of the various types of sensors present, for example, in the smart devices (smartphones, smartwatches, wristbands), it is increasingly possible to collect information on these factors, easily and comprehensively. In this sense, firstly the main objective of this dissertation is thus to collect data on factors that may influence the user in order to create a user profile. These factors can be inferred through its interests, the visited locations, and its main activities. This objective involves a large-scale analysis, where there are no geographical restrictions. Furthermore, the study will be independent of the type of space (open or closed) that is explored. In that way, the perspective that will be used is from the user. Then there is an exploration of the data so that some intelligence can be inferred, and in this sense, build a mobile application capable of providing smart notifications based on user needs. Keywords: Ambient Intelligence, Comfort, Deep Learning, Machine Learning, Smart Devices, Well-being. iv RESUMO O crescimento de conceitos como os da Intelig ˆ encia Ambiente e Internet das Coisas, permitem perceber os h ´ abitos dos utilizadores e, desta forma, atuar com o intuito de melhorar o dia a dia das pessoas. Atrav ´ es da recolha de informa c¸˜ ao ´ e assim poss ´ ıvel padronizar diferentes aspetos dos comportamentos do ser humano e consequentemente construir um modelo de aprendizagem com capacidades preditivas. Para al ´ em disso, h ´ a cada vez mais preocupa c¸ ˜ oes por parte de grandes empresas, na influ ˆ encia, positiva ou negativa, que aspetos como o conforto e o bem-estar possuem no comportamento e na sa´ ude da populac¸˜ ao. De facto, como seres humanos somos bastante influenciados pelo ambiente em que nos encontramos inseridos. Existem, portanto, condi c¸ ˜ oes num local que nos proporcionam certos n ´ ıveis de conforto que, eventualmente, ir ˜ ao interferir com o nosso bem-estar. No entanto, h ´ a a dificuldade em identificar quais desses fatores s ˜ ao relevantes e de que forma interv ˆ em no nosso quotidiano. Para al ´ em disso, os h ´ abitos que adotamos resultantes das rotinas que seguimos podem contribuir para melhorar ou piorar algum destes indicadores. Assim, com a ajuda dos v ´ arios tipos de sensores presentes, por exemplo, nos v ´ arios dispositivos inteligentes (telem ´ oveis, rel ´ ogios, pulseiras) ´ e cada vez mais ampla a possibilidade de recolher informa c¸˜ ao de forma f ´ acil e abrangente. Nesse sentido, primeiramente o principal objetivo desta disserta c¸˜ ao ´ e assim recolher dados sobre fatores que podem influenciar o utilizador, de forma a criar um perfil de utiliza c¸˜ ao. Esses fatores podem ser inferidos atrav ´ es dos seus interesses, dos locais visitados, e das suas principais atividades. Deste modo, este objetivo passa por uma an ´ alise em grande escala, onde n ˜ ao existem restri c¸ ˜ oes geogr ´ aficas, sendo que o estudo efetuado ser ´ a independente do tipo de espa c¸ o (aberto ou fechado) que ´ e explorado. Desta forma, a perspetiva abordada ser ´ a sempre a do utilizador. Seguidamente, haver ´ a uma explora c¸˜ ao dos dados para que seja poss ´ ıvel gerar alguma intelig ˆ encia, e assim criar uma aplica c¸˜ ao capaz de fornecer notifica c¸ ˜ oes inteligentes assentes nas necessidades do utilizador. Palavras-Chaves: Aprendizagem M ´ aquina, Aprendizagem Profunda, Bem-estar, Conforto, Dispositivos Inteligentes, Inteligˆ encia Ambiente. v CONTENTS 1 introduction 1 1.1Motivation 1 1.2Objectives 2 1.3Methodology 2 1.4Planning 3 1.5Dissertation Structure 4 2 state of the art 5 2.1Well-being and Comfort 5 2.1.1Definition of Well-being 5 2.1.2Definition of Comfort 7 2.1.3Distinction between Well-Being and Comfort 8 2.2Ambient Intelligence 10 2.2.1Sensing 10 2.2.2Reasoning 11 2.2.3Acting 12 2.3Smart Cities 12 2.4Machine Learning 13 2.4.1Supervised Learning 14 2.4.2Unsupervised Learning 16 2.4.3Reinforcement Learning 17 2.4.4Deep Learning Algorithms 17 2.4.5Machine Learning in practice 19 2.5Composite monitoring indicators 20 2.5.1Thermal Comfort 20 2.5.2Light 21 2.5.3Noise 22 2.5.4Air Quality 22 2.5.5Ultraviolet Index 23 2.6Challenges 24 3 related work 25 3.1BeWell 25 3.2ThermOOstat 26 3.3Tracking the Transit Rider Experience 26 3.4Prosit 27 vi contents vii 3.5OpenData Applications 27 3.6Comparation with the proposal 27 4 architecture 29 4.1Prototype System 30 4.1.1Android System 30 4.1.2Flask Server 31 4.1.3Firebase Database 31 4.2Data Collector Strand 31 4.2.1What data was collected? 31 4.2.2How users can indicate their comfort or well-being? 34 4.3Smart Application Strand 36 4.3.1Wellness Place Map 37 4.3.2Smart Advice 40 5 case study 45 5.1First Case 45 5.1.1Data Analysis 45 5.1.2Model Building 47 5.2Second Case 57 5.2.1Data Analysis 58 5.2.2Model Building 59 5.3Simulation 61 5.4Results Analysis 61 6 conclusions 64 6.1Work Summary 64 6.2Relevant Work 66 6.3Future Work 66 a reference values for light 74 b thermal comfort table 75 c application interface 76 d data analysis 78 e studies result 80 1.4. Planning 3 validate all that, will be mentioned and will be considered throughout this dissertation. In this sense, the working method initially involves the collection of some articles and solutions already in force, similar to the proposed theme. Thus, by combining various approaches it will be possible to obtain a more reliable end result and thus to gain a better understanding of the themes that the dissertation involves. Finally, the working method involves the validation of the developed solution so that it can be verified that the initial problem has been solved. In short, the methodology followed is called action-research since there is a collaboration between the researcher and the member of an organization (in this case the University of Minho) to solve a problem. It is thus a cyclical process that first involves a focus selection and an identification of research questions. The next step is to collect and analysis of data. Finally, before the project be presented to the scientific community it is necessary a conclusion phase where the following project is validated. In short, “action research is not about hypothesis testing and producing empirically generalized result” (Young et al.,2010), but is about analysis of the results of the experiments that are performed. 1.4 planning According to the available time, it is possible to divide the dissertation elaboration into six essential tasks. In this sense, the first comprises a study on the proposed theme through the writing of its state of art. Still in this phase, it is intended to study some existing tools and understand the challenges the whole project faces. The second task is intended to be elaborated at the same time as the first, since it presupposes the elaboration of a pre-dissertation report to be delivered on 15 January 2020. Subsequently, implementation will begin. As it was a long and very practical phase, a three-month interval was established for the construction of what was requested (Task 3). At the end of this task, it is necessary to study the results and test the proposed solution, which is task number 4. In a final phase, it is intended to make scientific dissemination of the study carried out thus providing contributions to the entire community. Finally, the last task comprises the whole process of writing the dissertation. It is intended that this task occur simultaneously with others. Although there was a slight deviation from the dates initially set due to the global pandemic, all the defined objectives were met and achieved. This whole process, modeled initially, can be consulted in a more practical way, through a Gantt diagram, in Fig. 1. 1.5. Dissertation Structure 4 Figure 1: Work Plan 1.5 dissertation structure This dissertation is divided into six fundamental parts. The first refers to the theme definition. This part answers questions like what are the objectives and the motivations for the whole study. Still in this phase is approached the kind of methodology that will be used and the planning for finished what is proposed. The second refers to the state of the art, that is, to the definition of all concepts considered central to the understanding of the whole study. The third part shows of similar works in this area and how they are equal or different from the proposal dissertation theme. The forth will be used to allude to a general and specific architecture that can be followed to answer the main objectives of the dissertation theme. It will be presented the built application and some of the functionalities. Furthermore, it will be also described some of the main technologies used. The fifth part will present a case study with some experiments made using the developed application. In this part, the work focuses mainly on the construction of machine learning models and the results obtained through the application of different models. The six-chapter, comprises the conclusion of the entire dissertation, concerning future work. It is also presented some relevant work that alludes to the scientific contribution made. Finally, the document ends with the bibliography and with the appendices relative to the developed dissertation. 2 S TAT E O F T H E A RT 2.1 well-being and comfort As one of the focus of this dissertation is comfort and well-being, it is important to define these concepts in order to clarify their meaning. In this sense, on the next sub-chapters, is presented a little about these and how they are distinguished from each other. 2.1.1Definition of Well-being The term well-being is quite difficult to define and its refinement has been the subject of many studies over the years. It is a term that is often used by the community, but not always with a correct connotation. In fact, because of the associated confusion, we do not always know the meaning of “being well”. In this sense, several authors seek to define this concept. On the one hand, according to Elena Alatarsteva and Galina Barysheva, we can subdivide this term into two strands: one subjective and one objective. “This distinction makes it possible to differentiate between well-being as an inner condition of an individual and well-being according to a quality of life criterion as a result of and as a member of development in society.” (Alatartseva and Barysheva,2015) The authors go further and highlight all the factors that may be included in each one of these new terms. On the one hand, objective well-being is characterized by wage levels, residence conditions, educational opportunities, social quality, the environment, security and civil rights. On the other hand, subjective well-being is conceptualized only as an internal state of an individual. In addition, by consulting various articles published by researchers from different branches, it is possible to arrive at the definition of this concept more specifically, that is, by categorizing it into different classes: •Community/Societal well-being: The ability to participate in a community, having engagement and involvement in a area where you live (Rath and Harter,2010). •Economic/Financial well-being: There are some studies that defend that have a good financial life can reduce stress and increase security. In fact, a study published on 5 2.1. Well-being and Comfort 6 “Happiness and Economics” (Frey,2002) defend that there is a link between well-being and economics. •Psychological well-being: When well-being is related to mental aspects is commonly be referred as psychological well-being. Some evidences suggest that psychological well-being is associated with diseases and mortality risk (Trudel-Fitzgerald et al.,2019). •Physical well-being: This type of well-being emerges associated to physical health, improve, for example, with exercise habits (Rath and Harter,2010). •Social well-being: Some authors, see the relationships with others as a essential type of well-being (Davis,2019). This is because, maintaining a support network can help to overcome loneliness (Rath and Harter,2010). In this case, some studies tries to establish a relationship between the Big Five domains (that is, the five factors that model our personality: openness to experience, conscientiousness, extraversion, neuroticism and agreeableness) and social well-being (Joshanloo et al.,2012). •Work well-being: It is related with the ability to interests pursue, doing what is liked. Some studies, focus in investigate the relationship between job satisfaction and work engagement as a dimension of work-related well-being (Rothmann,2008). To achieve well-being, we need to make sure that all of these types are being satisfied. Although there are several ways to categorize well-being, in general, they all end up touching the same points. While several studies address the difficulties that the definition of well-being is (Dodge et al.,2012), others seek to define this concept more practically. In search of a good definition, without ambiguity, some studies by some authors were presented. However, it is admitted that there are other studies with different views from those presented here. Alongside these definitions are several works that aim to measure the well-being level of a population. In the case of well-being, habits are seen as the key. For better or for worse, habits influences health, well-being, and quality of life (Stoewen,2017). Take physical well-being as an example. Physical exercise habits can help improve this type of well-being. So, if a person change their habits for the better, they can change their life for better. It is also important to emphasize that the places we visit are part of these habits. Several studies denote their importance and how effectively they can influence us. A 2017 study (Pearce and Curtis,2017) showed that much that needs to be done to improve well-being goes also beyond our control. The places where we live and where we spent our time can influence our health. Being mental well-being one of the main concerns of this study is refereed that places can be damaging to our mental health if, for example, they are characterised by high levels of crime, pollution, poor physical conditions and a lack of secure and rewarding employment opportunities. 2.1. Well-being and Comfort 7 On a global way, well-being is really used and differ in their level in each country. In fact, societies with higher well-being are the ones who are more economically developed and with low levels of corruption. Also, cultural factors can play a critical row in well-being. Because of the subjective nature of well-being, it is usually measured thought self-reports (CDC, 2018). In Portugal, INE(National Institute of Statistics) published an article in 2018 assessing the welfare index of the Portuguese population (INE,2017). In this study, well-being is explored as a whole and was created more than 79 indicators grouped by two perspectives: material living conditions and quality of life. In short, well-being is a complex concept but efforts were being made with the objective to understand what’s needed and how and where we can work to improve our lives in a complex world. 2.1.2Definition of Comfort Finding and maintaining comfort is common to all people. Many people quickly identify loss of comfort and work diligently to restore it. In our days, the term comfort is often seen related to the marketing of products like chairs, cars, clothing, hand tools, and a lot of others (Vink and Hallbeck,2011). Evidence from the literature suggests that comfort, as a concept, has historical and more recent relevance for nursing. There are several authors, only in this context, which has its own definition. A few examples of that are Orlando (1961), where comfort is identified only as a pivotal to nurse’s role, Roper et al. (1980), and Paterson & Zderad (1988) where comfort is defined as three states (ease, relief, and transcendence) (Tutton and Seers,2003). It is, therefore, a concept that needs further exploration to increase knowledge in this area because it is difficult to reach a consensus on its definition. In order to establish the definition of comfort, this dissertation will use the meaning present in the Oxford dictionary. According to this, comfort is a broader concept that can be defined from a physical and a psychological perspective. In the first case, it is seen as a “state of physical ease and freedom from pain or constraint”. In the second it is defined as: “The easing or alleviation of a person’s feelings of grief or distress”. Despite all these definitions, they all note the existence of factors that influence comfort. Some papers show that different activities during measurements can influence comfort, concluding that characteristics of the environment and the context, can change how people feel (Vink and Hallbeck,2011). For example, let consider that we have two chairs exactly equal to each other and we have two people on each chair do different work: computer work and telephoning work. Despite all the conditions be the same, the chair may be more comfortable for computer work, so will have positive effects on the first person and negative effects on the second one. This allows us to realize that comfort is a complex problem that varies from person to person. In fact, little aspects such as the mood (temporal state of 2.1. Well-being and Comfort 8 the human mind) of a person can have a positive or negative impact on comfort (Silva and Analide,2018). Alongside these other examples can be made. Temperature is always used as a crucial factor in various papers. In fact, the temperature can have a big influence on how we feel in a short time. In addition, other authors consider features such as air quality and humidity as factors that play a critical role (Zhang et al.,2011). These can and will be explored later (Chapter 5). 2.1.3Distinction between Well-Being and Comfort Although comfort is often associated with a synonym for well-being, a clear difference can be demonstrated between both concepts. By the previous definitions, it is noticeable that comfort is most used to classify the atmosphere that surrounds the human being. This implies that comfort is associated with momentary aspects. However, well-being arises characterized by an exhaustive variety of groups, which makes it associated with a long-term context. By way of example, a person may find himself comfortable but unhappy (and vice versa). In this sense, well-being is referred to in many studies as being progressively improved, while comfort is something that can be improved on time. As we can see, the mental health organization in the UK said that ”it is important to realize that well-being is a much broader concept than moment-to-moment happiness” (Foundation,2015). As we saw in the previous definitions, well-being is seen as the satisfaction of a set of terms. So, if we focus, for example, on mental well-being, reference can be made to the Warwick-Edinburgh scale. As we can see from the Fig. 2, we realize that the questions are based on events that occurred over two weeks. 2.1. Well-being and Comfort 9 Figure 2: Warwick Edinburgh Mental Well-Being Scale (School,2019) Although comfort and well-being are distinct terms, this does not imply that they exist separately. Indeed, both terms arise intrinsically linked. Comfort at a certain level contributes to well-being. We can take the example of thermal comfort. A long term bad thermal comfort can ”have a large effect on the mental and physical health of the occupants of any building” (Maclean,2017). This is because the occupants will become distracted by the adverse temperature and their morale, health (physical well-being, for example) and productivity will be affected. However, it is important to note that well-being is only influenced if these conditions stay for too long. 2.2. Ambient Intelligence 10 2.2 ambient intelligence Interaction with computers (not necessarily personal computers and laptops) these days is increasing and increasingly difficult to avoid. With the advent of microprocessors and smartphones, it is normal for the user to have no way to escape contact with such systems. This widespread availability of resources sparked the realization of Ambient Intelligence (Cook et al.,2009). In a more theoretical way, Ambient Intelligence (AmI), formerly known as ubiquitous computing, consists of a ”discipline that brings intelligence to our everyday environments and makes those environments sensitive to us.” (Cook et al.,2009) This is a term that arises associated with the conditions of well-being and comfort, since the main objective of this concept is to build environments that allow improving the efficiency of systems, thereby increasing people’s quality of life. User experiences with computers over recent decades have created an interesting context where expectations of these systems are growing and people’s fear of using them has decreased (Park et al.,2012). This context allows us to create usage profiles by having the system identify and act according to the needs of each one. However, for this to be possible, systems that provide environmental intelligence have to go through three phases (Fig. 3): sensing, reasoning, and acting (Aztiria et al.,2010). Figure 3: Phases in environmental intelligent system (Aztiria et al.,2010) 2.2.1Sensing Environment Intelligence relies on information gathering. In this sense, the use of sensors is a crucial aspect for the sensing process: “Ambient intelligence research builds upon advances in sensors and sensor networks, pervasive computing, and artificial intelligence” (Heger, 2014). Moreover, being one of the focus of this dissertation the sensing, it is important to know this concept better. There are two types of sensors: Physical Sensors and Virtual 2.2. Ambient Intelligence 11 sensors. Physical sensors are the traditional sensors that we use to observe a physical phenomenon. On the other side, a virtual sensor is something used as an API. The monitoring process can be divided into two main areas: monitoring of users and their activities and monitoring of the environment. Both aspects are extremely important. While the first allows a better understand of the habits of users, the second allows knowing the environmental phenomena that surround them (temperature, humidity, light level, etc.), providing another context to data that is collected. Of course, once the information has been obtained, the system architecture may follow a centralized model in which the sensors send the data to a central server for processing or a distributed model where each sensor has the processing power. The process of filtering, disambiguation, and interpreting data before it is used is called middleware. Thus, data collected from different sources can be combined, through a sensor fusion process, and integrated to produce more refined and complete information (Heger,2014). 2.2.2Reasoning Once the data has been collected and properly processed, some kind of “intelligence” needs to be applied. To make algorithms responsive, adaptive, and beneficial to users, several types of reasoning must take place. These include user modeling, activity prediction and recognition, decision making, and spatial-temporal reasoning (Cook et al.,2009). Modeling One of the main features of a responsive algorithm is the ability to model user behavior. User modeling approaches are based on the data that is used to build the model, the type of model that is built and the nature of the model-building algorithm. Activity prediction and recognition A reasoning algorithm is useful if “have the ability to predict and recognize activities that occur in AmI environments” (Cook et al.,2009). Depending on the type of sensors data that is captured, different approaches can be used. Predicting, for example, resident locations, and even resident actions, allows the AmI system to anticipate the resident’s needs and assist with performing the action. Decision Making Decision making is the process of making choices by identifying a decision, gathering information, and assessing alternative resolutions (Dartmouth,2018). Decision-making can be seen as a step-by-step process. This type of process can help to make more deliberate and 2.3. Smart Cities 12 thoughtful decisions. For this motive, this approach helps in identifying the most satisfying solution possible. For example, the AmI system may respond to a sensed health need by calling a medical specialist and sending health vitals using any available device (step 1). If there is no response from the specialist, the AmI system would phone the nearest hospital and request ambulance assistance (step 2). Spatial Temporal Reasoning ”For a system to make sensible decisions it has to be aware of where the users are and have been during some period of time” (Cook et al.,2009). This, together with other information, can be used for inferring the context where the user is inserted. After this, the system could perform the most adequate responses. For example: Whenever someone turns on the cooker and leaves it unattended for more than 10 units of time, then the system has to take action. If the user leaves the house it is important to turn off the cooker to prevent a possible fire. 2.2.3Acting The most natural way of acting is using actuators integrated into standard devices. Another mechanism is through robots. In order this to work, is necessary to define human-centric computer interfaces that are natural and provides context-awareness. With a natural interface is possible to use ambient intelligence closer to human communication (like talk, for example). Context awareness, on another side, is the key to build AmI because if the system can exploit the user’s activity then it can act according (Cook et al.,2009). 2.3 smart cities There are many definitions of smart cities. The term is often used along with alternative adjectives, that emerge by replacing “smart” with “intelligent” or “digital”. The label ”smart cities” is a fuzzy concept and is not always used properly. There is neither a single template of framing a smart city, nor a one-size-fits-all definition of it (Albino et al.,2015). However, in this context a Smart City can be viewed as an “urban innovation and transformation that aims to harness physical infrastructures, Information and Communication Technologies (ICT), knowledge resources, and social infrastructures for economic regeneration, social cohesion, better city administration, and infrastructure management”. (Edward Curry and Sheth,2016). In fact, the emerging ICT paradigms such as data-intensive computing, Internet of Things, Cloud Computers and others, are essential to the realization of the vision of Smart Cities. Actually, real-world Smart Cities are being enabled by a combination of these paradigms 2.4. Machine Learning 19 to which a sub-population belongs, it can learn the sub-populations automatically. This algorithm is used for the soft-clustering method. For example, let’s consider we have the height of men and women. However, we do not know which one is a man and which one is a woman. The only thing that we know is that the mean height of males in male distribution is 5’8” and for females, it is 5’4”. We can say that distributions follow the sum of two scaled and two shifted normal distributions. This assumption can be made with the help of the Gaussian Mixture Model (Team,2019). Generative Adversarial Networks With the increase of deepfakes problem, this type of algorithm can be quite current. In fact, Generative Adversarial Networks is used to generate new, synthetic instances of data that can pass for real data (Nicholson,2019). This algorithm has the term “adversaria” because of the fact this architecture comprises two sub-models (generator and discriminator), pitting against each other. This type of network can discover patterns in input data. For this motive, this algorithm is usually considered unsupervised. It is used principally in cybersecurity and health diagnosis (Simplilearn,2019). 2.4.5Machine Learning in practice The information above allows verifying that several types of algorithms can be applied to solve a problem that requires the application of concepts such as Machine Learning. To apply these concepts there are some useful tools. One example of a popular tool is the Waikato Environment for Knowledge Analysis (WEKA). WEKA is an open-source machine learning software. Is recognized as a landmark system in data mining and machine learning. WEKA provides an extensive collection of machine learning algorithms and furthermore it allows data pre-processing making it possible for users to quickly try out and compare different machine learning methods on new data sets (Hall et al.,2009). Another example that can be made is Konstanz Information Miner(KNIME). KNIME is a modular environment, which enables simple integration of new algorithms and tools as well as data manipulation or visualization. In fact, KNIME enables easy visual assembly and interactive execution of a data pipeline (Berthold et al.,2009). Furthermore, there are specialized libraries and frameworks for the treatment of these problems. One of the most popular is TensorFlow. It was released in November 2015 by Google. This library makes it easy to build and train deep learning models (especially when combined with high-end APIs, like Keras) and allows the implementation of simple and flexibles architectures for neural networks. It can be used in Python and Javascript. Another 2.5. Composite monitoring indicators 20 example that can be maid is PyTorch.PyTorch was developed by Facebook for Python. It is easier to learn than TensorFlow, however, it has fewer resources. In addition, there are some libraries that are really useful as they have mechanisms for data analysis and mining, such as scikit-learn (Python library that focuses on the implementation of Machine Learning algorithms) or Deepnet (R library, focus on deep learning algorithms). 2.5 composite monitoring indicators For accurate and realistic measurement to occur, it is necessary to define some terms in order to know the dimensions that compose them. In this sense, there are two classes of indicators. Simple indicators, where data collection is done through a direct reading of values and composite indicators where data extraction is more complex and requires some types of assumptions. So, here are some types of these indicators and what are the precautions to be taken so that they can be correctly inferred. 2.5.1Thermal Comfort Generally, associated with the concept of environment arises the term thermal comfort. Thermal comfort is defined as a mental condition in which satisfaction with the surrounding thermal environment is expressed. It is quite common for the thermal comfort indicator to be the air temperature since most people can easily relate to it. However, air temperature alone is not a reliable metric and there are other factors that allow the concept of thermal comfort to be improved. These factors are six and are mainly divided into two groups: environmental and personal. Environmental factors include air temperature, radiant temperature, air velocity, and humidity. Already with regard to personal factors, there is heatstroke caused by clothing and metabolic heat (Health and Executive,2019). For these reasons, thermal comfort is a sensation that depends on one’s personal opinion. A thermally comfortable environment for one person may be uncomfortable for another. A realistic goal in this type of study will be to create a thermal environment that provides comfort to the greatest number of people. PMV/PDD method The PMV model (Predicted Average Vote) and consequently the PPD model (Predicted Percentage of Dissatisfied) was developed in 1970 by Fanger with the aim of defining thermal comfort. PMV is an index ”that aims to predict the mean value of votes of a group of occupants on a seven-point thermal sensation scale”. This scale is symmetrical relative to 0and has values of 1to 3which can be positive, corresponding to sensations of heat or negative, meant for cold sensations (Appendix B). The calculation of an individual’s PMV 2.5. Composite monitoring indicators 21 is made according to the combination of the six parameters defined before (1) . PMV has recommended limits between -0,5and +0,5(ANSI/ASHRAE Standard). PMV =0.303 e−0.036M+0.028 ×      (W−M)−3.05e−3[5733 −6.99(M−W)−pa] −0.42[(M−W)−58.15]−1.7e−5M(5867 −pa)−1.4e−4M(34 −ta) −3.96e−8. fcl[(tcl +273)4−(tr+273)] −fcl.hc(tcl −ta)      (1) With: •W- Mechanical power, in Watt per square meter (W/m2); •M- Metabolic rate in watts per square meter (W/m2); •pa- Partial pressure of water vapor in Pascal (Pa); •ta- Air temperature in Celsius degrees (oC); •fcl - Surface area of clothing; •tcl - Surface temperature of clothing in degrees Celsius (oC). •tr- Average radiant temperature in degrees Celsius (oC); •hc - Convective heat transfer coefficient, in watts per square metre kelvin (W/(m2∗K)) The PDD emerges because is also necessary to get a more holistic idea of the level of satisfaction of the occupants in space and how thermal comfort consequently can be achieved. Because of that, Fanger developed another equation, which is related to PMV, to predict the percentage of dissatisfied. The PPD can range from 5% to 100%, depending on the calculated PMV. However, the recommending factor vary depending on where the occupant is located in the building (Guenther,2019). 2.5.2Light Another factor to consider when talking about comfort is light. The fact that the human being is in an environment with low light conditions can harm him and have some consequences for his health, especially visual health. In this sense, there are some tabulated values that allow having a reference to what is considered normal. These values are tabulated as lux (Appendix A) and represent the lighting unit. Corresponds to the incidence of 1lumen on a surface of 1square meter. (ToolBox,2004) 2.5. Composite monitoring indicators 22 2.5.3Noise Sound is measured in decibels (dB). On one side, noises over 70 dB for a long period of time can cause hearing loss. On another side, noise above 120 dB may cause immediate loss of this capability. The more exposed to loud sounds the greater the risk of hearing loss. However, the louder something appears to a person, it is not the same as telling the true intensity of that sound. Sound intensity is the amount of sound energy in a given space. It is a logarithmic scale so the noise is not directly proportional to its intensity. This means that a 20 dB sound is ten times louder than a 10 dB sound. Also, two sounds of the same intensity may not mean that they are at the same height. The pitch of the sound has to do with perception and varies from place to place (for example, in a quiet place we can hear a sound that is not perceived when we are on the street). The risk of hearing problems increases with sound intensity rather than sound high. However, it should be noted that the effect of listening to a low-intensity sound for long periods is the same as the effect of a high-intensity sound for short periods of time. (Chuck Kardous and Lotz,2016) 2.5.4Air Quality Air quality is important because it influences our health. In this sense, one of the major ways to measure air quality is to measure how polluted the air is. The air generally is essentially compound by two gases: nitrogen and oxygen. Nonetheless, there are several other gases and particles: ground-level ozone, carbon monoxide, sulfur dioxide, nitrogen dioxide, and airborne particles, or aerosols. To measure this there is an index called Air Quality Index or AQI. This works as a “thermometer that runs from 0to 500 degrees. However, instead of showing changes in the temperature, the AQI is a way of showing changes in the amount of pollution in the air” (SciJinks,2019). There are some tabulated values for AQI levels (Fig. 6). An AQI under 50 means that the air quality is good. At a very high level can mean significant risks for human health. However, in spite of air pollution play a critical role in air quality, other factors can affect this indicator, principally when talking about indoor environments (AFSCME,2019). Some examples of these factors are: •Chemical exposures: Chemicals in the air, that result from some materials or activities, can affect the air quality; •Infectious agents: Sometimes, health can have critical importance in air quality. In hospitals, for example, biological agents, spread by ill people, can affect the air; 2.5. Composite monitoring indicators 23 •Physical agents: The right amount of heat, humidity and air movement are important for comfort and can have an impact on the air quality. In short, the term air quality itself, is not only about pollution but about a combination of factors that influence the air. Figure 6: AQI values (AirNow,2019) 2.5.5Ultraviolet Index According to the World Health Organization, the UVI is a measure of the level of Ultraviolet radiation. The higher the UVI, the greater the damage provoked to skin and eyes (Fig. 7), and, consequently, less time is necessary for harm to occur. This value can vary throughout the day and depend on the geographical location and weather daylight it can have different implications. Figure 7: UVI values (WHO,2020) 2.6. Challenges 24 2.6 challenges Some of the challenges present in this project are: •Privacy: Since the main purpose is to collect as much information as possible about a given user, there may be some concerns about the privacy of that information. •Battery: Making a data collection app means have to do background activities so that captured information be more as possible. This can lead to a high battery drain, something, not all users are willing to. •Time: Gathering information takes time to do and large numbers of users. Actually, being a dissertation inserted in an academic context makes difficult to reach a large number of users for the expected development time. •Device Variability: When collecting data, it is always necessary to assess their reliability. In this case, the large variability of devices is a disadvantage as it may mean that not all have the same sensors. This may result in a lack of data making it inconsistent. •Services: During the set time some of the services may stop working, making the data that will be used infeasible. Furthermore, the use of some of the services through some APIs is not free so the large-scale use implies high costs. However, when developing the application, these challenges will always be taken into account in order to minimize the problems. For example, concerning privacy, some steps can be taken to ensure anonymity. The main measure will be not to save any data that identifies the user. In the case of battery drain, every way to optimize the use of the battery will be taken into account while developing an application. An example of how this can be achieved is by reducing the number of accesses to the system. Furthermore, services with the least possible limitations will be chosen and, in a way, an attempt will be made to optimize the number of access to them. In short, during the development of an application, possible solutions and optimizations will always be considered to minimize the consequences of these challenges to the maximum. 3 RELATED WORK Generally speaking, there are several solutions we use every day that are related to the concept of data collection and intelligent suggestions. Take for example the case of virtual assistants such as Siri, Cortana, and others. This type of system collects as much information as possible about the user and the environment around them, and from there suggests and performs actions that simplify people’s lives. In this sense, the following are some projects that aim to improve people’s lives and that in one way or another meet what is proposed in this dissertation. 3.1 bewell It is an application designed to make people care about certain concepts of their well-being, concepts that are often overlooked. This is the case, for example, lack of sleep, hygiene or high social isolation. The authors believe that this situation is caused by an absence of adequate tools for effective self-management of overall well-being and health. The main idea of this application is be capable of monitoring multiple dimensions of human behavior, encompassing physical, mental and social dimensions of well-being. In terms of architecture (Fig. 8) the developers write in the article that: “BeWell application and system support consists of a software suite running on Android smartphones and cloud infrastructure. The software components installed on the phones include: i) Sensing Daemon, which is responsible for sensing, classification, data processing (e.g., privacy preserving audio processing) and uploading of sensor data; ii) Mobile BeWell Portal, which displays the user’s behavioral patterns and the well-being score associated with these behaviors; and iii) Mobile Ambient Well-being Display, which provides an always-on visualization of the user’s well-being scores” (Lane et al.,2011) . 25 3.2. ThermOOstat 26 Figure 8: BeWell Architecture (Lane et al.,2011) 3.2 thermoostat ”Heating, Ventilation, and Air Conditioning (HVAC) typically account for more than 40% of energy use in institutional buildings (DOE 2010)” (Sanguinetti et al.,2016). In spite of this, thermal comfort conditions in campus buildings are frequently poor. The main purpose of the ThermOOstat project was to build a participatory thermal sensing app to capture the feedback of the University of California occupants. In fact, the general strategy is to solicit thermal comfort “votes” (e.g., hot, cold) from building occupants via a web or mobile app. With the results obtained, the application was still able to collect if people were willing to sacrifice some degrees of temperature for the environment. In short, participation in TherMOOstat promotes higher satisfaction with indoor temperatures on a specific campus contributing also to energy saving (Sanguinetti et al.,2016). 3.3 tracking the transit rider experience The objective of this work is by a smartphone application to understand what are the triggers that are causing negative perceptions of personal comfort and well-being on a trip. The study involves 60 students who travel on a different public transit bus with the smartphone survey app installed. The app uses GPS tracking along with voice and text capture to enabled a contextual understanding. The aim is to improve ”the transit service amenities to provide a more comfortable experience, build rider loyalty, and make transit a more desirable mode choice” (Rid,2015). 3.4. Prosit 27 3.4 prosit Researchers of Dalhousie University have developed a mobile application with the aim of detecting some mental conditions, such as anxiety and depression. This is possible through an initial data collection using the user’s smartphone and the capacity of those devices, for example, using their sensors. This data includes information related to the practice of physical exercise, history of messages and calls, musical tastes, among others. Users are also asked to record a 90-second audio clip describing the most exciting part of their week and to self-report their feelings on a five-point scale. This app is currently being tested and has about 300 participants who have been testing the features (Smith,2020). 3.5 opendata applications OpenData emerges to designate the idea that data is freely available to anyone who wants to use it. This concept and the works related to it are in one way or another linked to the main objective of this dissertation. In fact, one of the objectives is to create a kind of geographic map to consult the comfort and well-being indicators. In this sense, first, there is a collection of data, individually, which is done through smartphones and then there may be the availability of this data for consultation by the community. In this way, it is possible to gather the information collected from a high set of sensors and later provide a system where the conditions of comfort and well-being can be easily accessed and updated in real time. It is on this premise that several projects arise. One of them, which can be given as an example, is the work “Mobile Data Collection With Wired and Wireless Sensors” (Chaudhri et al.,2012). Its main objective is “to provide a high level framework that allows for customization and flexibility of applications that interface with external sensors, and thus support a variety of information services that rely on sensor data”. Subsequently, the article introduces four types of applications in which, through the framework presented, data can be accessed, also in a simple way and in some cases in real time. These applications include sensors as important as medical sensors. It is in this context and thanks to data interoperability, that more and more concepts are being applied in this area. 3.6 comparation with the proposal In the case of the BeWell application it only makes use of some device sensors whereby only a few pre-established well-being metrics are evaluated. If we look at the ThermOOstact application we realize that it only cares about the comfort of the university campus. The fourth example is the most similar to the dissertation’s purpose. In fact, the application 3.6. Comparation with the proposal 28 Prosit can be seen as an inspiration for what is proposed. However, as we can see these applications are really specific as they only act in a specific problem. The purpose of this dissertation is more comprehensive because a lot of different data will be collected and according to that data will be possible to explore a wide range of concepts. This brings a great advantage because it allows the creation of a broader application. On the one hand, at a personal level, it is possible to create an application that fits the context in which a person is inserted thus providing intelligent notifications regarding that context. The purpose application is about learning how the data captured by smart devices can affect people. The theme of this dissertation focuses on sensor data and discovering, by inference, how that can affect people, positively or negatively. Furthermore, a lot of studies, like the ThermOOstact, focus on closed spaces since is more difficult to study open spaces because of heterogeneity. The proposed dissertation intends to study any type of space regardless of the geographical barriers that may exist. On the other hand, it is also possible to exploit an enterprise level as each employer can use the application to understand what the ideal characteristics of a particular location are and use it to their advantage. 4.2. Data Collector Strand 35 •Low: As the name indicates, low means that the user will receive notifications with less frequency. In this specific case, the notifications will only appear every hour and a half, if the user doesn’t change his location or each half-hour otherwise; •Medium: If the medium option is selected, every one hour, the user will receive a notification. The location inspection will be reduced to fifteen minutes. •High: This means that they will receive a new notification every thirty minutes, and in case they are in constant location change, the notification will happen every seven minutes. If the users don’t mind about the intrusion they can always choose high notifications frequency. In the case of the well-being question, this will appear only less frequently. This is due to what was defined in the previous section. Indeed, it is assumed that well-being throughout the day will not have as many variations as comfort. However, every time the user stops the data capture, after 5minutes a well-being notification shows up. In cases that the user doesn’t stop the data collection, the notification shows up every two hours. One another hand, the user is also allowed to answer a question about comfort or wellbeing voluntarily without waiting for a notification. To make both process faster and more intuitive was used as a response scheme smiley faces. This idea came about through an adaptation of the Likert scale, widely used in opinion polls. As Fig. 12 demonstrate, the questionnaire for well-being is more complex to be possible to associate the different type of data collected to different types of well-beings (defined in state of art). Figure 12: Questions about comfort and well-being However, the fact that no question is asked does not mean that data are not being collected anyway. Between each question are performed background operations that continue to store 4.3. Smart Application Strand 36 information regarding the context in which the user is inserted. This case only has the particularity that the comfort or well-being questions has the value ”-1” which means no question has been asked. This could be useful because we can interpret this ”-1” value as a non-alteration on comfort or well-being. The background activity turn’s on and off automatically. As can be seen in Fig. 11 is asked to the user the time that they usually wake up and go to sleep. When a user does not answer a question after the defined sleep time, is assumed that he is sleeping and for that motive, the background sensing is turned off. When is already wake-up time, the background sensing turned on automatically and the questions start again to show up. Throughout the development of the entire application, the challenges presented were always taken into account. In that sense, some measures were taken to combat these eventual problems. One of them was to, at no time, use any type of information that identifies the user. Thus, any contact he has with the application becomes anonymous. In fact, no email is requested, or any form of user identification. Regarding battery issues, an attempt was made to optimize the battery, avoiding access to some sensors when it was not necessary. 4.3 smart application strand With the building of machine learning models will be possible to make the application more “intelligent” and, furthermore, will be viable the creation of some smart solutions. On one hand, this prediction of comfort and well-being will result in less interaction of the user, so, it will be possible to get a major number of contributions with less effort. This is crucial since with more data the creation of a map where conditions of comfort and well-being could be seen by region or place is achievable. On the other hand, with those models it will be possible to react to user behavior and thus give some smart advices. With this new strand, the application begins to work based on two modes: Capture Mode and Prediction Mode. The main difference between these is that Capture Mode as the name implies is used only to capture data. In this mode, the user only will receive notifications with the question enunciated before. In its turn, the Prediction Mode, if enabled, will give the application the capacity to predict comfort and well-being. However, the background activity is similar to what happens in captured mode. The major difference is that the application does prediction about user comfort and well-being reducing in that way the number of presented questions. Furthermore, it is in this mode that smart advice will be provided. It is important to note that not all types of well-being are being predicted. In fact, some types of well-being have been selected which, according to the data used, would be possible to obtain better results. However, through a more extensive collection, the other dimensions can be explored. 4.3. Smart Application Strand 37 When changing the selected mode, the application will adapt (Fig. 13). The home page gives priority to what users want to see in the first place. Depending on what mode is on, this page shows a summary of the numbers related to some of the user’s interaction. In the case of well-being, since there are many types, the home screen will privilege the type chosen under the settings page. In the next subsections will be described in detail some of the extra functionalities added to the initial application, where the capture of data was the only objective. The settings page (which is responsible for mode change) could be consulted in the Appendix C. Figure 13: Capture Mode vs Prediction Mode 4.3.1Wellness Place Map One of the objectives of this dissertation was to create a map capable of showing both well-being and comfort. In this sense, some changes were made to the initial data collection application. Thus, each time the user answers a question, the data is now also saved as an entry on the map. In addition to the latitude, longitude, country, postal code and administration area, a set of values are also saved that allow a characterization of the place. To this set of values belongs the ambient temperature, AQI, a general and specific category of the place, humidity, light level, magnetic field value, atmospheric pressure, the intensity of ultraviolet rays, temperature, and wind speed. These values are being updated not only through the response to the notifications provided, but also through the predictions that are being made in the background. In practice, what happens is that the developed algorithm retrieves from the database all existing records for the region in which a user is 4.3. Smart Application Strand 38 located, through a filter by postal code. Then it goes through all these records and those that are less than a certain distance from the place where this user is, are updated with the captured values, otherwise, a new entry is created in the database (Algorithm 1). In this way, whenever users who are in the same place answer a question (or a prediction is made) an average of the conditions and questions answered by the two or more users is kept. In these cases, it can always happen that several users simultaneously access the same fields in the database. To avoid inconsistencies, transactions are used, this allows users to always have an updated version of the data. Algorithm 1Update map entries X←f alse if data exists on database then for Location L in data do Distance ←L.distanceTo(MyLocation) if Distance <100 then Calculate mean Update data on database X←true end if end for end if if X== f alse then Create new entry on database, with the new conditions end if Since the efficiency of the application is one of the concerns, the use of a recursively calculated average was considered so that it could be stored in the database. So whenever there was a new contribution, the average would simply be updated. For this reason, when it was necessary to make a display of the results, no extra calculation was necessary since everything that is eventually needed would be stored. Two different types of average were considered. A flat average and an weight moving average. The flat average is the commonly used. For greater precision, this average implies keeping the sum of the values until the moment and the total number of contributions. The other strategy considered was the use of a weight average (Eq. (2)) in which the new values had a greater contribution to the calculation of the average (Moreno,2020). This was therefore the strategy used since it makes sense that the most recent values were more important. St=   X1,t=1 α∗Xt+ (1−α)∗St−1,t>1 (2) Where: α: Constant smoothing factor between 0and 1; 4.3. Smart Application Strand 39 Xt: Is the value at a time period t; St: Is the value of the moving average at any time period t. For the visualization of these data, two maps were built, one in the android application using the apk of google (Fig. 14), and another web-based, using JavaScript and the leaflet library (Fig. 15). However, both maps have their similarities. In both cases, the records found in the database are drawn with the help of markers. Markers are icons that allow indicating specific places on a map. Thus, each marker has a color and an icon that varies according to the specific average value of a given area and the type of factor that is being demonstrated. It was also added circles to the thee markers that allow representing the wide area. In addition, these markers are grouped into different clusters. This choice was made because a high number of markers is expected, so the clusters allow an efficient control of these. In addition, depending on the chosen zoom level, the clusters are grouped and allow an overview of comfort and well-being, either by area or country. In fact, invisible borders have also been created that allow the values of one country not to mix with another. Some extra features have also been added to the map, such as the possibility of applying filters. These include the possibility for users to see only the data added for a particular day (a day ago or the day itself) and not an aggregate total of several days. For greater consistency, and for greater coherence, users can choose to consult a joint average, obtained by answering questions and predictions, or, they can choose to consult an individual average (only from answers to questions, or obtained only from predictions). Figure 14: Android Map Example 4.3. Smart Application Strand 40 Figure 15: Javascript Map Example 4.3.2Smart Advice With the development of machine learning models, it was possible to create an application capable of predicting comfort and well-being. Thus, with the help of these models, it was possible to create ways of providing intelligent advice. Whenever the user is found to have a poor well-being or comfort value, an advice is generated and consequently an notification shows up. It was defined that the advice of the same type can not occur less than two hours of difference so that users have time to act. In the case of well-being, since there are many types the user can choose in what of these types wants to be advised. This helps to simplify user’s interaction with the application. Two types of models were developed, one in which the algorithm used was a traditional machine learning algorithm and another in which the algorithm used was deep learning, more specifically the LSTM. According to the model developed for a certain type of wellbeing, the application will follow different behaviors. In case of the models that use LSTM what will happen is that the user, even in the prediction mode, will have an early stage of receiving notifications with questions related to their well-being, with more frequency. This is because these types of models presuppose the existence of a history of records in order to be able to make a prediction. Even after having collected the necessary number of records, users, over time, continued to receive questions, although less frequently, to update some aspects that cannot be collected automatically. When all the necessary premises for the given of advice are verified, the strategies applied follow the presuppositions presented in Fig. 16. There are two different ways to provide advice. One is due to a change of location 4.3. Smart Application Strand 41 and the other is due to the suggestion of changing some conditions, be they environmental or personal. The advice provided is chosen randomly. In the next subsections, different forms of counseling will be discussed in more detail. Figure 16: Example Advice Process Advice by Local Change One of the strategies is to suggest a place close to the one where the user is, that makes him feel comfortable or well, depending on what is being evaluated at the moment. Using the attribute of the postal code it is possible to quickly search for the nearest place with a high degree of comfort or well-being. To avoid suggest a residential area, a filter is also applied to the location category. After choosing the location, the user receives a notification that informs him that an advice has been generated regarding his comfort or(and) well-being (if the estimated values are low). When clicking on that notification the user is redirected to a page where the last generated advice is found. If this advice is actually for exchange of places, a link will be presented which, when clicked, will direct the user to google maps, where he will be able to consult the suggested zone and the routes to get there (Fig. 17). However, since the user may not have google maps, they can still consult this location on the map described above. When a location advice is impossible, because of the nonexistence of records, the system gives an advice by condition change. 4.3. Smart Application Strand 42 Figure 17: Advice by local change Advice by Conditions Change Another strategy is to provide advice according to conditions similar to the user who needs to be advised (Fig. 18). In this sense, this involves searching the database for the record with the conditions most similar to those users, but which has a good classification of the indicator that he wants to be advised. By comparison, we can understand what is causing bad comfort or well-being. This comparison is made using the equation present on Eq. (3). The objective is to subtract condition (personal or environmental) and registration information between two users. The record whose subtraction value is lower is the most similar. Some aspects could be adapted. By giving more weights to parcels, is possible to make a parcel more, or less important. Thus, it is possible to suggest aspects that the user can possibly improve. Although this technique can be applied to both types of models, traditional machine learning models, and deep learning models, there is a small difference the last one. In this case, whenever a user of the application has a good prediction, an average of the records used in that prediction is stored in the database, since the deep learning models use a set of records for the classification. Thus, whenever another user (or himself) gets a bad rating, the database is searched for records whose conditions are similar to those that were captured but with a good rating. Then, the advice occurs in a similar way to what happened previously and 4.3. Smart Application Strand 43 the user is informed of changes that he can make in his routine to improve the degree of comfort or well-being. Similarval =X×Conditions(1,2)+Y×RegisterIn f o(1,2)(3) Conditions(1,2)=lightLevel1−lightLevel2+pressureLevel1−pressureLevel2+ humidity1−humidity2+... RegisterIn f o(1,2)=Age1−Age2+Nationality1−Nationality2+Job1−Job2+... Where X and Y are real numbers. These values are the weights given to each of the parcels. Figure 18: Advice by conditions change Dashboards So that users can follow the evolution of their comfort and well-being over time, some charts have been created that allow them to visually demonstrate what is happening (Fig. 19). In these graphs, users can see what the last ten values of comfort or well-being were, or they can also access the most frequent types of classes. The data represented in the dashboards 4.3. Smart Application Strand 44 could be of three different types: mixed data, only data that come of the answer to questions, and only data that come of a prediction. The user can always change the type that wants to display. Figure 19: Example of Well-being Dashboard 5.1. First Case 51 Figure 22: Model Check In this sense, according to the results presented above, the model that seemed to be the most suitable was then the RandomForestClassifier. Although the results are already favorable, the next steps were to try to improve them. For the model tuning was used a gridsearch technique. This technique is known for a process of performing hyper parameter tuning to determine the optimal values for a given model. It is a expensive process, since this method will generate all the combinations possible for a given set of values (Lutins,2017). In this case, this technique was used on the model selected before, RandomForestClassifier, in order to find the best parameters. The learning curve for the final model could be consulted on Fig. 23 Figure 23: Gridsearch Results 5.1. First Case 52 Accuracy has decreased compared to the previous step. However, this technique allows us to find the best hyper-parameters. The fact the default parameters of RandomForestClassifier were being used could lead to problems such as underfitting and overfitting. In this case, despite the accuracy that has decreased, is important to note that these problems are also being avoided. As can be seen, there was an approximation between training and test accuracy. Figure 24: Model Validation From the report (Fig. 24), it is possible to see that the model generally performs well for all the classes that he was trained for. The major problem is that the model was not trained for class number one. This was because the users, don’t choose this class. The main problems with these approaches are that sometimes users tend to evict some extremes values. This can be explained simply by the fact that in the period when the data was collected, people were at home, due to mandatory confinement. In this sense, it is natural that the lower comfort values have not been so chosen since being at home users can more easily control the environment around them. Deep Learning Model for Physical Well-being In the case of well-being, the same premise could be applied. However, I want to study if the previous data are relevant to the prediction. For that case were used RNN, more in particular LSTM. As this is a neural network where the order of the data is quite relevant, no shuffle has been done. Although, other special precautions regarding the way the data had to be processed were taken. In addition to pre-processing, the data were transformed according to a sliding window principle. Thus, the previous data are organized so that they serve as input to predict the target of the next line. A pratical example, with a dataset size of 10 and a window size of 2could be seen in Fig. 25. Since the goal is to classify the well-being some precautions have to be taken. As this is a multiclass classification problem (although it can be seen as an ordinal classification problem, this is one of the ways that this type of problem is usually treated), the loss function used was therefore categorical crossentropy. Furthermore, in the final layer, a softmax activation 5.1. First Case 53 Figure 25: Sliding Window function was used. Here it is very important to take into account the type of this activation function and the loss function, as incorrect use of these can lead to false results. Some studies were carried out in order to understand what is the method that could give best results. Essentially two approaches were built. The first one defends that since each user is different and the data they have consequently corresponded to different periods, it was initially hypothesized that it would be better to separate the users. Thus, the goal was to train a neural network for a single user and then try to understand if it was possible to generalize the results. In the second one all the data were used together. Furthermore, this data was ordered by the user key, and for date-time. Next could be summarize this two approaches: 1.LSTM using data from a single user a) Only one user was used for training the rest were used for testing. 2.LSTM without separating by user a) There was no separation of each user (only some users are saved for the test); b) The transformation into a sliding window occurred in all data, so the data was sorted by user key and date-time in order to reduce inconsistencies. The following are some of the results obtained in each of the approaches. Similar to what was done in the case of the traditional machine learning models, here too I tried to follow an approach based on the attempt. It is although important to refer that the following experiments were made on physical well-being. However, the study could be extended to other well-being types. The same process was applied here and again, a study was done on what should be the best treatment for missing values (Table 5). 5.1. First Case 54 Table 5: Missing Values Treatment Missing Values Treatment Approach Type Train Accuracy (Loss) Test Accuracy (Loss) 1 78.96% (0.5802)64.42% (1.2970) Using only forward propagation 2 77.04% (0.7422)28.70% (1.8702) 1 78.96% (0.6429)64.42% (1.2372) Using mean values 2 41.99% (1.0705)30.26% (2.0822) 1 78.96% (0.5680)64.42% (1.3350) Using median values 2 41.56% (1.0673)30.26% (2.0683) Comparing the two approaches is possible to see that the first one, gives in a first instance better result than the second one. This could be for the fact that the first one, is simpler and the data is less. However, test accuracy does not have big changes in the two approaches. In these experiments seem like using the mean values to solve the missing values problem is the most appropriate in the first approach (less loss) and the median is better in the second approach. With the use of values normalization techniques, it was possible to obtain a big improvement in the accuracy of the second approach, as shown in Table 6. However, in the first one, no improvement has been achieved. Especially, in this case, StandardScaler technique seems to be causing an overfitting phenomenon, which is fought with MinMaxScaler. Despite all, generally, the MinMaxScaler technique was the best one, so this was the chosen one. Once again the improvements could be explain for the fact that the input variables have different units witch lead to a unscaled data. This can result in a unstable learning process, as explained before. Table 6: Value Normalization Value Normalization Approach Type Train Accuracy (Loss) Test Accuracy (Loss) 1 100% (9.6612e-04)23.93% (3.3128) Standardization (StandardScaler)2 99.57% (0.0147)65.91% (2.1979) 1 83.23% (0.4657)64.42% (1.2368) Normalization (MinMaxScaler)2 98.97% (0.0265)88.52% (0.6357) The next step was to test resampling mechanisms. In this case, resampling involves changing the frequency of the time series observation. This can help to latter define a concrete windows size. The method varies depending on the approach. In the first one, the data was resampling in an interval of 15 minutes because it was the minimum time that notification is thrown. In the case of the second approach, the resampling was done taking into account some considerations. First, the data were grouped by user, after that the resampling was applied for each user individually. This is, for every user was generated samples that correspond to the interval of 15 minutes. However, in this case, with the algorithm studied, this method seems to not contribute for a accuracy. This may happen 5.1. First Case 55 because the data generated introduces more variability making the process harder to learn. The results could be consulted in Table 7. Table 7: Resampling Resampling Approach Type Train Accuracy (Loss) Test Accuracy (Loss) 1 83.23% (0.4657)64.42% (1.2368) Without Resampling 2 98.97% (0.0265)88.52% (0.6357) 1 99.70% (0.0140)82.16% (0.9723) With Resampling 2 99.61% (0.0133)62.91% (0.8457) The final step was to validate and tuning the model. In these approaches the objective was to experiment some combinations in order to find a good fit. The number of layers, the number of neurons, the windows size, epochs, batch size, among others, were tested together. Some of the values were chosen based on some heuristics resulting from the application of neural networks in certain studies. In fact, according to Jeff Heaton on the book Introduction to Neural Networks for Java (Heaton,2008) the number of hidden neurons should be: •Between the size of the input layer and the size of the output layer; •2/3the size of the input layer, plus the size of the output layer; •Less than twice the size of the input layer. Furthermore, sometimes just one layer is enough for the majority of the problems. However, the best method could be achieve by trial and error since there is no exact formula to known was it the best for some type of problem. In this sense, I also tried to resort to the alteration of other hyper-parameters to combat this problem. The adjustments made were mainly about the size of the window, the batch size, and the number of epochs. Other numbers of features were also tested. These adjustments were not only applied to obtain better results but also to reduce the instability of the solution and, consequently, reduce any problems as is the case of overfitting that could be happening. In fact, LSTM is a neural network with a propensity for overfitting (Brownlee,2019), so a good fit is not that one that has high accuracy. Also to avoid this problem, some dropouts layers were been added. Beyond that, some regularizers were explored in order to improve the results. In fact, after the application of some of these techniques, it was possible to improve the results and consequently combat the previous problems. In the first approach, the model seems to converge after a few epochs. The learning curves of the best model could be seen in Fig. 26. The windows size used was 8and the batch size was 6. Despite these results, this approach has some problems. The main one is in choosing a user who is the most possible representative of the problem. For example, if user A is used for training and user B is used for testing the model will fail if the classes in B are not the 5.1. First Case 56 Figure 26: Approach 1: Learning Curves same as in A (user A has chosen 1and 2for physical well-being, and user B has chosen 2 and 3, as the model was not trained in class 3this could be a problem). Furthermore, each user individually has few rows of data. This makes the model be more fallible in a real scenario since it will depend on that one user used for the training. The next image (Fig. 27) represents two confusion matrices from two different users. The one on the right (Fig. 27 b)) has a higher accuracy than the one on the left (Fig. 27 a)). This could be explained for what was said before. Figure 27: Approach 1: Confusion matrixes The validation of the model and consequently the final accuracy was obtained by using all the remaining users from the dataset. The mean accuracy obtained was 84.22%. In a search for finding a good model the same steps following before were applied in the second approach. The final results could be seen on Fig. 28. 5.2. Second Case 57 Figure 28: Approach 2: Final Model The windows size used was 12. The best batch size found was 14. Although this approach would have the same problem as the first one, since the number of data is bigger the probability of that problem happen is lower. Despite all this, this approach has also some other problems. First, by joining the data of all users in the same file, I may be creating some inconsistencies mainly about the creation of sliding windows. Second, the classes are unbalanced, this combined with the impossibility to shuffle the dataset could lead to a leak of performance. However, the second approach seems to be one with better results. 5.2 second case Since the data collected initially focused mainly on a period of mandatory quarantine, a new data collection was carried out after this period. However, due to time and resources, the data collected remains scarce. In this case, the dataset has a total of 2459 lines, in a set of 43 features. In addition, with the experience obtained through the first capture, some improvements were made in the initial application that allows a more efficient data collection. With the experience gained in the first case, the same procedures were applied in this case. 5.2. Second Case 58 5.2.1Data Analysis Data analysis occurs in the same way as the first experiment. In that sense, the first step was then to see if there were missing data. A visual graph about the missing values in each feature could be seen in Fig. 29. Figure 29: Number of data captured in the different features In this case it is possible to verify that there are missing values mainly in the case of activity detection. This may have been due to the fact that people have more heterogeneous routines which led to some flaws in the detection of activity. Once again an heatmap with the relation of all features was drawn. The results could be consult in the appendix for the sake of simplification (Appendix D). Regarding the balancing of classes, the same happened in this new data collection (Fig. 30). In fact, whether in the classes that concern comfort or in the classes that concern well-being, users still do not use the lower class. Figure 30: Comfort Balance This data still has outliers, however, once again the chosen made was not to remove these outliers as this could cause relevant data to be deleted. 5.2. Second Case 59 5.2.2Model Building In this experiment, the same processes, used in the first one, were used. Thus, the following descriptions will be more succinct just stating the results achieved. Traditional Machine Learning Models Applying the same principle used previously, here again it is concluded that the algorithm that allows to obtain better results is the Random Forest. According to Fig. 31 it is possible to conclude that in this case, for comfort it is possible to obtain a final accuracy of 81 %. Figure 31: Model Validation Deep Learning Models With regard to deep learning models, the process was quite similar. In fact, also in this case were tested the two hypotheses initially proposed. In the first case, the results are not that good. In fact, if I took two different users as a test case, like in the first experiment is possible to see that the results really depend on the classes chosen by those users (Fig. 32). This could be for what is explained in the first case. The train set could not be sufficiently representative of the problem. Using all the test set the mean accuracy obtained is 42.65 % The second approach still seems to be the best one. In fact, the accuracy obtained by the first approach is not good. By changing several parameters it was possible to achieve some favorable results. Thus, the Fig. 33 concerns a window of 6and a batch size of 26. 5.2. Second Case 60 Figure 32: Approach 1: Confusion matrixes Figure 33: Approach 2: Final Model 6.3. Future Work 67 provided here is a study of open discovery in which it is intended to study what may or may not have implications for comfort and well-being. Effectively, comfort and well-being, as already mentioned, are quite complex terms and are influenced by quite different factors that in some parts are difficult to perceive using only with the use of intelligent devices. However, the present work provides a possible way of perceiving other factors that are sometimes not taken into account when changing comfort and well-being. It is these factors and the way they are captured that in future work can be improved. Still, regarding the advice, one possible idea is also to make filters to the map records to give advice more related to the context felt. For example, by filtering, the records by time and local category are possible in the lunch hour advice the user to the nearest, comfortable restaurant. However, this will only be feasible in the future with more users and consequently with more data. In fact, with a high number of filters, the results will be less and the probability to find a location with all the conditions is lower. In addition, over time, it will be possible to improve in the formula how the average is calculated and how the data is demonstrated so that this fact reflects better the real world. In short, despite everything, there are always changes that can be made in the future in order to improve the whole system. Also, the extension, for example, of the application to a more business domain may be something that arouses some interest, giving to the work a whole new scope. In this sense, ”the door is open” for improvements. BIBLIOGRAPHY Tracking the Transit Rider Experience: Using Smartphones to Measure Comfort and Well-Being Throughout the Trip, Washington, D.C., 01/2015 2015. Transportation Research Board. URL https://trid.trb.org/view.aspx?id=1339490. Indice de bem estar, 2017. URL https://www.ine.pt/xportal/xmain?xpid=INE&xpgid=ine destaques&DESTAQUESdest boui=315227706&DESTAQUESmodo=2 . Accessed: 2019- 10-10. AFSCME. Factors that affect air quality, 2019. URL https: //www.afscme.org/news/publications/workplace-health-and-safety/ safe-jobs-now-a-guide-to-health-and-safety-in-the-workplace/ chapter-9-indoor-air-quality/factors-that-affect-air-quality. Accessed: 2020-01-13. Pragya Agarwal. How does lighting affect mental health in the workplace, 12 2018. URL https://www.forbes.com/sites/pragyaagarwaleurope/2018/12/31/ how-does-lighting-affect-mental-health-in-the-workplace/. Accessed: 2020-02-22. AirNow. Air quality index (aqi) basics, 2019. URL https://airnow.gov/index.cfm?action= aqibasics.aqi. Accessed: 2019-11-28. Elena Alatartseva and Galina Barysheva. Well-being: Subjective and objective aspects. Procedia - Social and Behavioral Sciences,166:36 –42,2015. ISSN 1877-0428. doi: https://doi. org/10.1016/j.sbspro.2014.12.479. URL http://www.sciencedirect.com/science/article/pii/ S1877042814066178 . Proceedings of The International Conference on Research Paradigms Transformation in Social Sciences 2014 (RPTSS-2014). Vito Albino, Umberto Berardi, and Rosa Dangelico. Smart cities: Definitions, dimensions, performance, and initiatives. Journal of Urban Technology,22:2015,02 2015. doi: 10.1080/ 10630732.2014.942092. Asier Aztiria, Alberto Izaguirre, and Juan Augusto Wrede. Learning patterns in ambient intelligence environments: A survey. Artif. Intell. Rev.,34:35–51,06 2010. doi: 10.1007/ s10462-010-9160-3. Michael R. Berthold, Nicolas Cebron, Fabian Dill, Thomas R. Gabriel, Tobias K ¨ otter, Thorsten Meinl, Peter Ohl, Kilian Thiel, and Bernd Wiswedel. Knime - the konstanz information 68 bibliography 69 miner: Version 2.0and beyond. SIGKDD Explor. Newsl.,11(1):26–31, November 2009. ISSN 1931-0145. doi: 10.1145/1656274.1656280. URL https://doi.org/10.1145/1656274.1656280. Jason Brownlee. How to use weight regularization with lstm networks for time series forecasting, 2019. URL https://machinelearningmastery.com/ use-weight-regularization-lstm-networks-time-series-forecasting/ . Accessed: 2020-05- 15. CDC. Well-being concepts, 2018. URL https://www.cdc.gov/hrqol/wellbeing.htm . Accessed: 2019-10-15. Rohit Chaudhri, Waylon Brunette, Mayank Goel, Rita Sodt, Jaylen VanOrden, Michael Falcone, and Gaetano Borriello. Open data kit sensors: Mobile data collection with wired and wireless sensors. In Proceedings of the 2nd ACM Symposium on Computing for Development, ACM DEV ’12, New York, NY, USA, 2012. Association for Computing Machinery. ISBN 9781450312622. doi: 10.1145/2160601.2160614. URL https://doi.org/10. 1145/2160601.2160614. Thais C. Morata Chuck Kardous, Christa L. Themann and W. Gregory Lotz. Understanding noise exposure limits: Occupational vs. general environmental noise, 2016. URL https: //blogs.cdc.gov/niosh-science-blog/2016/02/08/noise/. Accessed: 2019-11-27. Diane Cook, Juan Augusto Wrede, and Vikramaditya Jakkula. Review: Ambient intelligence: Technologies, applications, and opportunities. Pervasive and Mobile Computing,5:277–298, 08 2009. doi: 10.1016/j.pmcj.2009.04.001. UMass Dartmouth. Decision-making process, 05 2018. URL https://www.umassd.edu/fycm/ decision-making/process/. Accessed: 2019-11-04. Tchiki Davis. What is well-being? definition, types, and well-being skills, 2019. URL https://www.psychologytoday.com/us/blog/click-here-happiness/201901/ what-is-well-being-definition-types-and-well-being-skills. Accessed: 2019-10-10. Rachel Dodge, Annette P. Daly, Jan Huyton, and Lalage D. Sanders. The challenge of defining wellbeing. International Journal of Wellbeing,2,2012. doi: 10.5502/ijw.v2i3.4. URL https://internationaljournalofwellbeing.org/ijow/index.php/ijow/article/view/89. Quan Z. Sheng Edward Curry, Schahram Dustdar and Amit Sheth. Smart cities – enabling services and applications. Journal of Internet Services and Applications,7,2016. doi: https: //doi.org/10.1186/s13174-016-0048-6. Emma Ellis. Diagnosing (and dealing with) your low-battery anxiety, 06 2019. URL https:// www.wired.com/story/diagnosing-and-dealing-with-your-low-battery-anxiety/ . Accessed: 2020-02-22. bibliography 70 Mental Health Foundation. What is wellbeing, how can we measure it and how can we support people to improve it?, 2015. URL https://www.mentalhealth.org.uk/blog/ what-wellbeing-how-can-we-measure-it-and-how-can-we-support-people-improve-it . Accessed: 2019-11-17. Jake Frankenfield. Artificial neural networks (ann) defined, 2018. URL https://www. investopedia.com/terms/a/artificial-neural-networks-ann.asp. Accessed: 2019-11-20. Bruno S Frey. Happiness and economics. Princeton University Press, 2002. ISBN 9780691069982. Michael Garbade. Clearing the confusion: Ai vs machine learning vs deep learning differences, 2018a. URL https://towardsdatascience.com/ clearing-the-confusion-ai-vs-machine-learning-vs-deep-learning-differences-fce69b21d5eb . Accessed: 2020-01-26. Michael Garbade. Understanding k-means clustering in machine learning, 2018b. URL https://towardsdatascience.com/ understanding-k-means-clustering-in-machine-learning-6a6e67336aa1 . Accessed: 2020-01- 26. Sebastian Guenther. What is pmv? what is ppd? the basics of thermal comfort, 2019. URL https://www.simscale.com/blog/2019/09/what-is-pmv-ppd/. Accessed: 2019-11-22. Mark Hall, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer, Peter Reutemann, and Ian H. Witten. The weka data mining software: An update. SIGKDD Explor. Newsl., 11(1):10–18, November 2009. ISSN 1931-0145. doi: 10.1145/1656274.1656278. URL https://doi.org/10.1145/1656274.1656278. Barry P. Haynes. The impact of office comfort on productivity. Emerald Publishing Limited, 02 2008. Health and Safety Executive. Thermal comfort: The six basic factors, 2019. URL https: //www.hse.gov.uk/temperature/thermal/factors.htm. Accessed: 2019-11-22. Jeff Heaton. Introduction to Neural Networks for Java, 2nd Edition. Heaton Research, Inc., 2nd edition, 2008. ISBN 1604390085. Dominique Heger. Big data analytics—where to go from here. International Journal of Knowledge, Innovation and Entrepreneurship,2:38–54,2014. URL http://ijkie.org/IJKIE December2014 DOM%20HEGER.pdf. Mark Hung. Leading the iot, 2017. URL https://www.gartner.com/imagesrv/books/iot/ iotEbook digital.pdf. Accessed: 2019-10-6. bibliography 71 Mohsen Joshanloo, Parviz Rastegar, and Ali Bakhshi. The big five personality domains as predictors of social wellbeing in iranian university students. Journal of Social and Personal Relationships,29(5):639–660,2012. doi: 10.1177/0265407512443432. URL https: //doi.org/10.1177/0265407512443432. Radovan Kuchta. Smart city concept, applications and services. Journal of Telecommunications System Management,03,01 2014. doi: 10.4172/2167-0919.1000117. Nicholas Lane, Mashfiqui Rabbi, Mu Lin, Xiaochao Yang, Hong lu, Shahid Ali, Afsaneh Doryab, Ethan Berke, Tanzeem Choudhury, and Andrew Campbell. Bewell: A smartphone application to monitor, model and promote wellbeing. Proceedings of the 5th International ICST Conference on Pervasive Computing Technologies for Healthcare,01 2011. doi: 10.4108/ icst.pervasivehealth.2011.246161. Evan Lutins. Grid searching in machine learning: Quick explanation and python implementation, 2017. URL https://medium.com/@elutins/ grid-searching-in-machine-learning-quick-explanation-and-python-implementation-550552200596 . Accessed: 2020-05-15. Calum Maclean. Thermal comfort and wellbeing, 01 2017. URL https://www.bsria.com/uk/ news/article/thermal-comfort-and-wellbeing/. Accessed: 2020-01-10. Cory Maklin. Mean shift clustering algorithm, 2018. URL https://towardsdatascience.com/ machine-learning-algorithms-part-13-mean-shift-clustering-example-in-python-4d6452720b00 . Accessed: 2020-01-26. Stephen Marsland. MACHINE LEARNING An Algorithmic Perspective. CRC Press, 2015. ISBN 978-1-4665-8333-7. Aditi Mittal. Understanding rnn and lstm, 2019. URL https://towardsdatascience.com/ understanding-rnn-and-lstm-f7cdf6dfc14e. Accessed: 2020-01-26. Amanda Iglesias Moreno. Moving averages with python, 2020. URL https:// towardsdatascience.com/moving-averages-in-python-16170e20f6c. Accessed: 2020-08-28. Chris Nicholson. A beginner’s guide to generative adversarial networks (gans), 2019. URL https://pathmind.com/wiki/generative-adversarial-network-gan. Accessed: 2020-01-26. James J. Park, Qun Jin, Martin Sang-soo Yeo, and Bin Hu. Human Centric Technology and Service in Smart Space: HumanCom 2012. Springer Publishing Company, Incorporated, 2012. ISBN 9400750854. Jamie Pearce and Sarah Curtis. Why places matter for our wellbeing, 04 2017. URL https://cresh.org.uk/2017/04/24/why-places-matter-for-our-wellbeing/. bibliography 72 Tom Rath and Jim Harter. The economics of Wellbeing. Gallup press, 2010. Sunil Ray. Commonly used machine learning algorithms, 2017. URL https: //www.analyticsvidhya.com/blog/2017/09/common-machine-learning-algorithms/ . Accessed: 2020-01-26. Sebastiaan Rothmann. Job satisfaction, occupational stress, burnout and work engagement as components of work-related wellbeing. SA Journal of Industrial Psychology,34:11 –16,00 2008. ISSN 2071-0763. URL http://www.scielo.org.za/scielo.php?script=sci arttext&pid= S2071-07632008000300002&nrm=iso. Angela Sanguinetti, Marco Pritoni, Kiernan Salmon, and Joshua Morejohn. Thermoostat: Occupant feedback to improve comfort and efficiency on a university campus. 08 2016. Warwick Medical School. About wemwbs, 2019. URL https://warwick.ac.uk/fac/sci/med/ research/platform/wemwbs/about/. Accessed: 2019-11-17. NoAA SciJinks. How is air quality measured?, 2019. URL https://scijinks.gov/air-quality/ . Accessed: 2019-11-28. F ´ abio Silva and Cesar Analide. Tracking context-aware well-being through intelligent environments. ADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal,4(2), 2015. ISSN 2255-2863. URL http://campus.usal.es/∼revistas trabajo/index.php/ 2255-2863/article/view/ADCAIJ2015426172. F ´ abio Silva and Cesar Analide. Computational sustainability and the phess platform: Using affective computing as social indicators. Future Generation Computer Systems, pages 329–341, 10 2018. doi: https://doi.org/10.1016/j.future.2018.10.006. Simplilearn. Deep learning algorithms you should know about, 2019. URL https://www. simplilearn.com/deep-learning-algorithms-article. Accessed: 2020-01-26. Emma Smith. Dal researchers create app that monitors mental health by measuring user’s emotions, 2020. URL https://www.cbc.ca/news/canada/nova-scotia/ dalhousie-university-researcher-prosit-study-smartphone-app-mental-health-treatment-1. 5653705. Accessed: 2020-08-22. Debbie L Stoewen. Dimensions of wellness: Change your habits, change your life. 58,08 2017. Accessed: 2020-07-28. Dataflair Team. 11 top machine learning algorithms used by data scientists, 2019. URL https://data-flair.training/blogs/machine-learning-algorithms/. Accessed: 2020-01-26. Expert System Team. What is machine learning? a definition, 2017. URL https: //expertsystem.com/machine-learning-definition/. Accessed: 2019-11-20. bibliography 73 Engineering ToolBox. lluminance - recommended light level, 2004. URL https://www. engineeringtoolbox.com/light-level-rooms-d 708.html. Accessed: 2019-11-25. Claudia Trudel-Fitzgerald, Rachel A. Millstein, Chanelle J. Howe Christiana von Hippel, Linda Powers Tomasso, Gregory R. Wagner, and Tyler J. VanderWeele. Psychological well-being as part of the public health debate? insight into dimensions, interventions, and policy. 2019. doi: https://doi.org/10.1186/s12889-019-8029-x. Elizabeth Tutton and Kate Seers. An exploration of the concept of comfort. Journal of Clinical Nursing,12(5):689–696,2003. doi: 10.1046/j.1365-2702.2003.00775.x. URL https: //onlinelibrary.wiley.com/doi/abs/10.1046/j.1365-2702.2003.00775.x. Mark van Rijmenam. 7steps to machine learning: How to prepare for an automated future, 2019. URL https://medium.com/dataseries/ 7-steps-to-machine-learning-how-to-prepare-for-an-automated-future-78c7918cb35d . Accessed: 2020-04-30. Peter Vink and Susan Hallbeck. Editorial: Comfort and discomfort studies demonstrate the need for a new model. Applied ergonomics,43:271–6,07 2011. doi: 10.1016/j.apergo.2011.06. 001. Katrina Wakefield. A guide to machine learning algorithms and their applications, 2019. URL https://www.sas.com/en ie/insights/articles/analytics/machine-learning-algorithms. html. Accessed: 2020-01-26. WHO. Ultraviolet radiation (uv), 2020. URL https://www.who.int/uv/intersunprogramme/ activities/uv index/en/index3.html. Accessed: 2020-04-30. Mark R. Young, Eve Rapp, and James W. Murphy. Action research: enhancing classroom practice and fulfilling educational responsibilities. Journal of Instructional Pedagogies,06 2010. URL http://www.aabri.com/manuscripts/09377.pdf. Hui Zhang, Edward Arens, and Wilmer Pasut. Air temperature thresholds for indoor comfort and perceived air quality. Building Research & Information,39(2):134–144,2011. doi: 10.1080/09613218.2011.552703. A REFERENCE VALUES FOR LIGHT Figure 35: Outdoor light reference levels (ToolBox,2004) Figure 36: Indoors light reference levels (ToolBox,2004) 74 B THERMAL COMFORT TABLE Figure 37: Thermal Comfort Values (Silva and Analide,2018) 75 C APPLICATION INTERFACE Figure 38: Settings Page 76 NB: place here information about funding, FCT project, etc in which the work is framed. Leave empty otherwise.