Advances in Artificial Intelligence

Volume 2014, Article ID 282659, 11 pages

http://dx.doi.org/10.1155/2014/282659

## An Emotion Detection System Based on Multi Least Squares Twin Support Vector Machine

Indian Institute of Information Technology, Allahabad, Uttar Pradesh 211012, India

Received 17 July 2014; Accepted 30 November 2014; Published 23 December 2014

Academic Editor: Ujjwal Bhattacharya

Copyright © 2014 Divya Tomar et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Posttraumatic stress disorder (PTSD), bipolar manic disorder (BMD), obsessive compulsive disorder (OCD), depression, and suicide are some major problems existing in civilian and military life. The change in emotion is responsible for such type of diseases. So, it is essential to develop a robust and reliable emotion detection system which is suitable for real world applications. Apart from healthcare, importance of automatically recognizing emotions from human speech has grown with the increasing role of spoken language interfaces in human-computer interaction applications. Detection of emotion in speech can be applied in a variety of situations to allocate limited human resources to clients with the highest levels of distress or need, such as in automated call centers or in a nursing home. In this paper, we used a novel multi least squares twin support vector machine classifier in order to detect seven different emotions such as anger, happiness, sadness, anxiety, disgust, panic, and neutral emotions. The experimental result indicates better performance of the proposed technique over other existing approaches. The result suggests that the proposed emotion detection system may be used for screening of mental status.

#### 1. Introduction

Stressful situation can cause some major psychiatric problems such as depression, suicide, PTSD, BMD, and OCD in civilian as well as in military life. Earlier treatment may become useful for such type of psychiatric problems [1]. So, there is a need to develop technology for recognizing early change in human behavior. Several biomarkers are reported by the medical researchers for psychiatric diseases [1, 2]. But these biomarkers are not effective in military life as they required a big and complicated machine for detecting psychiatric diseases. On the other hand, there is a fast development in voice, speech, and emotion detection technologies in engineering field. These technologies provide human-machine interaction for emotion detection and further treatment of psychiatric problems [3–5]. Several researches measured the level of fatigue and stress from speech [6]. But the level of fatigue and stress does not lead to psychiatric disorder directly. Emotion change of a human can cause mental diseases. Mostly, clinicians recognize the mental state of a patient from his/her face and voice which represents his/her emotion. This fact leads to the possibility that emotion detection system can be used for recognizing the mental disorder or disease in human. Early detection of disease improves the prognosis and is helpful to provide effective treatment at early stages. Emotion detection system can provide support to the clinicians to perform the task of emotion detection more efficiently. In automated call centers or in a nursing home, while nursing staff may not be available to assist everyone, automated emotion detection can be used to “triage” a patient. Automated emotion detection system is helpful to recognize whether a patient becomes angry or impatient and if so then the staff or treatment is provided to that patient as soon as possible.

Nowadays emotion detection from speech is an active research area and is useful for man-machine interaction [3–7]. Various researches have been done about automated emotion detection from facial expressions. But this task is computationally expensive and complex due to the requirement of high quality cameras for capturing face images. Apart from facial expression, emotions are also detected from speech which has been proven to be more promising modality. Since speech is the primary mode of human communication, the detection of emotion from speech is an important aspect.

Machine learning algorithms such as -nearest neighbor (NN), artificial neural network (ANN), and support vector machine (SVM) are widely used for emotion detection due to their excellent performance [8–13]. In this paper, the proposed emotion detection system recognizes seven different emotions which are anger, anxiety, disgust, happiness, sadness, panic, and neutral emotions. Different emotions can be seen as different classes. So, it requires a multiclassifier for emotion detection. In this paper, we proposed a novel multi least squares twin support vector machine (MLSTSVM) classifier which is the extension of binary least squares twin support vector machine (LSTSVM). So, the proposed system predicts the class or emotion for a given input. In order to check the validity of the proposed classifier, we evaluated its performance against 5 benchmark datasets.

The paper is organized as follows: introduction section includes need for emotion detection system. Section 2 provides the detail of our novel classifier which is multi least squares twin support vector machine. Proposed framework for emotion detection and dataset details are discussed in Section 3. The experimental results and conclusion of the proposed emotion detection system are presented in Sections 4 and 5, respectively.

#### 2. Multi Least Squares Twin Support Vector Machine

Kumar and Gopal proposed LSTSVM for binary classification which solves two linear programming problems and constructs two nonparallel hyperplanes, one for each class [14]. Since real world data contains multiple classes and requires a classifier that works well for multiple classes, in this paper, we propose a novel multiclassifier termed as MLSTSVM. This classifier is an extension of the binary LSTSVM and is based on “one-versus-rest” strategy. Here, we selected and extended the binary LSTSVM because it shows better generalization ability and is faster as compared to other existing approaches [14, 15]. MLSTSVM constructs “” hyperplanes, one for each class, by optimizing -linear programming problems, where “” denotes number of classes. It adopts the concept of “one-versus-rest” in which the data points of each class are trained with the data points of other classes. Consider dataset has “” number of data points in training dataset: . Here is a feature vector in -dimensional space and is the label of corresponding class. “One-versus-rest” generates binary LSTSVM classifier, each of which separates one class from the rest of the classes. The th LSTSVM classifier assumes the data points of th class as positive data points and the data points of other classes as negative data points. Consider the data points of th class are indicated by the matrix , where represents number of data points in th class. Let the data points of rest of the classes be indicated by matrix as The matrix includes all the data points except th class. MLSTSVM classifier for both linear and nonlinear cases is formulated as follows.

##### 2.1. Linear Case

The equation of th hyperplane is obtained as where and represent normal vector and bias term, respectively, in real space . The th LSTSVM classifier optimizes the following objective function: where and denote the vector of 1’s and and represent the penalty parameter and the slack variable correspondingly. The first term of (3) denotes the squared sum distance of the data points of the th class. The minimization of this term keeps the hyperplane in the close affinity of the th class. The second term of (3) minimizes the misclassification error of the data points of rest of the -1 classes. So, in this way the hyperplane is kept in the close affinity with the data points of th class and lies as far as possible from the data points of other classes. The objective function is solved by taking its dual form. Lagrangian function of the objective function as mentioned by (3) is achieved as follows: where represents the Lagrangian multiplier. The optimization of Lagrangian function is achieved by differentiating it with respect to normal vector, bias, slack variable, and Lagrangian multiplier and the following Karush-Kuhn-Tucker (KKT) conditions are obtained: By combining (5) and (6), the following equation is obtained: Consider and and . After putting these values in (8), it may be reformulated as

The above equation requires the inverse of . Sometimes a matrix may be singular or ill-conditioned due to which it is not possible to obtain its inverse. The situation may be avoided by adding a regularization term to the matrix and the above equation is reformulated as where is a very small nonnegative integer and is an identity matrix of suitable size. Lagrangian multiplier is obtained from (7) as After substituting the value of in (10), we obtain the normal vector and bias for th classifier as follows: For a new data point or test data sample, its perpendicular distance is measured from each hyperplane and the data sample is assigned to that class depending upon which of the planes lies at minimum distance from it.

*Algorithm 1. * For to , where is total number of classes,(i) obtain two matrices and as
where and denote the data points of th class and the rest of the classes, respectively;(ii)use validation process to obtain penalty parameters;(iii)calculate weight and bias for each class by using (13).

Achieve decision function by using (14). Use this function to assign the class to new data points.

##### 2.2. Nonlinear Case

Mostly, the real dataset is nonlinear in nature; that is, the classes are separable by nonlinear class boundaries. So, it is essential for a classifier that it works well both for linear and for nonlinear separable data points. In this section, we proposed the formulation of the MLSTSVM classifier for nonlinear cases. Firstly, kernel functions are used for mapping the input data points into higher-dimensional feature space and then the data points are classified by constructing nonlinear or kernel surfaces in this space. In higher-dimensional space, the equation of th kernel surface or nonlinear surface for any kernel function is obtained as where and Ker is any suitable kernel function. The optimization problem of MLSTSVM for nonlinear cases is formulated as Lagrangian function of the above-mentioned equation is achieved as KKT conditions for nonlinear MLSTSVM are Combining (19) and (20), we get Let and . Then (22) can be rewritten as The value of normal vector and bias is achieved by solving (21) and (22) as For a new data point, its perpendicular distance is measured from each nonlinear surface and it is assigned to that class depending upon which of the planes lies at minimum distance from it. The values of weight and bias are used to construct kernel surfaces for each class. The decision function for nonlinear MLSTSVM is obtained as Gaussian and polynomial kernel functions for two input vectors and are obtained as

*Algorithm 2. * Choose kernel function.

For to , where is total number of classes,(i)obtain two matrices and as
where and denote the data points of th class and the rest of the classes correspondingly;(ii)use validation process to obtain penalty parameters;(iii)calculate weight and bias for each class by using (24).

Obtain decision function by using (25) and assign the class to new data points by using this decision function.

In order to prove the validity of the proposed MLSTSVM, we performed experiment on five benchmark datasets. All the datasets are taken from UCI machine learning database [16]. Table 1 shows the accuracy comparison of the proposed MLSTSVM classifier with other exiting classifiers. Accuracy refers to the correct classification rate and is calculated by taking the average of testing accuracies. It is clear from the table that the proposed classifier has achieved better accuracy for Wine, Glass, Vehicle, and Teaching Evaluation datasets as compared to NN, ANN, and multi-SVM, while for Iris dataset MLSTSVM obtained 97.75% accuracy which is better than ANN and multi-SVM and comparable with NN. The experiment is performed using 10-fold cross validation method.