In Chapter 5 we saw that, in the HiTL control loop, the stage that follows data acquisition is state inference. Subsequently, we have also justified the use of artificial neural networks (ANNs) as our mood inference tool. In this chapter, we will approach the implementation and development of our neural network, as well as the user feedback mechanisms, both of which are cornerstones of state inference in our sample HappyWalk app. In this context, our objective is to implement a learning mechanism that will receive periodic feedback from the user and learn to associate emotions with sensory inputs. The frequency of these feedback requests will be dynamically adapted to the accuracy of the network.
We will first start, in Section 8.1, by explaining how to implement the neural network that will be used as an inference tool. Next, in Section 8.2, we will deal with the problem of requesting user feedback, following which we will present the solutions for processing user feedback, in Section 8.3.
HappyWalk's neural network will be implemented using the Encog Machine Learning Framework .1 For this, we will perform the following steps:
During the first step identified above, the library must be referenced in the app/build.gradle file, similar to what ...