1 Introduction

Recognition of human activities can be broadly grouped into two main approaches namely, external and wearable sensor-based systems. In the former, the sensor devices are installed at predetermined locations where the user performs various activities. In the later, the sensor is attached to the user.

Smart homes for assisted living [9, 10] are typical scenarios where human action recognition is done using external sensors. These sensors include temperature [8], pressure, ambient based, acoustic [7, 21] or static cameras mounted at fixed locations. However, this system fails to work if the user performs action at a location which is out of reach of the sensor. Recently, vision-based activity recognition systems have attracted many researchers [14, 16, 33, 39]. It has wide applications in human-computer interaction and intelligent surveillance. A sensational application of camera-based gesture recognition system is the Kinect camera developed by Microsoft. It aids the users to interact with their computer using gestures without the need for a game controller. Zhang et al. [39] proposed a vision-based action recognition scheme in which both the static and dynamic information of video frames were captured in dual-channel architecture. This model was optimized using sparse and orthonormality principle. However, camera based human action recognition has multiple issues associated with it. The main issue is privacy. Individuals may not feel comfortable being monitored by cameras all time. Other issues include incomplete coverage of the individual, computational complexity, installation cost etc.

The aforementioned constraints have massively accelerated extensive research in the field of wearable sensor-based action recognition systems. Inertial measurement units (IMUs) like accelerometers, gyroscopes, magnetometers and barometers are the most commonly used wearable sensors for action recognition. Recent research studies have shown that action recognition systems that are based on tri-axial accelerometer data produces commendable results [28]. Various reviews [5, 19, 26, 30, 36] have been reported, that provide a comprehensive outlook on activity monitoring of humans based on wearable sensors and the issues to be addressed to tackle the challenges faced by them.

In recent years, the theories of sparse representation and compressed sensing (CS) have been gaining attention in the field of signal processing. Sparse signal representation has emerged as an extremely powerful tool for analyzing and classifying a large class of signals. Many signals like audio, image, video, etc., can be successfully represented as a linear combination of few chosen basis functions. CS enables the reconstruction of sparse and compressible signals from a small number of non-adaptive linear measurements in the form of random projection (RP). RP refers to the protocol of projecting a set of points from a high-dimensional space to a randomly chosen low-dimensional subspace. Many applications like classification or detection, do not require precise signal recovery, but rather are only interested in making some kind of decision. Inspired by CS, compressive classification (CC) [13] is recently evolving as an energy efficient classification tool. CC is designed to directly classify compressed samples without any recovery mechanism. Particularly, the concept of CC can be used in energy efficient implementation of human activity recognition systems that are based on wireless body sensor networks (WBSN).

Standard methods for dimensionality reduction like principal component analysis (PCA) and linear discriminant analysis (LDA) are data dependent whereas RP is data independent. Also, RP is simple and fast compared to PCA and LDA, as these techniques employ computationally complex Eigen value decompositions. RP on sensors aids in energy efficient implementation by reducing the amount of sensed data to be transferred from sensors to the processing unit. RP using random matrices like Sparse binary matrix, Gaussian random matrix, Bernoulli matrix, etc., are popularly used in many applications. In practice, however the use of purely random signal is expensive in hardware design. To alleviate this drawback, recently deterministic chaos systems are widely being used in data compression. A chaos system is a nonlinear system that has a high unstable structure. Under specific initial and control conditions, the output of the system is highly chaotic. In addition, since chaos are just deterministic equations, they can be easily implemented on hardware, as opposed to random sequences. Inspired by these eminent properties of chaotic systems, a novel chaotic map is proposed in our paper and used for the compression of accelerometer signals.

The main contributions of our work are twofold:

  • As far as we are aware, this is the first work to recognize human activities using a sparse based classifier that uses compressed data that is compressed using a random sequence generated by a chaotic map.

  • A novel chaotic map that generates chaotic sequence with improved chaotic properties which can be used for compression of accelerometer data is introduced in this paper.

This paper is organized as follows. Section 2 explains the related work. Section 3 describes the methodology. Section 4 depicts the experimental results. Finally, Section 5 provides the conclusions.

2 Related works

Activity recognition (AR) has been applied in many application areas such as surveillance, entertainment environments and healthcare systems. In this study, we have developed a novel chaotic map based compressive classification model which can be used to monitor and categorize the activities performed in daily life. Major contributions in this area are summarized as follows:

Rashidi et al. [29] gave a detailed study about various technologies, tools and techniques used in ambient-assisted living (AAL). Emerging AAL technologies like smart home, mobile and wearable sensors and robotics were analyzed in this paper. A number of techniques applicable to AAL like activity recognition, location identification, planning, context modeling and anomaly detection were reviewed in detail. In [6], the authors proposed a framework for detecting the current context and activity performed by users based on the data from the sensors embedded in mobile phones. In addition, a recommender system was also developed to provide personalized information to the users. In [23], Liu et al. proposed an efficient technique for recognizing human actions using discriminative temporal patterns. The extracted patterns were used to form a joint pattern feature space using which every activity was represented as a feature vector. In [4], Chen et al. presented a survey on human action recognition based on fusion of vision and inertial sensors. The authors also included a review about various publicly available datasets that included simultaneously captured data of depth and inertial sensors. Wang et al. [32] proposed an action recognition system using a single tri-axial accelerometer. He used ensemble empirical mode decomposition (EEMD) based features for representing human activities. He also introduced cooperative game theory-based feature selection approach for selecting optimum number of features. He did his experiments by placing accelerometer at two locations namely, the left ankle and waist and showed that better results could be achieved when the sensor node is attached to the waist. He used k-NN and SVM classifiers for evaluating his framework. Khan et al. in [17] presented a physical activity recognition system based on a hierarchical scheme, using a single tri-axial accelerometer. His proposed framework had two levels of operation. At the lower level, the state of the activity, i.e., whether it is static, dynamic or transition was recognized using statistical signal features and artificial neural networks (ANNs). At the higher level, specific human activities were recognized using autoregressive (AR) coefficients, signal magnitude area and tilt angle derived from acceleration signals. These extracted features were used for classification using linear-discriminant analysis and ANNs. Xu et al. [35] gave the notion of human activity recognition using features extracted from Hilbert-Huang Transform. His technique focused on properties of action data such as nonlinearity and non-stationarity. The effect of using multi-features vs. a single feature was also investigated and it was inferred that multi-features combination improved the performance measures. The extracted multi-features comprised of instantaneous amplitude and instantaneous frequency that were extracted from empirical mode decomposition. Also, instantaneous energy density and marginal spectrum were extracted from Hilbert spectral analysis. Khan et al. [18] gave a pragmatic approach for optimizing sampling rates used for sampling accelerometer data. It was shown that reducing the sampling rate reduces the battery consumption, thereby increases its lifetime. They also used 5 benchmark datasets recorded at different sampling rates and presented scenario-specific optimal sampling rates suitable for activities under consideration in each dataset.

Ayachi et al. [1] presented a daily living activity classification model using EMD based algorithm. This work used 17 IMUs positioned strategically on different body parts for capturing full body motion. It was finally inferred that 6 IMUs were sufficient to classify 9 complex tasks namely, walking, sit to stand, stand to sit, reaching to the ground to pick, to put down objects on the floor, step over an obstacle and turning. A combination of EMD, non-linear transform and adaptive thresholding strategy were used for classification. In [28], Preece et al. compared various feature extraction techniques for classifying dynamic activities from accelerometer data. Two datasets comprising of three and eight activities respectively were collected from 20 subjects. A sampling rate of 64 Hz was used here. It was concluded that frequency domain features outperformed wavelet features in terms of classification accuracy. In addition, classification accuracies were compared for three sensor placements, namely, the waist, thigh and ankle. A single classifier namely, k-NN was used for evaluation. Ines et al. used a set of time, statistical and frequency domain features extracted from 3-dimentional accelerometer sensors [24]. A novel knowledge discovery tool was proposed. A clustering metric based on the construction of data confusion matrix was also proposed. It was shown that a single waist worn accelerometer can adequately identify user’s activities. Ignatov et al. [15] proposed an action recognition system based on smart phones using time series data collected from tri-axial accelerometer. Based on the principle of principal component analysis, phase trajectory matrix was used to extract the fundamental period of motion. This technique involved online time series segmentation, noise reduction and classification using k-NN.

Zhang et al. [38] presented an action recognition framework based on sparse algorithm. It was found that, sparse based recognition framework achieved a higher accuracy compared to nearest neighbor, naive Bayesian classifier and support vector machine. Also, an optimum feature selection technique based on random projections was shown to achieve greater performance compared to finely selected features. In [37], Zhang et al. described a human action recognition framework based on feature selection techniques. They proposed a set of new features called physical features based on the physical parameters of human motion. A single-layer feature selection framework was used to analyze the impact of physical features on the performance of recognition system. Bao and Intille [2] analyzed the performance of action recognition algorithms using wire-free accelerometers on 20 activities. Five bi-axial accelerometers were worn simultaneously on different parts of the body. Various features like mean, entropy, energy and pair-wise correlation were extracted from acceleration data. Action recognition on these features was performed using classifiers like decision table, instance-based learning, C4.5 decision tree and naive Bayes classifiers. In 2016, [34] Xiao et al. gave the notion of energy efficient recognition of human activities using compressed classification. He presented compression of the raw accelerometer data based on random projection theory using standard random matrices. Classification was done using the compressed data using sparse based framework. Both online and offline evaluation was done to extend the life time of wireless body sensor networks. Gibson et al. [11] presented matching pursuit based compressive sensing technique wherein intelligent fall detection system was modelled on a wearable Shimmer device. The fall signals were processed with discrete wavelet transforms and principal component analysis to obtain binary tree classifiers. The captured tri-axial acceleration signals were converted to the wavelet-domain and made sparse by selecting the most significant coefficients for wireless transmission to a base station. The received sparse signal was then recovered through greedy compressive sensing techniques like MP, OMP, ROMP and StOMP.

Most of the above cited techniques [2, 15, 17, 28, 32, 37, 38] have investigated on building action recognition systems using raw accelerometer data. The main downside of these techniques is the heavy consumption of energy during the transmission of bulk raw data from the data acquisition unit to the classification unit. This issue was addressed in [18], by sampling the raw data prior to feature extraction. However, increasing the sampling rate below certain limits may lead to loss of useful information leading to inaccurate action recognition. In [11], the authors compressed the raw data using wavelet transform and principal component analysis, however, classification was not done using the compressed data. The compressed data was recovered using recovery algorithms and was then used in classification. This led to increased computational requirements. To overcome this problem, in [34] the authors proposed a system in which classification was done by directly using the compressed data without any recovery algorithms. However, this system used standard random matrices for compressing the data based on random projections. The generation of random matrices is a difficult task during hardware implementation. To alleviate all the listed issues, in our paper we have proposed a chaotic map based compressive classification scheme. This framework does not require any recovery algorithms. The classification is done directly using the features extracted from the compressed data. Also, the compression is established using random matrices that are generated by deterministic equations, and thus can be easily implemented in hardware.

3 Methodology

The complete overview of the proposed framework is depicted in Fig. 1. It involves four main steps namely, data acquisition, data compression, feature extraction and sparse based classification. The data acquisition is performed using a tri-axial accelerometer ADXL335 that is interfaced to Arduino Uno board. This data acquisition unit is worn by participants around their right waist as shown in Fig. 1. The acquired data is then segmented using non-overlapping windows having fixed frame length. The segmented raw data is compressed based on random projection theory. The random matrices for this compression is generated using a novel chaotic map. The compressed low dimensional data is then used for extraction of features. The extracted features included both time and frequency domain features. The features obtained from the data of various action classes were appended to construct a concatenated dictionary. This concatenated dictionary is used for the recognition of test activities during recognition stage using a sparse based classifier.

Fig. 1
figure 1

Overview of the entire proposed framework

The main idea of the paper is to develop an accurate and efficient action recognition framework for recognizing human activities that can be easily implemented in hardware. The easier hardware implementation is achieved by using sequences generated by chaotic maps for data compression. These sequences are generated using deterministic equations that thus aid in facile hardware implementation. The entire process is performed in two stages: training stage and recognition stage as illustrated in Fig. 2. In the training stage, accelerometer raw data is compressed and features are extracted from the compressed data. The feature vectors from training samples of all activity classes are then concatenated together to construct the over-complete dictionary. In the recognition stage, the unknown stream of activity signal is compressed and transformed into a feature vector in the same manner as in the training stage. This feature vector along with the over-complete dictionary created during training stage are used for the prediction of action class using a sparse based classifier. In the real-time implementation of the proposed framework, data acquisition and the proposed data compression technique must be performed at the transmitter side termed as the data acquisition unit and feature extraction and classification must be performed at the receive side termed as the data processing unit. Thus, the proposed compressive classifier is designed such that a high level of classification with a minimum reduction in accuracy is achieved, so that the amount of data to be transmitted from data acquisition unit to data processing unit is minimum, which in turn would increase the battery life time of WBSN.

Fig. 2
figure 2

Sparse based compressive classification system

3.1 Dataset description

The dataset for our experiment was collected from 15 healthy subjects (7 male, 8 female) having diverse age, height and weight. These 15 subjects had a wide range of age varying from 20 to 50. They had height and weight ranging from 5.2-6.1 (in feet) and 40-75 (in Kg) respectively. These wide range of statistical features facilitated in the acquisition of a robust dataset that could be used in the creation of a proficient action recognition model. The statistical details of age, height and weight are demonstrated in Table 1.

Table 1 Statistical details of the subjects used in data acquisition

Each participant was asked to perform a total of 8 different kinds of daily activities which included static and dynamic activities. Three different static activities and five different dynamic activities were considered. In particular, the static activities included sit, stand and lie-down. The dynamic activities included walk, run, jump up, go upstairs and go downstairs. The list of various activities used in our framework along with the duration of recording them is enumerated in Table 2. These activities were selected because they are common daily activities and they also adhere to applications like elderly people monitoring, smart homes and fitness monitoring. The aforementioned activities were performed at various indoor and outdoor locations. The participants were asked to perform these activities in their own style and pace. No specific instruction was given regarding the action. Each subject was asked to perform all the static and dynamic activities 3 times each.

Table 2 List of recorded activities with their recording duration

3.2 Data acquisition

Data acquisition was carried out using Arduino Uno interfaced with tri-axial accelerometer ADXL335 manufactured by Analog devices, with a dynamic range of ±3 g and tolerances within 10%. Arduino Uno is a microcontroller board based on the ATmega328 with a clock speed of 16 MHz. It has 32 KB flash memory, 2 KB SRAM and 1 KB EEPROM. It has a signal conditioned voltage output [12]. Data was collected at a sampling rate of 64 Hz as it is sufficiently higher than 20 Hz sampling required to access daily activity and was also found to produce very high classification accuracy [18]. For each subject, data was collected from the accelerometer worn around the right waist of individuals, as it was proved to be an efficient sensor placement location for action recognition [18]. The data acquisition unit was comprised of a tri-axial accelerometer ADXL335, Arduino Uno, 9 V rechargeable Nickel Metal Hydride battery and NRF24L01L long range transceiver module with antenna. These components were placed inside a belt type mobile pouch which was worn by subjects such that, the accelerometer is at the right waist as shown Fig. 3. All the three channels of the accelerometer data were transmitted to the personal computer (data processing unit) wirelessly. The data processing unit used in our framework is shown in Fig. 4. It includes a laptop and a NRF24L01L long range transceiver module with antenna to receive the transmitted data.

Fig. 3
figure 3

Data acquisition unit

Fig. 4
figure 4

Data processing unit

3.3 Data segmentation

In this work, data segmentation is done using non-overlapping windows having fixed length. Let A be the 3-dimentional accelerometer dataset comprising of signals along x, y and z axis. This dataset is segmented to frames F of window size (N) 128 samples without overlapping, which corresponds to 2 s given the 64 Hz sampling rate. These frames are compressed using a compression ratio of 1:n where n =2, 4, 8, 16 and 32 to form compressed frames Fc of size 64, 32, 16, 8 and 4 respectively.

3.4 Data compression

Designing wearable sensor-based signal processing algorithms that utilizes minimum battery usage is a challenging task. In [34], it was shown that 80% of battery is used for transmitting data to the computing device. In [18], it was demonstrated that reducing sampling rate from 100 Hz to 25 Hz reduces battery consumption by more than half. Thus, by reducing the sampling rate, longer battery life time can be achieved. However, according to Shannon-Nyquist theorem, for loss-less reconstruction of a signal, the signal must be sampled with a minimum sampling rate of twice the highest frequency of the signal. It is well known that, voluntary human movement typically does not exceed 10 Hz, and thus according to the aforementioned Shannon-Nyquist theorem, a minimum sampling rate of 20 Hz is essential for effective representation of human movements. Thus, reducing sampling rate below 20 Hz for further improving battery life time may result in poor representation of human activity signal, which may eventually lead to poor classification accuracy of the same. In order to alleviate the above-mentioned drawback, in our paper we have proposed a novel chaotic map based compression and simultaneous classification framework.

3.4.1 Logistic map

The logistic map [25] is a popularly used 1D nonlinear map and is defined by

$$ {x}_{n+1}=\mu\;{x}_n\;\left(1-{x}_n\right) $$
(1)

where μ ∈ [0, 4] is the control parameter and x0 ∈ [0, 1] is the initial condition. Bifurcation diagram of logistic map is shown in Fig. 5a. From the bifurcation diagram, it is observed that the map is chaotic for μ ∈ [3.57, 4]. Logistic maps are widely used in various compression based applications [22, 40].

Fig. 5
figure 5

Bifurcation diagram a Logistic map b Proposed chaotic map

3.4.2 Proposed chaotic map

The proposed chaotic map is defined as follows

$$ {x}_{n+1}=\mu \left({x}_n^3-{x}_n^2\right)+1 $$
(2)

where μ ∈ [0, 9] is the control parameter and x0 ∈ [0, 1] is the initial condition. From Fig. 5b, we find that the proposed map is chaotic in the range μ ∈ [5.33, 9]. This range is high compared to that of logistic map. Further, the chaotic property of the proposed map is proved using two metrics namely, Lyapunov exponent and approximate entropy.

Lyapunov exponent: The Lyapunov exponent [31] is a quantity that characterizes the rate of divergence of nearby trajectories of a chaotic system. It is a commonly used mathematical tool for quantitative evaluation of chaotic performance. Positive Lyapunov exponent indicates chaos in the system and the larger the value, the higher is the chaotic performance. It is calculated as

$$ \lambda =\underset{N\to +\infty }{\lim}\frac{1}{N}\sum \limits_{n=1}^N\ln \left|\frac{dx_{n+1}}{dx_n}\right| $$
(3)

Lyapunov exponent curves for the logistic and proposed map is shown in Fig. 6.

Fig. 6
figure 6

Lyapunov exponent a Logistic map b Proposed chaotic map

Approximate entropy: Approximate entropy [27] measures system complexity. Larger value of approximate entropy indicates higher complexity of the generated chaotic sequence.

Table 3 compares the values of Lyapunov exponent and approximate entropy obtained using logistic map and the proposed chaotic map using initial value x0 = 0.01. From the Table 3, we observe that the values of both Lyapunov exponent and approximate entropy are much higher for the proposed map compared to that of logistic map, and hence we infer that the proposed chaotic map generates chaotic sequence with higher degree of chaotic properties. This implies that the sequence generated by the proposed chaotic map is highly random. Our work explores this random characteristic of the generated sequence for the compression of accelerometer data.

Table 3 Comparison of logistic and proposed chaotic map

3.4.3 Compression using proposed chaotic map

The sequence generated by the proposed map is used for compressing the data acquired by the accelerometer. The proposed data compression algorithm using the generated chaotic sequence is as follows.

  • Step 1: A sequence λ = [λ1, λ2, …,λL] with length L = M × N is generated by the proposed chaotic map with initial condition x0 and control parameter μ.

  • Step 2: Rearrange this sequence in the form of a matrix λmat ∈ RM × N.

  • Step 3: The compressed frame, Fc ∈ RM × 1 is obtained by

    $$ {F}_{M\times 1}^c={\lambda}_{M\times N}^{mat}{F}_{N\times 1} $$
    (4)

Here, M <  < N, thus dimensionality reduction of the acquired accelerometer data is achieved using the above algorithm. Initial condition x0 and control parameter μ were set to 0.01 and 9 respectively. Initial 1000 values of the generated sequence were discarded and the next sequences L values were used to generate λ to avoid transient effect. To compare the performance of the proposed chaotic map, accelerometer data was compressed using the following three standard random matrices φ of size M × N whose entries φm, n are independent and identically distributed.

  1. (i)

    Sparse binary matrix such that

    $$ {\varphi}_{m,n}=\left\{\begin{array}{l}+1,\kern0.72em with\;p=\frac{1}{6}\\ {}-1,\kern0.72em with\;p=\frac{1}{6}\\ {}0,\kern1.08em with\;p=\frac{2}{3}\end{array}\right. $$
  2. (ii)

    Gaussian random matrix φm, n with zero mean and unit variance.

  3. (iii)

    Bernoulli matrix P(φm, n =  ± 1) = 1/2

Data compression using standard random matrix is represented as,

$$ {F}_{M\times 1}^c={\varphi}_{M\times N}{F}_{N\times 1} $$
(5)

3.5 Feature extraction

Various time and frequency domain features were extracted from the compressed accelerometer data. These features are listed in Table 4. In particular, 11 time domain features and 3 frequency domain features were used in our work. Mean, standard deviation, median, 25th percentile, 75th percentile and correlation between each two pairs of axes used in [28] and was found to produce very good results in terms of classification accuracy. Also, features like root mean square (RMS), interquartile range (IQR) and mean crossing rate (MCR) were included in our work [38]. RMS is the square root of the arithmetic mean of the squares of the values in a window. IQR measures the statistical dispersion of the data and is the difference between the 75th and 25th percentiles of the data. Mean crossing rate is the total number of times the signal changes from below average to above average and vice versa. In addition, two physical features namely, mean of moment intensity (MI) and normalized signal magnitude area (SMA) proposed in [37] were included, as they boosted the classification performance. Three frequency domain features were used namely, dominant frequency [38], spectral entropy [2] and spectral energy [2]. To derive the frequency domain features, a fast Fourier transform (FFT) was performed on each frame. Spectral energy is the sum of squared FFT coefficients. It describes the distribution of energy of the signal with respect to frequency. Spectral entropy is the measure of the normalized information entropy of the FFT coefficients. It measures the irregularity of the signal and helps in differentiating activities having simple and complex acceleration patterns [2]. All the above-mentioned features except mean of MI and normalized SMA were derived individually for each of the three components of tri-axial accelerometer signal. Thus, from every frame of window size 2 s from x, y and z channels, a total of 38 features were extracted.

Table 4 List of time and frequency domain features

3.6 Sparse based classification

Classification is done based on sparse theory. During training stage, the features acquired from the training data of a particular class are appended to form a class-specific dictionary. All the class-specific dictionaries are then concatenated to form a concatenated dictionary. During testing stage, the test feature vector along with the concatenated dictionary formed during training stage is used in the generation of sparse coefficient vector using orthogonal matching pursuit algorithm (OMP) [3]. The obtained sparse coefficient vector is then split in accordance with the number of action classes being considered. Each of the split sparse coefficient sub-vector corresponds to a particular class. Ideally, the sparse coefficient sub-vector that corresponds to the actual test class must contain non-zero coefficients, whereas, the rest of the classes must contain only zeros. However, in practice, it is not possible due to issues like measurement noise, incomplete training set and model error. Thus, the classification is established using l1−norm. The class corresponding to the sparse coefficient sub-vector that produces maximum l1−norm is classified as the action class.

Let us consider C distinct activity classes for classification. Let ki represent the number of training frames from class i, i ∈ [1, 2, …, C]. From each frame, a m-dimensional feature vector is extracted and these feature vectors are arranged in the form of a matrix to form a class-specific dictionary \( {\phi}_i=\left[{V}_{i,1},{V}_{i,2},\dots, {V}_{i,{k}_i}\right]\in {R}^{m\times {k}_i} \) . A concatenated dictionary ϕ is formed by concatenating features from all C classes, and is given by ϕ = [ϕ1 | ϕ2 | …| ϕc] ∈ Rm × k where k = k1 + k2 + … + kC. For a new test sample Vt, which is a m-dimensional feature vector, the algorithm for sparse based classification is as follows.

  • Input: Concatenated dictionary ϕ and test sample Vt.

    • Step 1: Find sparse coefficient vector α for the given test feature vector Vt ∈ Rm × 1 by orthogonal matching pursuit algorithm.

      $$ \alpha =\underset{\alpha }{\arg\;\min}\;{\left\Vert \alpha \right\Vert}_1\;\mathrm{subject}\kern0.17em \mathrm{to}\;{\left\Vert {V}_t-\phi \alpha \right\Vert}_2^2\le \varepsilon $$
      (6)

where ε is the error tolerance and was set to 0.01.

  • Step 2: Split the sparse coefficient vector α as,

    $$ \alpha ={\left[{\alpha}_1|{\alpha}_2|\dots |{\alpha}_C\right]}^T $$
    (7)

where αi is the coefficient vector corresponding to ϕi.

  • Step 3: Estimate the activity class i using,

    $$ i=\underset{i\in 1,2,\dots, C}{\arg\;\max}\;{\left\Vert {\alpha}_i\right\Vert}_1 $$
    (8)
  • Output: Activity class i.

4 Experimental results

In this section, we evaluate the performance of our proposed chaotic map based compressive classification framework. For evaluating, we use the widely used leave-one-subject-out cross-validation strategy [28, 38]. Here, data from all subjects except one was used for training and the data from the excluded subject was used for testing. This process is repeated until each subject has been used once for testing. The overall performance is the average test classification result of each test-train repetition.

The classification results can be organized in a confusion matrix CMC × C for a classification problem with C classes. This is a matrix such that the element CMij is the number of instances from class i that were classified as class j. The following values [20] can be obtained from the confusion matrix.

  • True Positives (TP): The total count of positive instances that were predicted as positive.

  • True Negatives (TN): The total count of negative instances that were predicted as negative.

  • False Positives (FP): The total count of negative instances that were predicted as positive.

  • False Negatives (FN): The total count of positive instance that were predicted as negative.

  • The standard metrics used to indicate classification performances are specificity, precision, F-score and accuracy [20]. These are calculated using the following equations.

The specificity δ, also referred as true negative rate is computed as the proportion of correctly classified negative instances to the total sum of all negative instances.

$$ \delta =\frac{TN}{TN+ FP} $$
(9)

The precision ρ, often referred to as positive predictive value, is calculated as the proportion of correctly classified positive instances to the total number of instances classified as positive.

$$ \rho =\frac{TP}{TP+ FP} $$
(10)

The F-score μ, is determined by finding the harmonic mean of precision and recall. F-score is calculated using the following equation.

$$ \mu =\frac{2^{\ast } TP}{\left({2}^{\ast } TP+ FP+ FN\right)} $$
(11)

The accuracy α, is the most commonly used performance evaluation metric to summarize the overall classification performance for all classes.

$$ \alpha =\frac{TP+ TN}{TP+ FP+ FN+ TN} $$
(12)

Table 5 shows the confusion matrix obtained for classification using raw accelerometer data without compression. From the confusion matrix, we can infer that the average precision and F-score obtained are 93.70 and 93.68% respectively. Also, the overall accuracy is 93.69%.

Table 5 Confusion matrix for classification of accelerometer raw data

Table 6 enumerates the values of accuracy (in %) obtained for various values of compression ratios for compression using Sparse binary matrix, Gaussian random matrix, Bernoulli matrix and the matrix obtained using the proposed chaotic map. From the Table 6, it is obvious that chaotic map based compression produces high classification accuracy compared to all other standard matrices used for random projection based dimensionality reduction. For a very high compression ratio of 1:32, the size of the compressed frame is 4. This is equivalent to a sampling frequency of 2 Hz, since we have considered a window size of 2 s. If the signal was sampled at such a low sampling frequency it would be impossible to classify the signal, since it is very much less than 20 Hz which is the minimum required sampling frequency for human action recognition according to Shannon-Nyquist criterion. However, from Table 6, we can clearly see that even for such a high compression ratio, our framework produces good accuracy which is greater than 80%. This show the effectiveness of the proposed chaotic map based compressive classification approach.

Table 6 Variation of overall accuracy for various compression ratios

Table 7 lists the values of specificity and precision averaged over all activities, obtained for different compression ratios using Sparse binary matrix, Gaussian random matrix, Bernoulli matrix and the proposed chaotic map. From the Table 7, we can infer that the proposed chaotic map based classification gives highest performance results compared to that of other standard random matrices in terms of specificity and precision for all the compression ratios being considered. For instance, considering the highest compression of 1:32, we observe that the proposed chaotic map based compression achieves specificity of 97.32, which is 1.4%, 1.06 and 0.87% greater than that of Sparse binary, Gaussian random and Bernoulli random matrix based compressive classification respectively. Similarly, in terms of precision our method achieves 81.84% which is 9.34%, 7.53 and 6.10% greater than that of Sparse binary, Gaussian random and Bernoulli random matrix based compressive classification respectively.

Table 7 Comparison of specificity and precision for various compression ratios using different random matrices

The F-score values (in %) obtained for each activity for a compression ratio of 1:32 is depicted in Fig. 7. From the bar graph, it is inferred that the performance of the proposed technique outperforms others in seven out of eight activities.

Fig. 7
figure 7

Relative F-scores using Sparse binary, Gaussian random, Bernoulli and proposed chaotic map based compression for compression ratio 1:32

Figure 8 shows the F-score values averaged over all activities for various compression ratios. From the graph it can clearly observed that the proposed classification method achieves higher values of F-score for all the compression ratios. In particular, for the highest compression ratio of 1:32, we find that the proposed method produces F-score of 81.04%, which is 9.74%, 7.41 and 5.82% greater than that of Sparse binary, Gaussian random and Bernoulli random matrix based compressive classification respectively.

Fig. 8
figure 8

Relative F-scores using Sparse binary, Gaussian random, Bernoulli and proposed chaotic map based compression for different compression ratios

5 Conclusions

The aim of this paper is to exploit the effectiveness of compressive classifiers in action recognition. The proposed framework explored both compression and classification simultaneously. A compressive classification approach based on a novel chaotic map for compression and sparse based classification for human activity recognition was presented. This approach has two main advantages. The first one being the increased accuracy produced by chaotic map based compression compared to compression using other standard random matrices. The second is the easier hardware implementation capability of the chaotic map based compression due to the deterministic nature of chaotic maps. Recognition performance was validated for 8 daily human activities recorded from 15 subjects. The recognition accuracy of our method for various values of compression factors were compared to that obtained using standard random matrices. It was demonstrated that proposed chaotic map based compression produces higher values of accuracy even for very high values of compression ratio. The proposed compressive classifier framework can be implemented in real time to maximize the battery life time of wearable body sensor networks for continuous monitoring of human activities, while maintaining sufficient classification accuracy.