Abstract
Emotion recognition is a field of study that is much investigated by researchers because it is an important piece in the development of intelligent system. Researchers used different techniques to capture the emotional response of the people based on the situation and design patterns to see its effects and relevance. In this paper, the researchers investigated the emotional patterns of the students towards programming using input devices such as keyboard and mouse. The use of keyboard and mouse provided an affordable and non-intrusive method of collecting data. The keyboard and mouse data collected were mapped by an expert on facial expressions to emotions captured on video at the same the students were answering the programming problem. From these annotations, the classes of emotions were derived. Rapid miner was then used to identify the pattern of keyboard and mouse strokes that corresponds to different emotions. The accuracy of the results were 70.25% and with a Kappa of 0.612%.
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Emotions play a significant part in our daily lives. These emotions range from feelings of happiness, anger, sadness, etc. Since it is natural for human beings to seek happiness, these feelings impact our overall being [1, 2].
Emotions also play a major role not only in decision -making but also in enhancing learning. Studies on human to human and human to computer intercommunication show that for effective interaction to happen, emotions must be given due importance. By including emotions in human-machine interaction, machine would be capable of detecting the emotional condition of the user and make appropriate adjustments [3]. Affective computing is a discipline that that has user emotions during computer interaction as its focal point [4] and whose primary objective is to develop systems that can recognize and respond to these emotions [5].
Developing a system that recognizes user emotion is not easy as it involves carrying out numerous tasks such as gathering and representing data and system training. Nevertheless, many methods for recognizing emotions of computer users have been developed. Some of these are based on analyses of keyboard and mouse movements [6].
Studies by Salmeron-Majadas, et al. [7] and Grimes, et al. [8] used keyboard and mouse interactions along with the Self-Assessment Manikin (SAM) because it provides an easy to understand way of describing emotions [9, 10]. SAM has been an effective tool in measuring responses to various stimuli such as pictures, images, sounds, pain, etc. [11,12,13].
Most studies on emotion recognition require some sort of special equipment to detect emotion. The current study aims to develop an emotion recognition system by collecting keyboard and mouse data from computer programming students in a non - intrusive manner. The collected data were used, together with the students’ answers to SAM questionnaires, as training set and test set for RapidMiner to generate patterns to figure out the emotions of the user. This method provides two main advantages: (1) it does not require any expensive, specialized equipment and (2) it is non -intrusive as it does not meddle with the user’s normal computer activities.
2 Related Literature and Studies
Majadas and Santos [14] listed that the relationship between mouse and keyboard use and the user’s affective state indicators could be valuable in detecting affective states in non-interfering and inexpensive manner. Ball and Breese [15] further stated in their study that high levels of activity with other applications (typing and mouse clicking rates) also are indicative of high task orientation. Thus, observation of such behaviors should be interpreted as evidence that the user is highly oriented towards task completion.
Bixler and D’Mello, for their part, stated that detecting affect plays an important part in creating applications that converse with and aid users in completing their task. Their study used analysis of keystroke to create affect detectors. This approach requires no additional hardware and presents an effective and unobtrusive method of data collection [16].
The importance of emotion detection is further supported by Zimmerman et al. [17], which stated that in intercommunication between human and computers, expressed emotions have a big role and most people interact with the technology naturally and socially. Importance in HCI research is increasing and the interaction system for emotional intelligence is used to express and respond to emotions of humans. The study is centered on another method of behavior using standard mouse and keyboard devices for measuring user affect and extracts parameters from motor-behavior using log-files of keyboard and mouse actions.
The study considered one of the methodology used for getting information from keyboard-stroke to identify if the emotional state is positive, negative, emotionless or neutral state as the user interacts with the computer. It includes the rate of mouse clicks, the rate of keystrokes as well as the keystrokes average duration as the analyzing parameters.
In the study, Zimmerman, et al., were able to know the outcome of induced effects based on the parameters of motor behavior when the user is using the computers including film clips showing, and doing online shopping. The ninety-six (96) participants were tested using the different mood states as independent variable. The created procedure was used and conducted at the laboratory utilizing the use of sensors and bands that measures respiratory attached to the participants. The data questionnaires displayed on the computer were answered, as well as self-assessment questionnaires, by the participants. The mouse and keyboard actions from the log - files are then analyzed [17].
Another research conducted by Rodrigues, et al., states that when a student attends an e-learning course there is a poorer interaction between student and teacher. There is no verbal interaction and it is difficult for the teacher to assess the feelings and attitudes of the students. The study developed a tool that will estimate the stress level of users without meddling with the user’s normal computer activity. Developing dynamic stress estimation model is the main goal of this research. For this research, data collected are click duration and accuracy, amount of movement, mouse movement, mouse clicks and keyboard strokes. It tested 10 programming students to validate the possibility of user’s stress detection and analysis of the mouse and keyboard use. It is concluded that stress has significant effect in learning capacities and learning speed [18].
3 Methodology
This study’s aim is the detection and identification of the emotions based on the use of non-invasive tools such as the ordinary mouse and keyboard. As shown on Fig. 1(a) the Flowchart for Emotional Classification based on Shukla and Solanki [19]. Data collection is done by performing feature selection and extraction and data labeling follow based on the questionnaire, fuzzy vector and label has been applied for the training of the data and from that classification has been identified. Using data preprocessing and applying the fuzzy vector, the research can display the emotional condition of the user. On the other hand, Fig. 1(b) shows the flowchart of what this research paper is trying to solve.
3.1 Data Gathering Tool
A data gathering prototype program was designed and implemented as a tool used to collect the data needed. The data gathering prototype has a survey question with Self-Assessment Manikin (SAM) images that requires the students to select [19]. The program records the keyboard keystrokes together with mouse clicks and movements then save individually in the .xls (mouse and keyboard) and .txt as the backup files.
The students have also been provided with programming questions for them to answer using Java programming language.
3.2 Data Gathering Procedures
This research intends to identify and analyze the emotional condition of the computer user. During the data gathering the following actions were conducted by the researchers: (1) randomly selected six (6) participants (three (3) males and three (3) females) who have programming course from a select academic institution. Informed consent form was filled up by the participants. (2) Orientation was done about the assessment that the participants need to answer but with no bias on what data will be gathered from them. (3) Two (2) laptops were utilized facing each other with installed prototype data gathering program. (4) The participants were given twenty (20) minutes to answer the programming problem assigned to them. (5) Java Programming Language will be used by the participants in answering the problem. (6) The Prototype Data Gathering Program is already running and it captures the features on the given time. The questionnaire will pop -up every three (3) minutes. (7) The recorded keystrokes and mouse movement and clicks is saved into an excel file. It is then converted to .csv (comma delimited format) to be used as an input operator for data mining.
3.3 Feature Extraction
Feature extraction includes lessening the measure of assets required to portray a vast arrangement of information. When performing analysis in the complex data, one of the real issues comes from the quantity of factors included. So, before starting to train, before beginning to prepare a classifier, it is important to play out an element choice strategy to dispense with the parameters which don’t relate with the class names and in this manner, decrease the dimensionality [20]. In this research, the plan is to characterize few profoundly solid components indicating certain feelings angle, for example, pleasant, calm, etc. Every element will identify the emotion level of the user. Name of the participant, age and sex were also extracted together with the keyboard and mouse data. The keystrokes, transition between key press, mouse x position, mouse y position, action, delay (dwelt time per milliseconds) and execution time [19]. The chosen emotional condition of the student is then mapped every time the student uses the mouse and the keyboard and based on the answer from the Self - Assessment Manikin.
From the extracted file, this research has acquired 14, 889 rows of recorded mouse and keyboard data, which will be used for the training and testing using the best algorithm available.
3.4 Model Development
This research developed a model to be used in the prototype program that will identify and analyze the emotion of the user using keyboard and mouse. The extracted feature is then analyzed using free open -source software available in the web like RapidMiner. The researcher selected 80% from the mapped file to be used as the TrainingSet and the remaining 20% is used as the TestSet. The two files was saved as .csv (comma delimited format) to be used as an input data in the RapidMiner. RapidMiner has been chosen by this research because of its user interface that is very friendly. There is more than one approach in labeling emotions and these methods include human labeling and the other is automatic labeling [16]. There are various kinds of labels that people can select from the word labels list from the questionnaire and uses scales to present the level of responses to each question [likert]. The other one is the use of Self-Assessment Manikin (SAM) which arousal and valence are presented and expressed graphically [9, 10]. The SAM is a pictorial evaluation tool intended to know the emotional measurements specifically by methods for two arrangements of graphical image. This method has been used in different studies and application [21, 22].
3.5 Classification
For classification, since the label for the data set is nominal, the researcher used five (5) different classifiers such as Decision Tree, Random Forest, Gradient Boosted Trees, Decision Stump and Random Tree. The result of training is shows that Gradient Boosted Trees presented the most acceptable model which has an accuracy of 70.25% and Kappa of 0.612%.
3.6 Model Testing
Model testing is done to verify that the gradient boosted tree has high accuracy and kappa using the test set data which is the 20% of the gathered data from the participants. The testing shows that the accuracy rate of the test model is 79% which is 13% higher than the Training set with the kappa of 0.75% which is 23% higher than the Training set.
4 Results and Discussion
The machine learning algorithm called Gradient Boosted Trees also known in other terms as XGboost [25], has function called Huber-M Loss generates a series of decision trees for loss data to return fit for classification [21]. The comparison of XGboost to other machine learning algorithms has highest accuracy rate 70.25% and kappa rate 0.61% when used to generate model based on the pattern and classes collected. It is because however, the function Huber-M Loss therein presented allows this algorithm to fit Loss data by generating another trees to the missing values. The accuracy indicates the highest precision point of all the classes. The classified correct example compared to the number of all examples known as accuracy is then calculated as a set of random input x = {x1,…xn} using the training set sample {Yi, Xi} or known values, and the positives ratio to all as positive predicted examples which is the precision is calculated based on the number of iteration and learning rate. The ratio of positives to all actually is positive examples known as recall is calculated based on splits nonterminal node [21].
Base on XGBoost formula the highest predictions are always on left which means the milliseconds delay value between 0.212 to 0.243 whether Male or Female after more than a second that participant starting, the “PLEASED NEUTRAL” is predicted, and most efficient compare to the right thereby the rest to the right belong to the category (Male/Female) is void.
The actual interface of our prototype on the figure below consists of only one button; it designs to be user friendly and straightforward (Fig. 2).
The prototype program automatically generates .XLS and .TXT files when it is started, just by defining its proper directory and filename. The TXT file produce the same data as XLS does but is prepared for retrieving or viewing through web.
It is possible to predict emotion using SAM questionnaire [26], keystrokes and mouse clicks detect stress [18] although this paper uses different subject and procedures but closely similar to the application of keystrokes dynamic [19]. The findings of this research not necessarily good but different where it was tested the students on programming subject, for future works should explore additional parameters such as to check program error or if the student think while doing the programming task how it will affect emotion.
5 Conclusion
Intelligent computers have important roles in society today, with its full capacity like its ability to recognize emotions that can be used to know the needs of the users. Extracting the emotional aspects of the human with the use of computers system could help the decision of the user on how would to interact with the computer. Thus, adapting to this new system that could identify and analyze the emotion of the person using the computer is a big help not only to the academe but also to the general user. The current approaches in emotion identification with the use of computer requires expensive equipment and is intrusive in nature. This paper has presented one way that could be used to identify and analyze the emotion in a non -intrusive and inexpensive way. Using the keyboard and mouse provides an alternative way of detecting the emotions of the students. Identifying these emotions and taking the appropriate actions can be of great help for teachers in assigning computer related activities to students thereby helping in the learning process.
References
Gross, J.J., Muñoz, R.F.: Emotion regulation and mental health. Clin. Psychol. Sci. Pract. 2(2), 151–164 (1995)
Salovey, P., Rothman, A.J., Detweiler, J.B., Steward, W.T.: Emotional states and physical health. Am. Psychol. 55(1), 110 (2000)
Picard, R.W.: Affective computing: from laughter to IEEE. IEEE Trans. Affect. Comput. 1(1), 11–17 (2010)
Picard, R.W., Picard, R.: Affective Computing, vol. 252. MIT press, Cambridge (1997)
Khanna, P., Sasikumar, M.: Recognizing emotions from keyboard stroke pattern. Int. J. Comput. Appl
Khan, I.A., Brinkman, W.P., Hierons, R.: Towards estimating computer users’ mood from interaction behaviour with key board and mouse. Front. Comput. Sci. 7(6), 943–954 (2013)
Salmeron-Majadas, S., Santos, O.C., Boticario, J.G.: Exploring indicators from keyboard and mouse interactions to predict the user affective state. Educ. Data Min. (2014)
Grimes, G.M., Jenkins, J.L., Valacich, J.S.: Exploring the effect of arousal and valence on mouse interaction. In: 34th International Conference on Information Systems. Milan (2013)
Lang, P., Bradley, M.M.: The International Affective Picture System (IAPS) in the Study of Emotion and Attention, Handbook of emotion elicitation and assessment, p. 29 (2007)
Lang, P.J.: The emotion probe. Am. Psychol. 50(5), 372–385 (1995)
Bradley, M.M., Greenwald, M.K., Petry, M.C., Lang, P.J.: Remembering pictures: pleasure and arousal in memory. J. Exp. Psychol. Learn. Mem. Cognit. 18(2), 379–390 (1992)
Greenwald, M.K., Bradley, M.M., Hamm, A.O., Lang, P.J.: Looking at pictures: evaluative, facial, visceral and behavioral responses. Psychophysiology 30(3), 261–273 (1993)
Miller, G.A., Levin, D.N., Kozak, M.J., Cook III, E.W., McLean Jr., A., Lang, P.J.: Individual differences in imagery and the psychophysiology of emotion. Cognit. Emot. 1(4), 367–390 (1987)
Salmeron-Majadas, S., Santos, O.C., Boticario, J.G.: An evaluation of mouse and keyboard interaction indicators towards non-intrusive and low cost affective modeling in an educational context. Procedia Comput. Sci. 35, 691–700 (2014)
Ball, G., Breese, J.: Emotion and Personality in a Conversational Character. Embodied Conversational Agents. MIT Press, Cambridge (2000)
Bixler, R., D’ Mello, S.: Detecting boredom and engagement during writing with keystroke analysis, task appraisals, and stable traits. In: Proceedings of the 2013 International Conference on Intelligent User Interfaces, pp. 225–234. ACM, March 2013
Zimmermann, P., Guttormsen, S., Danuser, B., Gomez, P.: Affective computing—a rationale for measuring mood with mouse and keyboard. Int. J. Occup. Safety Ergon. 9(4), 539–551 (2003)
Rodrigues, M., Gonçalves, S., Carneiro, D., Novais, P., Fdez-Riverola, F.: Keystrokes and clicks: measuring stress on e-learning students. In: Casillas, J., Martínez-López, F., Vicari, R., De la Prieta, F. (eds.) Management Intelligent Systems. Advances in Intelligent Systems and Computing, vol. 220, pp. 119–126. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-319-00569-0_15
Shukla, P., Solanki, R.: Web based keystroke dynamics application for identifying emotional state. Institute of Engineering and Technology DAVV, Indore, India, November 2013
Kołakowska, A., Landowska, A., Szwoch, M., Szwoch, W., Wróbel, M.R.: Emotion recognition and its application in software engineering. In: 2013 The 6th International Conference on Human System Interaction (HSI), pp. 532–539. IEEE, June 2013
Lee, P.M., Tsui, W.H., Hsiao, T.C.: The influence of emotion on keyboard typing: an experimental study using auditory stimuli. PLoS ONE 10(6), e0129056 (2015)
Friedman, J.H.: Greedy function approximation: a gradient boosting machine. Ann. stat. 29(5), 1189–1232 (2001)
Mitra, S., Pal, S.K., Mitra, P.: Data mining in soft computing framework: a survey. IEEE Trans. Neural Netw. 13(1), 3–14 (2002)
Click, C., Malohlava, M., Candel, A., Roark, H., Parmar, V.: Gradient Boosted Models with H2O, March 2016. https://h2o-release.s3.amazonaws.com/h2o/rel-turan/4/docs-website/h2o-docs/booklets/GBM_Vignette.pdf.Amazonaws.com. Accessed M ay 2017
Cao, G., Ding, J., Duan, Y., Tu, L., Xu, J., Xu, D.: Classification of tongue images based on doublet and color space dictionary. In: IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pp. 1170–1175 (2016)
Mchugh, M.L.: Interrater reliability: the kappa statistic. Biochemia Medica, pp. 276–282 (2012)
Bradley, M.M., Lang, P.J.: Measuring emotion: the self-assessment manikin and the semantic differential. J. Behav. Therapy Exp. Psychiatry 25(1), 49–59 (1994)
Smith, T.F., Waterman, M.S.: Identification of common molecular subsequences. J. Mol. Biol. 147, 195–197 (1981)
May, P., Ehrlich, H.C., Steinke, T.: ZIB structure prediction pipeline: composing a complex biological workflow through web services. In: Nagel, W.E., Walter, W.V., Lehner, W. (eds.) Euro-Par 2006. LNCS, vol. 4128, pp. 1148–1158. Springer, Heidelberg (2006)
Foster, I., Kesselman, C.: The Grid: Blueprint for a New Computing Infrastructure. Morgan Kaufmann, San Francisco (1999)
Czajkowski, K., Fitzgerald, S., Foster, I., Kesselman, C.: Grid information services for distributed resource sharing. In: 10th IEEE International Symposium on High Performance Distributed Computing, pp. 181–184. IEEE Press, New York (2001)
Foster, I., Kesselman, C., Nick, J., Tuecke, S.: The physiology of the grid: an open grid services architecture for distributed systems integration. Technical report, Global Grid Forum (2002)
National Center for Biotechnology Information. http://www.ncbi.nlm.nih.gov
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering
About this paper
Cite this paper
Estrada, J., Buhia, J., Guevarra, A., Forcado, M.R. (2018). Keyboard and Mouse: Tools in Identifying Emotions During Computer Activities. In: Jung, J., Kim, P., Choi, K. (eds) Big Data Technologies and Applications. BDTA 2017. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 248. Springer, Cham. https://doi.org/10.1007/978-3-319-98752-1_13
Download citation
DOI: https://doi.org/10.1007/978-3-319-98752-1_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-98751-4
Online ISBN: 978-3-319-98752-1
eBook Packages: Computer ScienceComputer Science (R0)