Joseph Azar

Rapha Ël Couturier

Abdallah Makhoul

Nancy Awad

Anthony Nassar

Gaby Boutayeh

Lama Sleem

Charbel Alam

Christian Saleem

Carole Habib

N • X X X

Keywords: Consommation d' énergie, Compression de donn ées, Traitement num érique du signal, Internet des objets, Applications WBSN . . . . . Wireless Body Sensor Network WSN . . . . . . Wireless Sensor Network

In recent years, Internet of Things (IoT) technology has gained tremendous attention for its ability to relieve the burden on healthcare caused by an aging population and the increase in chronic disease. IoT technology facilitates the tracking of patients with different conditions and the processing of vast volumes of data, of which a substantial part of this data are physiological signals. Physiological signals are an invaluable source of data which helps to diagnose, rehabilitate, and treat diseases. The signals come from a Wireless Body Sensor Network or wearable devices placed on a patient's body. There are many difficulties in IoT-healthcare systems, such as data collection and processing especially that (1) wireless sensor nodes have limited energy, processing and memory resources, (2) the quantity of data collected periodically is enormous, (3) the quality of the data collected is not always satisfactory, and that such data are highly likely to include noisy or unreliable areas, and (4) the manual feature extraction process from the physiological signals requires significant human intervention and medical expertise.

Firstly, an energy-efficient data compression technique is being proposed in this dissertation. The proposed scheme is based on an error-bound lossy compressor originally designed for high-performance computing applications and has been adapted for IoT devices that are resource constrained. The proposed solution is an easy-to-implement algorithm, which could reduce energy consumption by as much as 2.5 times. It also reduces the processing/transmission time by compressing large batches of data before their transfer from the IoT to the edge. Moreover, an empirical analysis was carried out to study the effect of lossy time series compression on the classification task. In addition to different variations of compression methods, various deep neural networks for time series clasiii R ÉSUM É Compression de donn ées et apprentissage en profondeur pour les applications de sant é IoT bas ées sur des signaux physiologiques

sification were considered to identify the appropriate trade-off between the compression ratio and classification performance.

Second, the problem of data distortion due to lossy compression was addressed. The reconstructed data may not always be satisfactory, given that the physiological signals collected are multivariate time series that are highly compressed with a lossy compressor prior to transmission. To solve this limitation, a convolutional autoencoder-based deep learning model was introduced. The proposed model was able to enhance the compressed data after reconstruction, thus fixing the shape of the physiological signal and allowing more accurate feature extraction.

Then, the photoplethysmogram signals were given particular attention. Photoplethysmography (PPG) is used to measure the skin blood flow using infrared light. Photoplethysmography is a promising technique because of the capability of the new wrist-worn devices to provide the signal. The existence of motion artifacts and meaningless areas in the signal is a major challenge faced when working with this signal. A deep learning model for automatic motion artifacts detection based on a CNN-LSTM autoencoder architecture has been proposed to detect and discard irrelevant zones in photoplethysmogram signals to avoid analyzing and processing meaningless data.

Finally, a deep learning model has been proposed for time series classification. Given that hand-designing features from physiological signals is a challenging task, the representation learning approach is a potential solution for automatically learning features from raw physiological data. A classification model based on the DenseNet architecture was proposed for the classification of multivariate time series. The results show that the proposed approach is capable of achieving and in several cases bypassing the performance of the state-of-the-art models on a benchmark dataset. Throughout the remainder of this thesis, the writer will be referred to as "we", rather than "I". This is because this thesis presents research performed in a collaborative setting in Belfort, France, as part of the AND research team.

KEYWORDS:

This chapter provides an introduction to the work done in this thesis. It addresses the general context and the considered use case, then presents briefly the contributions of this thesis.

1.1/ INTRODUCTION TO IOT-HEALTHCARE

An Internet of Things (IoT) is a self-configuring, complex, and adaptive network connecting recognizable "things" to the internet. The "things" have capabilities for sensing and potential programmability. They are defined by information such as the identity, status, or location and offer services, with or without human intervention, through data collection, communication, and ability to take actions [1]. IoT applications are boundless, and the emergence of edge computing has enabled more optimized data processing, real-time analytics, and the use of artificial intelligence in many applications such as the energy and smart grid industries, connected vehicles and transportation, manufacturing, wearables, implantations, and medical devices [START_REF] Satyanarayanan | The emergence of edge computing[END_REF].

A great deal of work has been done recently with IoT in the healthcare sector, and the benefits of IoT for healthcare are significant. One evolving role of IoT is to be able to remotely track patient health [START_REF] Malasinghe | Remote patient monitoring: a comprehensive study[END_REF]. IoT-based services like telecare and mobile health, which allow medical well-being, prevention, tracking, diagnosis, and early symptom detection to be provided effectively through digital media, are expected to generate about $1.1-$2.5

CHAPTER 1. INTRODUCTION trillion in annual growth for the global economy by 2025 [START_REF] Manyika | Disruptive technologies: Advances that will transform life[END_REF]. Various IoT devices such as sensors and wearables may be used to capture physiological and behavioral data such as ElectroCardioGram (ECG), heart rate, blood pressure, weight, motion, etc. The measurements obtained can be transmitted over Bluetooth to the patient's phone. The phone then sends this data to a cloud storage database, along with patient information about the incident and symptoms. The data can then be analyzed and interpreted in order to extract the relevant information and notify a doctor in case the patient is at risk.

In view of the exponential increase in the number of internet connected devices and the immense amount of data generated by them, the use of artificial intelligence (AI) analytical and predictive techniques and especially deep learning techniques has become indispensable, particularly in healthcare analytics. The use of deep learning methods has produced unprecedented results in the fields of speech and face recognition, language processing, and object detection recently [START_REF] Goodfellow | Deep Learning[END_REF]. While the IoT-Healthcare-AI partnership has potential promise, major obstacles and challenges include reliable inter-device communication, efficient data collection, patient privacy and security, data cleaning, data classification, and user friendliness [START_REF] Dimitrov | Medical internet of things and big data in healthcare[END_REF].

The work done in this thesis addresses numerous issues in an IoT healthcare framework, starting with data collection using sensors and wearables that involve data acquisition, processing, and transmission to data analytics.The data studied in this work correspond to physiological signals, i.e. time series.

The purpose of this thesis is therefore to suggest solutions to numerous problems and challenges that exist in IoT healthcare applications. The contributions concentrate specifically on the data collection process, in which efficient data transmission and energyconservation are tackled, and the data analytics task, in which various deep learning approaches are presented to solve different challenges. Given the broad range of healthcare applications, the use case of human stress detection has been considered in this work.

1.2/ USE CASE: PHYSIOLOGICAL STRESS DETECTION

Latest technological advancements in the Wireless Body Sensor Network (WBSN), ubiquitous computing, and artificial intelligence provide new approaches and tools for affective computing.

Affective computing is an active research field attributed to Dr. Rosalind Picard of the Massachusetts Institute of Technology (MIT) that enables machines to identify and replicate human affect. To do this, different types of sensors or devices are required to collect data on the state of mind of the user, and then machines could use different machine

MAIN CONTRIBUTIONS OF THIS DISSERTATION

learning classification techniques to process and extract relevant patterns and then analyze these data.

The first basic affective states to be deduced are anger, disgust, fear, happiness, sadness, and surprise. In addition to these simple emotions, other complicated affects, such as human stress, can be deduced.

Stress is one of the major factors that negatively affect the performance of employees in the workplace or in complex activities requiring multiple cognitive abilities, such as driving.

A recent study in Nigeria [START_REF] Ekienabor | Impact of job stress on employees' productivity and commitment[END_REF] has shown that factors such as poor control over the working environment and the management structure can contribute to job stress, resulting in lower performance and productivity of employees, a decrease in organizational reputation and a loss of skilled workers. According to the opinion survey "The Workforce View in Europe 2018" conducted by the private human resources company Automatic Data Processing [START_REF] Processing | The workforce view in europe[END_REF], 18% of European employees say they are under stress every day at work.

According to a recent study by Korn Ferry, "Workplace Stress Continues to Mount" [225],

workplace stress has had a negative effect on workers' personal relationships and the quality of their sleep. In addition, the study found that stress can be transmitted, which suggests that supervisors who experience stress appear to transmit it to their employees through their own behaviour. The detrimental effect of stress does not only affect firms employees, but also people involved in different activities, such as driving. According to Vincente et al. [START_REF] Vicente | Detection of driver's drowsiness by means of hrv analysis[END_REF], the driver's drowsiness, exhaustion, or stress induced by cognitive overload, tension, and prolonged driving hours can significantly disrupt the driver's ability to respond appropriately to relevant events.

For the reasons listed above, the study of stress has attracted a large number of researchers over the last few years. The demand for an automated stress detection system, which helps detect stress in its early stages and avoids burn-out in the case of office workers or accidents in the case of drivers, has increased. This dissertation considers the stress recognition use case where physiological signals are collected from IoT devices/sensors and sent to the edge/cloud for processing.

1.3/ MAIN CONTRIBUTIONS OF THIS DISSERTATION

The main contributions in this dissertation fall within the aforementioned phases of an IoT-healthcare application, namely data collection and data analysis and processing. The main contributions can be summarized as follows:

1. First, we propose an energy efficient data reduction scheme for IoT-Edge applications. The proposed method is based on an error-bounded lossy compressor designed for high performance computing applications that produce large amounts of data during the execution, namely S queeze (SZ). The compression algorithm was adapted to fit on a Polar M600 wearable and resource-constrained devices such as ESP Wroom 32 microcontrollers. The performance of the proposed compressor was tested on medical multivariate time series. Furthermore, we considered the use case of drivers stress recognition and studied the impact of lossy data compression on the analysis, exploit, and classification of medical data. The results showed that the information extracted from compressed data was valid, and the classification accuracy obtained from training the model on features extracted from compressed data did not decrease.

2. Second, we investigate the effect of lossy compression techniques on the time series classification task using deep neural networks. The second contribution is a continuation of the first one, in which the proposed lossy SZ technique is combined with the lifting implementation of the discrete wavelet transform and compared with other compression techniques such as the Compressed Sensing. In order to study the impact of time series compression on the classification task, four newly proposed deep neural networks for time series classification were implemented. The impact of the various compression techniques on the task of time series classification with deep neural networks was studied, and the result showed that the proposed approach achieves an optimal trade-off between data compression and data quality.

3.

The first two studies on the impact of lossy data compression on the classification task show that the quality of the data is highly degraded after a certain compression ratio and thus affects the output of the classifiers and data analysis, which is important in healthcare applications where the quality of medical data is of great importance. This issue is addressed by the third contribution of this thesis, in which a deep Autoencoder model is proposed to enhance the quality of the time series received at the edge/cloud before processing. The relevance of this contribution is that it allows the use of high compression ratio compressors at the sensor level to further minimize the amount of data transmitted, even if at the expense of further data distortion, since a sufficiently trained deep learning model can repair the received distorted data from the IoT devices.

4.

In the fourth contribution, we tackle the issue of medical signals filtering. In this study, we consider the case of PhotoPlethysmoGram (PPG) signal that have potential use the in IoT-healthcare applications and specifically in stress recognition.

Most wearable devices on the market today, are capable of collecting PPG data and enabling the measurement of important features such as heart rate, respiration rate, and blood pressure in addition to detecting irregular pulses and cardiovascular diseases. One major drawback of PPG data is its high sensitivity to motion, resulting in 1. 4. DISSERTATION OUTLINE distorted signal and meaningless data zones. We propose a neural network-based filtering method to remove corrupted zones from the collected PPG data in an unsupervised manner. We also propose a PPG data summarization and augmentation strategy which optimizes the network performance. Then we present the two tasks which are addressed in this thesis: data collection and data processing. The first chapter of this section deals with the healthcare applications and their requirements. The second chapter discusses Wireless Body Sensor Networks (WBSNs), wearables, physiological data, and energy-efficient data collection. The third chapter discusses the principles of IoT and artificial intelligence (AI).

IOT-HEALTHCARE: APPLICATIONS AND CHALLENGES

The continued development of IoT and the public adoption of wearable devices and biosensors has provided new possibilities for personalized eHealth and services and expanded the interaction between technology and healthcare. This chapter presents some of the applications of IoT in healthcare, and then discusses the challenges and requirements that need to be addressed in these applications.

2.1/ APPLICATIONS OF IOT IN HEALTHCARE

The applications of IoT in healthcare are diverse and their purpose can vary from continuous monitoring of physiological parameters and event detection to providing medical assistance and diagnosis. This section presents various forms of IoT applications in healthcare.

2.1.1/ MOBILE HEALTH

Mobile Health (mHealth) consists of the use of mobile telecommunications technology for health care delivery and for wellness assistance. mHealth may help patients in two ways:

(1) allow them to self-diagnose their physical symptoms more effectively and accurately, and (2) improve monitoring, tracking, and communication of various information such as blood pressure, glucose levels, oxygen saturation, etc. Additionaly, it allows people with chronic medical conditions to better participate in their treatment [START_REF] Steinhubl | Can Mobile Health Technologies Transform Health Care?[END_REF].

Widespread adoption of mHealth technology will enhance user experience by potentially enabling better monitoring of chronic diseases and enabling caregivers to exploit the mHealth mobile/web applications with P2P video/audio features to assist and direct patients at any time and anywhere [START_REF] Nilsen | Advancing the science of mhealth[END_REF].

CHAPTER 2. IOT-HEALTHCARE: APPLICATIONS AND CHALLENGES

2.1.2/ AMBIENT ASSISTED LIVING AND ELDERLY MONITORING

Ambient Assisted Living (AAL) is a term that incorporates emerging technology with the social environment to improve quality of living. This is achieved by using various types of sensors, mobile devices, software applications, computers, and wireless networks for the tracking of personal healthcare.

The aging population is a global problem, full of complex challenges. IoT technology may be used to unobtrusively assess the physical activity of the elderly, thus helping to prevent moderate cognitive dysfunction, hypertension, atrial fibrillation, depressive symptoms and control the posture and body motility of the elderly and to detect the occurrence of stroke [START_REF] Mighali | A smart remote elderly monitoring system based on iot technologies[END_REF][START_REF] Park | Development of the elderly healthcare monitoring system with iot[END_REF].

IoT technology solves this issues by allowing for indoor positioning as well as real-time location-aware tracking of vital signs (e.g., heart rate, blood pressure) and environmental conditions (ambient temperature), behavioral analysis and risk identification [START_REF] Azimi | Internet of things for remote elderly monitoring: a study from user-centered perspective[END_REF][START_REF] Mainetti | An iot-aware system for elderly monitoring[END_REF].

Another essential use of IoT in AAL is the control of medication. Prototype systems have been developed for medication control using RFID (Radio Frequency IDentification) technology and tested in a simulated full cycle: from medical prescription to pharmaceutical drug management [START_REF] Laranjo | Internet of things for medication control: Service implementation and testing[END_REF]. Self-alarm system is yet another example of IoT use for medication. It is common for many clients to forget to take their medication, which is an essential component of treatment. IoT may be used as a solution by monitoring changes in the condition of medicinal bottles with weight sensors, or by introducing real time continuous activity recognition with motion sensors [START_REF] Serdaroglu | Medication intake adherence with real time activity recognition on iot[END_REF][START_REF] Sohn | Alarm system for elder patients medication with iot-enabled pill bottle[END_REF].

2.1.3/ INDIVIDUALS WITH SPECIAL NEEDS

Whether cognitive, psychological, sensory, mental or motor, disability comes in several ways. Nevertheless, in addition to this complexity, the difficulty of performing such basic acts in daily life is a matter of significant concern for all disabled persons. To counter the effects of one or more shortcomings, new technologies have been developed and reinforced over time to make remarkable progress today. IoT technology has opened up many opportunities for change in the field of disability treatment. So it is clear that these health-connected objects are part of an ongoing process of increasing the comfort and autonomy of disabled people. Far from replacing any human assistance, however, these internet-connected devices allow the interaction to be effectively sustained with family and skilled carers.

IoT devices can offer this disadvantaged population a good deal of support and dramatically enhance their lives through automated, timely, and reliable technologies. Smartwatches, for example, are used for patients with speech disabilities to improve their speech functions in remote environments [START_REF] Dubey | A multismartwatch system for assessing speech characteristics of people with dysarthria in group settings[END_REF][START_REF] Dubey | Smartwatch technology for voice and speech treatments of patients with parkinson's disease[END_REF]. In smart cities, IoT systems are designed to increase connectivity for wheelchair users who encounter mobility based daily challenges [START_REF] Yang | People-Centric Service for mHealth of Wheelchair Users in Smart Cities[END_REF]. IoT may also help people collect information remotely about their special needs in their secure settings [START_REF] Ferati | Augmenting requirements gathering for people with special needs using iot: A position paper[END_REF].

2.1.4/ SMART MEDICAL IMPLANTS

IoT-healthcare also introduces very advanced, robust implantable medical devices intended to enhance or restore human body functions. Examples of some of these electronic devices include Deep Brain Stimulation (DBS) systems that use guided electrical pulses to activate brain areas in order to alleviate the involuntary movements triggered by neurological conditions such as Parkinson's disease [START_REF] Coley | The incidence of seizures following deep brain stimulating electrode implantation for movement disorders, pain and psychiatric conditions[END_REF][START_REF] Poon | Anaesthesia for deep brain stimulation and in patients with implanted neurostimulator devices[END_REF].

The cardiac pacemaker and the Implantable Cardioverter Defibrillator (ICD) are other examples [START_REF] Trohman | Cardiac pacing: the state of the art[END_REF]. One of the key signs for an ICD is sudden cardiac death, which affects about 100,000 people annually in the UK, showing the number of patients that may profit from this device [START_REF] Parkes | Implantable cardioverter defibrillators: arrhythmias. a rapid and systematic review[END_REF]. Many implantable devices commonly used in medical practice include chronic pain implantable drug delivery systems [START_REF] Turk | Clinical effectiveness and cost-effectiveness of treatments for patients with chronic pain[END_REF], and high frequency brain (thalamic) stimulation for neurological disorders such as Parkinson's disease [8] and refractory epilepsy [START_REF] Charbades | Deep brain stimulation in epilepsy with particular reference to the subthalamic nucleus[END_REF].

2.1.5/ EARLY WARNING SCORE (EWS) AND ANOMALY DETECTION

The use of an Early Warning Score (EWS) system has long been encouraged by acute care teams to allow for a more auspicious response and assessment of critically ill patients [166]. An EWS system is based on a straightforward scoring system that assigns a score to each physiological measurement monitored from acute patients. The measures tracked are composed of six cardinal vital signs including temperature, respiratory rate, systolic blood pressure, pulse rate, oxygen saturation, and consciousness level. A typical healthy range is specified for each vital sign, and the assigned score indicates how significantly the calculated value differs from the norm. The farther outside the usual healthy range a calculated value is, the greater is the value of the assigned score. Combining all of the scores results in a composite showing the patients' cumulative risk of deterioration [START_REF] Habib | Multisensor data fusion for patient risk level determination and decision-support in wireless body sensor networks[END_REF]. Note that EWS is an proven method commonly utilized by many hospitals worldwide. Several studies have shown that EWS can detect declining patients early in time, and thus can save lives and reduce patient mortality [START_REF] Anzanpour | Internet of things enabled in-home health monitoring system using early warning score[END_REF][START_REF] Habib | Real-time sampling rate adaptation based on continuous risk level evaluation in wireless body sensor networks[END_REF].

Among the limitations of EWS is that it does not understand the full range of bio-signals like Cutaneous water/sweat and it may not be able to effectively identify certain anomalies that are not within the supervisor's expertise. Indeed, a precise method for detecting anomalies involves continuous learning over time. The identification of anomalies is an significant aspect of health care analytics. In addition, anomalous zones are the segments of data in biomedical signals, or images that are of particular concern to medical staff. This field of study has gained tremendous interest and has a lot to bring to healthcare field. One of the primary goals will be to eliminate diagnostic error, increase early disease detection, and make healthcare accessible, and easy-to-use [START_REF] Ukil | Iot healthcare analytics: The importance of anomaly detection[END_REF][START_REF] Sehatbakhsh | Syndrome: Spectral analysis for anomaly detection on medical iot and embedded devices[END_REF]. Recently, numerous applications of anomaly detection in healthcare have been discussed, such as the detection of heart-related disorders using electrocardiogram signals [START_REF] Sharma | Accurate automated detection of congestive heart failure using eigenvalue decomposition based features extracted from hrv signals[END_REF],

the detection of brain-related diseases and disorders such as epilepsy, Alzheimer's, and Parkinson's using electroencephalogram (EEG) signals [START_REF] Bajaj | Classification of seizure and nonseizure eeg signals using empirical mode decomposition[END_REF][START_REF] Sharma | Classification of epileptic seizures in eeg signals based on phase space representation of intrinsic mode functions[END_REF], and the detection of neuromuscular diseases using electromyography (EMG) [START_REF] Subasi | Classification of emg signals using wavelet neural network[END_REF]. [START_REF] Koldijk | The swell knowledge work dataset for stress and user modeling research[END_REF][START_REF] Koldijk | Detecting work stress in offices by combining unobtrusive sensors[END_REF][START_REF] Koldijk | Context-aware support for stress self-management: from theory to practice[END_REF]. The authors used body sensors to measure the physiological stress response from electrocardiogram (ECG) and electrodermal activity (galvanic skin response). In addition, other devices such as the webcam and the Kinect 3D camera were used to collect behavioral data such as body postures and facial expressions. In addition to numerous works dealing with well-being at work, others focused on identifying physiological arousal in driving activities by gathering heart rate, electrodermal activity, skin temperature, respiration rate, and motion data from drivers utilizing wrist-worn devices and body sensors [START_REF] Saeed | Personalized driver stress detection with multi-task neural networks using physiological signals[END_REF][START_REF] Saeed | Deep physiological arousal detection in a driving simulator using wearable sensors[END_REF].

Wearables are actually most likely to be used by people who already have a balanced lifestyle and want to track their progress and enhance their physical fitness. The numerous research studies that examined stress-related mental states have shown that these wearables have immense potential to advance healthcare and affective computing applications by delivering accurate data that allows users to track physiological and behavioral improvement easily and unobtrusively. For example, the stress-related symptoms may be detected by using a commercial wearable wristband or smartwatch and a smartphone, based on the amount of physical activity, sleep duration, heart rate, and number of conversations [START_REF] Chen | Contextsense: unobtrusive discovery of incremental social context using dynamic bluetooth data[END_REF][START_REF] Mccall | A rest-activity biomarker to predict response to ssris in major depressive disorder[END_REF].

2.2/ REQUIREMENTS AND CHALLENGES OF IOT IN HEALTHCARE

Developing robust IoT-healthcare applications involves difficulties other than choosing the right and appropriate sensors and IoT devices. This section outlines some of the IoThealthcare requirements and challenges to address before it could become a standard platform.

2.2.1/ DATA COLLECTION

Data collection is the first step in an IoT-healthcare application which needs to be carried out carefully to ensure its quality. The data collected must be reliable, valid, complete and comprehensive enough to help decision taking. Different physiological monitoring devices are now available and allow data collection to be of high quality [236,237]. One difficulty, however, is the incorrect positioning of electrodes which would lead to meaningless measurements. Some sensors have established standards for electrode placement, such as ECG, and for other sensors, the correct placement is verified based on trials.

A further difficulty is finding a balance between the amount of data collected and the quality of the data. An example is the selection of the correct sampling frequency, given that a sampling frequency may be adequate for one type of signal and not adequate for others. The noise and artefacts present in the collected data are an important problem that is examined in this thesis using deep learning. This issue is generally solved by applying signal processing techniques to filter the noise using multiple filters such as Kalman filters, Median filters, and Wavelet decompositions. Due to the critical importance of the collected data for the decision taking and analysis process, significant attention is given to the data collection task in the following of this dissertation.

2.2.2/ BIG DATA

One of the greatest obstacles for IoT-healthcare applications is the large volume of data that is constantly collected. One way to prevent such a problem is to introduce data reduction techniques on sensor devices to prevent large volumes of data being transmitted and processed. Nonetheless, the energy consumption, battery life constraint, storage requirements and algorithm complexity are specific concerns that need to be addressed. In the state of the art, different methods were used to minimize the amount of data transmitted, such as adaptive sampling [START_REF] Azar | Using adaptive sampling and dwt lifting scheme for efficient data reduction in wireless body sensor networks[END_REF], data compression [START_REF] Azar | Using dwt lifting scheme for lossless data compression in wireless body sensor networks[END_REF][START_REF] Azar | On the performance of resource-aware compression techniques for vital signs data in wireless body sensor networks[END_REF], data prediction [START_REF] Tayeh | A new autonomous data transmission reduction method for wireless sensors networks[END_REF][START_REF] Tayeh | A distributed real-time data prediction and adaptive sensing approach for wireless sensor networks[END_REF],

and dimensionality reduction [START_REF] Haber | Unsupervised time series segmentation for high-dimensional body sensor network data streams[END_REF].

Data segmentation is another problem when it comes to physiological and behavioral time series data. The use of sliding window strategies has been advised to prevent incorrect selection of the segmentation windows which can lead to wrong decision taking [START_REF] Banos | Window size impact in human activity recognition[END_REF].

Feature selection is another important problem when it comes to datasets with a high number of redundant information, which can make processing computationally expensive and decrease the classification accuracy. Various methods, such as the use of variance, correlation, forward selection, backward selection, and tree models, were tested [START_REF] Ghasemzadeh | Power-aware computing in wearable sensor networks: An optimal feature selection[END_REF].

Many data collection strategies may also be regarded and tested for different types of applications in healthcare. For example, it could be more effective to track only part of the data on an ongoing basis and activate the rest of the data monitoring when unusual events are observed, which may result in far less data collection without missing the important events.

2.2.3/ UNOBTRUSIVENESS AND UBIQUITY

A key element in an IoT-Healthcare application is acceptance from the subjects. For example, relying on sophisticated sensors such as eye tracker to detect office workers stress lower the likelihood of such application being effective in a real setting. Minimal sensor configuration and unobtrusiveness are important criteria for the success of certain healthcare applications [START_REF] Maciel | A multi-agent architecture to support ubiquitous applications in smart environments[END_REF][START_REF] Koldijk | Detecting work stress in offices by combining unobtrusive sensors[END_REF].

With the developments in smart offices, behavioral data can now be obtained without distracting the user by incorporating sensors into seats, doors or simply by using computerinstalled monitoring software (i.e. mouse and keyboard dynamics). Wearable technology and ubiquitous computing represent a new healthcare frontier by allowing for passive tracking of vital signs and the evolution of diseases such as cardiovascular, renal, or respiratory diseases, diabetes, and even cancer. Integrating sensors into consumer smart watches, bracelets, and other unobtrusive devices allows for the continuous and remote collection of vital data [START_REF] Piwek | The rise of consumer health wearables: promises and barriers[END_REF].

Another significant challenge is to provide the front-end devices (i.e. sensors, smartphones, tablets) with an easy-to-use interface. When designing and distributing IoT medical devices to patients who have little expertise in using high-tech technologies such as the elderly population, the user-friendliness and limited professional intervention are essential to the success of the healthcare application.

2.2.4/ DATA INTEGRATION

In many healthcare applications, the data collected typically comes from various sensors and devices, with various sampling frequencies. The integration of all such data constitutes a major challenge for these applications. Besides, the datasets do not have the same dimensions. For example, physiological univariate time series can be represented with arrays, while multivariate time series and images can be represented with a matrix or tensors. One approach to solve these difficulties is to apply features extraction techniques and to work on the extracted features rather than on the raw data.

Missing measurements when dealing with data from many sources is another problem to be addressed. This prevents multimodal data from being compared at the same time. However, potential frameworks for data fusion may allow this problem to be resolved [7,[START_REF] Florea | Fusion of imperfect information in the unified framework of random sets theory: application to target identification[END_REF]. Another challenge is that data from various sources may be inconsistent.

A voting system could be used to solve this issue [START_REF] Van Mechelen | A generic linked-mode decomposition model for data fusion[END_REF]. Another problem in data fusion is at what point to integrate the data into the recognition system. The data can be analyzed separately and fused into a final decision step or processed and merged sequentially.

The reader is directed to [START_REF] Khaleghi | Multisensor data fusion: A review of the state-of-the-art[END_REF][START_REF] Lahat | Multimodal data fusion: an overview of methods, challenges, and prospects[END_REF] for more information about the existing problems in data fusion.

2.2.5/ INTEROPERABILITY AND EFFICIENCY

Interoperability can be seen as a use of a system for another purpose. An example is the use of a proposed system for stress detection for continuous monitoring of the wellbeing.

This can be accomplished by gathering data that can be feasible for different purposes and adopting existing physiological data coding and storage requirements that allow data to be shared between various medical devices and applications [START_REF] Schl Ögl | Gdf-a general dataformat for biosignals[END_REF].

Efficiency is a key aspect of the wide use of the existing technology. It has been affirmed

that several algorithms built in smart and academic environments to accomplish certain tasks, such as activity recognition, need improvement in order to become more reliable and effective in real life. When it comes to posing a danger to the safety of people and maintaining the credibility of a medical solution, the value of proper monitoring and meeting safety guidelines and certifications becomes increasingly important. For more details about government regulation of wireless medical devices the reader is referred to [START_REF] Mahn | Wireless medical technologies: Navigating government regulation in the new medical age[END_REF].

2.2.6/ PRIVACY AND SECURITY

IoT devices deployed in a healthcare system could pose a serious risk that might be exploited either to hurt end-users or to threaten their privacy. If IoT security is breached, information about end users can be reached through unauthorized authentications. In addition, this can pose risks for personal health. The Financial Times investigation found that 9 of the top 20 mobile healthcare applications were used to send data to parties interested in individuals mobile phone usage [START_REF] Steel | Health apps run into privacy snags[END_REF].

Different solutions are currently being tested to prevent the use of this knowledge for bad or non-ethical purposes. Data encryption [START_REF] Noura | Lightweight stream cipher scheme for resource-constrained iot devices[END_REF][START_REF] Yaacoub | Securing internet of medical things systems: Limitations, issues and recommendations[END_REF], patient authentication mecha-nisms [START_REF] Melki | Lightweight and secure d2d authentication & key management based on pls[END_REF], and data anonymization [START_REF] Awad | Publishing anonymized set-valued data via disassociation towards analysis[END_REF] are among the safety precautions that could be used. The awareness and autonomy of the patients being monitored must also be ensured.

2.3/ CONCLUSION

Although the demand for medical care has soared in recent years, the conventional cliniccentered model of treatment requiring patients to see a specialist when sick is still the standard. This chapter presented an overview of how the progress in IoT help create significant developments in healthcare, by addressing various potential healthcare IoT applications. Additionally, there are many research issues that need to be solved carefully before it can become feasible for mainstream deployment. These issues were examined in the second part of this chapter and different solutions from the state of the art were presented.

ENERGY-EFFICIENT DATA COLLECTION

This chapter presents the wireless body sensor network and consumer health wearables technologies. Then discuss the key components of a biosensor node that consumes energy and introduces various energy-efficiency mechanisms used for energy conservation in the state-of-the-art. Finally, the data compression approach for data reduction is discussed and the main categories of data compression techniques are presented.

3.1/ WIRELESS BODY SENSOR NETWORK AND CONSUMER

WEARABLES

The two promising technologies, namely the Wireless Body Sensor Network (WBSN) and consumer health wearables were targeted toward universal healthcare delivery [START_REF] Cavallari | A survey on wireless body area networks: Technologies and design challenges[END_REF][START_REF] Metcalf | Wearables and the internet of things for health: Wearable, interconnected devices promise more efficient and comprehensive health care[END_REF].

Nevertheless, the increased access to mobile devices, sensors and wireless networking solutions encourages the design and creation of pervasive assistance solutions that incorporate wearable devices and smart ecosystems to support people with severe disabilities, encourage diabetes detection and recognise emergency situations that may occur.

A Wireless Body Sensor Network (WBSN) consists of sensor nodes connected to a patient's body, or wearable devices worn by the patient that allow measurement of physiological parameters such as heart rate, respiration rate, ElectroCardioGram (ECG), Photo-PlethysmoGram (PPG), blood pressure, body temperature, electroencephalogram (EEG), and many others. For example, heart rate can be measured with an oximeter inserted into a ring or a smartwatch with a PPG sensor, muscle activity with an electromyographic sensor placed in clothing, stress with an electrodermal sensor integrated into a bracelet, and physical activity or sleep quality with a watch's accelerometer. Furthermore, the most fertile phase of a female can be identified with precise body temperature monitoring [START_REF] Rollason | A pilot study comparing the duofertility® monitor with ultrasound in infertile women[END_REF],

whereas a limited number of non-gelled EEG electrodes may be used to measure mental concentration rates [START_REF] Poltavski | The use of single-electrode wireless eeg in biobehavioral investigations[END_REF]. Social contact rates (also considered to impact general wellbeing) can be tracked with Bluetooth or WiFi-enabled devices, using proximity detections to others [START_REF] Eagle | Inferring friendship network structure by using mobile phone data[END_REF].

These biosensors and consumer wearables send the collected measurements periodically to a coordinator, which is usually a portable device or smartphone, for fusion or aggregation. Meanwhile, for most consumer wearables and sensors, a coordinator is still necessary to process incoming data, but it is plausible that all processing capability would be self-contained in the coming years. After processing the data, the coordinator forwards them to the sink node or the base station [START_REF] Lai | A survey of body sensor networks[END_REF][START_REF] Boudargham | Exhaustive study on medical sensors[END_REF] as illustrated in Figure 3.1.

Although the WBSN platforms aim to provide and support a number of innovative and interesting applications [START_REF] Yilmaz | Detecting vital signs with wearable wireless sensors[END_REF][START_REF] Negra | Wireless body area networks: Applications and technologies[END_REF], there are many technical challenges that lie ahead such as the need for better sensor design, context-awareness, secure data transfer, and longer battery lifetime. Energy consumption is one of the key considerations for WBSNs since it not only determines the size of the battery required but also the duration that a biosensor can be left in situ [START_REF] Yang | Body Sensor Networks[END_REF]. The constrained sizes of biosensor nodes imply that they are designed with limited battery, storage, and processing. Therefore, there is a strong need for efficiency in data collection, analysis, storage, and communication.

3.2/ BIOSENSORS AND ENERGY CONSUMPTION AT NODE-LEVEL

Biosensors are small, lightweight, low-power, resource-limited and smart sensor nodes that sense, process and transmit physiological parameters. Table 3.1 summarizes the most used sensors in medical applications, along with a short description of their functions and placement [START_REF] Lai | A survey of body sensor networks[END_REF].

The four main constituents of a biosensor node that consume energy are the Microcontroller (MCU), Transceiver, Memory, and Sensor units. The MCU consumes energy for processing the data, executing code, and controlling tasks. The transceiver consumes Inexpensive optical measurement technique that measures changes in blood volume in the bed of tissue and is also used to track heart rate.

High

Wearable energy for transmitting and receiving data. The energy consumption of the memory depends on the number of memory read and write, the number of stored bits, and the duration of storage. The Energy consumption of a sensing unit in an active state depends on the sensor radius, the data generation rate, and the number of generated bits.

The batteries of energy-constrained wireless sensor nodes are quickly drained with the ongoing tasks of sensing, processing, and transmitting and their regular replacement is not preferred, particularly as we want to motivate people to embrace this technology.

Therefore, energy conservation is crucial in the data collection phase of IoT-healthcare applications.

CHAPTER 3. ENERGY-EFFICIENT DATA COLLECTION

Various energy-efficient mechanisms were discussed in the literature to address nodelevel energy-consumption challenges. These mechanisms can be divided into three categories representing the node's energy-consuming activities to provide continuous health monitoring, namely sensing, communication and processing.

3.2.1/ ENERGY-EFFICIENT SENSING

To maintain their energy level, energy-efficient sensing strategies focus on reducing sensing time or rate of sensor nodes. As a result, the unit(s) of the sensor nodes including radio, CPU and sensor(s) are disabled or the sampling frequency is changed to minimize the energy required to accomplish their tasks. Authors in [START_REF] Alippi | Energy management in wireless sensor networks with energy-hungry sensors[END_REF] found that the assumption that data acquisition and processing activities consume significantly less energy than communication does not hold in a number of practical situations where the power consumption of the sensing operation is similar or even higher than that of communication.

• Sensor set selection: In this category, the techniques concentrate on achieving good balance between the number of enabled sensors and classification accuracy.

Their ultimate goal is to optimize lifetime of a WBSN while maintaining good detection efficiency. The choice of the sensor set can take place before implementation or in real-time. Such an approach is used in applications for disease detection [START_REF] Wang | Information-based energy efficient sensor selection in wireless body area networks[END_REF] and activity recognition [START_REF] Zois | Energy-efficient, heterogeneous sensor selection for physical activity detection in wireless body area networks[END_REF].

• Context-based pull: Exploiting context correlation using approaches such as activity recognition is another approach to reducing energy consumption due to data collection [START_REF] Lim | Adaptive data acquisition strategies for energyefficient, smartphone-based, continuous processing of sensor streams[END_REF]. Instead of following the general model where data is continuously transmitted from sensor nodes to coordinator, an asynchronous pull-based model is used. Thus, based on the defined user context, the coordinator requests data from the relevant sensor nodes. This reduces the energy consumption of continuous data collection without sacrificing application requirements.

• Compressed sensing: This technique exploits information rate within a specific signal and eliminates redundancy during the sampling phase, resulting in lower sampling rate [START_REF] Razzaque | Energy-efficient sensing in wireless sensor networks using compressed sensing[END_REF]. When certain criteria are met, the signal can still be reliably retrieved, even when sampling at a sub-Nyquist rate. Compressed sensing and distributed compressed sensing can provide energy-efficient sensing in WBSNs.

3.2.2/ ENERGY-EFFICIENT COMMUNICATION

• Radio Optimization: The radio module is an important part which drains the battery from the sensor nodes. Researchers have optimized radio parameters such as power transmission, antenna direction, transmission distance, transmission data rate, modulation schemes and coding to decrease the wireless transmission energy consumption [START_REF] Yi | Energy efficient transmission approach for wban based on threshold distance[END_REF][START_REF] Movassaghi | Enabling interference-aware and energy-efficient coexistence of multiple wireless body area networks with unknown dynamics[END_REF][START_REF] Kwan | Radio frequency energy harvesting and data rate optimization in wireless information and power transfer sensor networks[END_REF].

• Energy-efficient routing protocols: Since the implementation of a WBSN affects the lifespan of the network, other researchers have provided energy-efficient routing protocols [START_REF] Bangash | A survey of routing protocols in wireless body sensor networks[END_REF]. WBSNs encounter some of the same routing problems as general

3.3/ PRACTICAL DATA COMPRESSION IN IOT APPLICATIONS

One of the issues that this thesis addresses is the energy efficiency in IoT-healthcare applications. As seen in the previous section, different approaches to energy conservation could be adopted. The work in this thesis focuses on the data reduction approach, and particularly on data compression. Data compression can be considered as one of the direct methods that improves the energy efficiency, especially the energy related to the wireless transmission. The energy consumption of radio communication is directly proportional to the number of bits of data, that is, data traffic, transmitted within the network.

Therefore, reducing the number of bits to be transmitted by compressing the data can increase the network lifetime.

Several compression techniques have been proposed in the literature to tackle the energy consumption problem. These techniques can be classified into three categories:

sampling compression, data compression, and communication compression [START_REF] Razzaque | Compression in wireless sensor networks: A survey and comparative evaluation[END_REF]. Sampling compression focuses on reducing the number of sensing operations while keeping the loss of information within an acceptable margin. Data compression, where the work of this thesis belongs, converts an input data stream into another data stream that can be represented with less number of bits. Communication compression focuses on reducing the number of packet transmissions and receptions. Typically, these three compression methods have a relationship. For example, a reduced number of samples helps minimize data length (data compression), which in effect decreases the number of transmissions.

A data compression technique may be lossless or lossy. The lossy compression method does not return the data to its original form after decompression. On the other hand, lossless compression restores and reconstitutes the data in its original form after decompression. A large number of compression techniques have been proposed in the literature. The following sections summarize text-based compression, data aggregation, transform-based compression, digital compressed sensing, predictive coding, and adaptive modeling.

3.3.1/ TEXT-BASED COMPRESSION

The text-based compression techniques view the collected data as a sequence of characters. Research works, which address the use of dictionary/text-based compression in WSNs are few in number. One of the popular lossless compression scheme for text data is the dictionary-based Lempel-Ziv-Welch (LZW) algorithm. An adaptive version of LZW algorithm, called S-LZW, has been proposed in [START_REF] Sadler | Data compression algorithms for energyconstrained devices in delay tolerant networks[END_REF]. S-LZW treats the collected data as strings and divides the strings into fixed-size blocks, with each being compressed using the LZW algorithm. Moreover, Huffman encoding and delta encoding have been utilized

in the context of WBSN in [START_REF] Arrabi | Adaptive lossless compression in wireless body sensor networks[END_REF]. The results revealed the superiority of dynamic delta encoding for WBSNs.

3.3.4/ TRANSFORM-BASED COMPRESSION

The transform-based techniques decompose a source output based on transform theories into coefficients that are then coded according to the individual characteristics [START_REF] Srisooksai | Practical data compression in wireless sensor networks: A survey[END_REF].

These techniques are usually used for image and video signals.

Transformation techniques involve preprocessing the input signal by means of a linear orthogonal transformation and properly encoding the transformed output (coefficients)

and reducing the amount of data needed to adequately represent the original signal.

Upon signal reconstruction, an inverse transformation is performed and the original signal is recovered with a certain degree of error.

Several well-known approaches, such as Fourier transform, Karhunen-Loeve transform, cosine transform, and wavelets transform are adopted in certain types of WSN systems called wireless multimedia sensor networks [START_REF] Srisooksai | Practical data compression in wireless sensor networks: A survey[END_REF]. Furthermore, transform-based compression can also be applied to sensed environmental data, such as temperature, humidity, light or even to vital signs data such as heart rate and respiration rate by modeling these data as an image map, and applying standard image compression methods to the map [START_REF] Razzaque | Compression in wireless sensor networks: A survey and comparative evaluation[END_REF].

3.3.5/ DIGITAL COMPRESSED SENSING

The method has already been listed in the category of energy-efficient sensing. As this technique was proposed to handle the sensing task of the sensing unit by activating/deactivating the sensor, it was mostly used to contribute on the level of digital signal processing [START_REF] Faust | Compressed sampling for heart rate monitoring[END_REF][START_REF] Li | A continuous biomedical signal acquisition system based on compressed sensing in body sensor networks[END_REF]. This is partly due to the shortcomings of the hardware that hinder the actual implementation.

Most of the compressed sensing-based data reduction techniques aim to reduce the energy consumption due to communication by reducing the volume of wirelessly transmitted data. Such methods minimize the sampling rate that was used to sample the digital signal, thus decreasing the amount of measurements to be transmitted. In other words, the digital compressed sensing technique impacts the processing and communication units instead of the sensing unit. The compressed sensing technique is further discussed in the third part of this dissertation.

3.3.6/ ADAPTIVE MODELING

In adaptive modeling approaches, some signal structure is iteratively updated over time, using linear, polynomial, or autoregressive methods to exploit the signal's correlation structure. In particular, the time series of inputs are gathered and processed according to transmission windows of N measurements each. The specified compression method is applied at the end of each time window, obtaining a series of model parameters which are being transmitted instead of the original data.

The Piecewise Linear Approximations (PLA) [START_REF] Lin | Sensor data compression using bounded error piecewise linear approximation with resolution reduction[END_REF] and the Lightweight Temporal Compression (LTC) [START_REF] Sarbishei | Refined lightweight temporal compression for energy-efficient sensor data streaming[END_REF] are among the famous adaptive modelling techniques used in IoT applications. PLA's idea is to use a line segment sequence to represent an input time series with a bounded approximation error over specified time windows (of N samples).

LTC is a simple lossy algorithm, just like the Run Length Encoding (RLE) in the sense that it tries to represent a long sequence of similar data with a single symbol by searching for linear trends. IoT creates massive volumes of data. 90% of currently produced data are not even retrieved, and out of the 10% captured, the majority are time-dependent and lose their value within milliseconds. Continuous manual analysis of such data is both costly and inefficient. Artificial Intelligence (AI) tools provide a way to evaluate and gain insight from data smartly with minimal human interference.

3.4/ CONCLUSION

AI is the technology that can be implemented in machines and allow them to perform tasks that demand human intelligence. These tasks involve seeing and identifying things, identifying sounds, understanding and interpreting language, and other related tasks.

Machine learning (ML) is a subset of AI that comprises methods used to enable such human-like tasks [START_REF] Chen | Disease prediction by machine learning over big data from healthcare communities[END_REF]. ML encompasses methods that can be used to achieve AI and gives machines the opportunity to learn without being explicitly programmed. This is done by including examples of how a task is done and how it should not be done, instead of relying on hardcoding rules.

With the growing role of data analytics and ML in health informatics, deep learning has emerged as a powerful method for machine learning in recent years, promising to transform the future of the healthcare sector [START_REF] Wlodarczak | Deep learning in ehealth[END_REF]. Deep learning is a special tool in ML which simulates the biological structure of the human brain and works to execute human-like functions. This is achieved by constructing a network of neurons just as in the brain through the use of a computational approach such as artificial neural networks, which can solve problems at human-like performance or better.

4.2/ MACHINE LEARNING APPROACHES FOR IOT-HEALTHCARE

To teach machines how to solve a great number of problems on their own, various machine learning models need to be considered. The model needs to be fed with data;

that is why, based on the input datasets, machine learning models are divided into four main groups: supervised learning, semi-supervised learning, unsupervised learning and reinforcement learning.

Machine learning techniques are able to automatically analyze and derive information from the data being collected, thereby promoting rigorous and more informed decision making. This section discusses some of the common medical decision-making frameworks and compares them to machine learning methods.

4.2.1/ CATEGORICAL AND TREE-LIKE REASONING

Tree-like reasoning requires branching into different potential actions when specific decision requirements are fulfilled. A medical question may be viewed as a tree when the problem is perceived to be an organized, arranged set of rules for making a decision. The root of the tree in this sort of reasoning reflects the beginning of the interaction with the patient. As the doctor gathers more details, he comes to various decision points where he can continue in more than one path. These paths may represent various medical tests or additional lines of questioning. The doctor makes decisions continuously and select the next path until reaching a terminal node where there are no paths remaining. The terminal node denotes a treatment plan that is definite [START_REF] Schwartz Longacre | New horizons in cardioprotection: recommendations from the 2010 national heart, lung, and blood institute workshop[END_REF].

Decision tree and random forest can be considered as the corresponding algorithms for machine learning to such problems. Decision trees developed in the 1990s and used information theory concepts to optimize tree branching variables to improve classification precision. For decades, the standard decision tree algorithms have existed and modern variants such as random forests are among the most effective techniques available for supervised classification tasks. Such an approach has the advantage of being able to select the most important features and combine numerical and categorical data. However, when the problem size increases, the calculations exponentially grow.

4.2.2/ PROBABILISTIC REASONING

A second way to approach the patient encompasses initializing a patient's baseline probability of a disease and adjusting the likelihood of the disease with each new medical finding. One of the algorithms corresponding to probabilistic reasoning is the Naive Bayes classifier. Naive Bayes is a predictive modelling algorithm that is simple but remarkably powerful. Naive Bayes is a binary (two-class) and multiclass classification problem classification algorithm, which calculates the likelihood of each class being correct by applying Bayes' theorem. One of this approach's main drawbacks is that it does not tackle dependent variables. In the health informatics literature, probabilistic reasoning has been widely used to solve issues such as the identification of cardiovascular disease risk's level and the prediction of various dermatological conditions [START_REF] Manjusha | Prediction of different dermatological conditions using naive bayesian classification[END_REF][START_REF] Langarizadeh | Applying naive bayesian networks to disease prediction: a systematic review[END_REF]. Additionally, it has been used for public health applications such as air pollution prediction [START_REF] Orun | Use of bayesian inference method to model vehicular air pollution in local urban areas[END_REF].

4.2.3/ COMPLEX CLINICAL REASONING

Many research focused on more complex issues such as detecting "alarming events" (e.g., a fall) that are typically handled in a discriminative manner, i.e. learning to differentiate an alarming situation from non-harmful situations based solely on the data previously monitored and finding dependency of annotations (ground truth). Discriminative (often called conditional) models can solve these challenges.

• Logistic Regression: Logistic regression is named for the method's core function, logistic function or sigmoid function. The most common task this approach solves in practice is binary classification. It has been used to diagnose moderate cognitive disability [START_REF] Shankle | Methods to improve the detection of mild cognitive impairment[END_REF] and for tasks such as fall detection using cell phones [START_REF] Albert | Fall classification by machine learning using mobile phones[END_REF].

• Support Vector Machines (SVM): SVM is a supervised machine learning model that works by finding the optimum hyperplane capable of separating two classes This plane is identified as the one with the greatest margin towards the nearest data point of each class. A kernel transformation can be implemented to help define the correct hyperplane. The SVM has been used for fall detection tasks by wearable sensors [START_REF] Zhang | Fall detection by wearable sensor and one-class svm algorithm[END_REF] and for presence detection of visitors in a smart home environment [START_REF] Petersen | Svm to detect the presence of visitors in a smart home environment[END_REF].

• Conditional Random Fields: Conditional Random Field is a specific case of Markov Random field ideally suited for predicting tasks where contextual information or neighborhood condition influences the current prediction. It was used to track elderly activity and recognize accelerometer-based movement [START_REF] Lee | Semi-markov conditional random fields for accelerometer-based activity recognition[END_REF].

• Boosting: The idea of boosting came from the question of how to strengthen a slow learner. Gradient boosting is one of the most efficient predictive modeling techniques. XGBoost is a gradient-boosted decision trees developed for speed and performance, and used for various health-related tasks such as drowsiness detection and orthopedic auxiliary classification and prediction [START_REF] Choi | Xgboost-based instantaneous drowsiness detection framework using multitaper spectral information of electroencephalography[END_REF][START_REF] Li | Research on orthopedic auxiliary classification and prediction model based on xgboost algorithm[END_REF].

• Artificial Neural Networks (ANNs): A neural network is modeled after the mammalian nervous system, where independent variables are connected to sequential layers of artificial "neurons" that aggregate and sum weighted inputs before transmitting their nonlinearly transformed outputs to the next layer. In this way, data can move through multiple layers before eventually generating an output variable indicating the probability of an event. ANN has been widely used in health informatics for tasks such as detection of heart-related disorders, activity recognition, and diagnosis of diabetes [START_REF] Obayya | Data fusion for heart diseases classification using multi-layer feed forward neural network[END_REF][START_REF] Karan | Diagnosing diabetes using neural networks on small mobile devices[END_REF].

4.2.4/ REGRESSION PROBLEMS

Numerous works in the literature focused on solving regression problems where the objective is to estimate a continuous variable. Different techniques can be used for regression problems such as linear regression, support vector regression, decision tree regression, and random forest regression. Regression techniques have been used in health information technology to predict functional ability [START_REF] Hong | Prediction of functional status for the elderly based on a new ordinal regression model[END_REF], estimate mortality risk in elderly population, or continuously predict vital signs such as blood pressure based on certain factors that are noninvasively measurable [START_REF]Non-invasive estimate of blood glucose and blood pressure from a photoplethysmograph by means of machine learning techniques[END_REF]. output can be chosen. The PCA was used in [START_REF] Murugan | Automated ischemic beat classification using genetic algorithm based principal component analysis[END_REF] to extract relevant features from the ECG signal to detect ischemic beats.In [START_REF] Amor | Pca-based multivariate anomaly detection in mobile healthcare applications[END_REF], the authors applied PCA to analyze physiological readings obtained from sensors in order to detect the occurrence of multivariate anomalies.

• Canonical Correlation Analysis (CCA): CCA connects two sets of variables by identifying linear combinations of maximally correlated variables. Using a small number of linear combinations, it can be used for data reduction to describe covariation between two sets of variables. Additionally, it can be use for data interpretation by identifying features that are vital to explain covariation between sets of variables. CCA has been used for numerous tasks in health informatics, such as extracting motion artifacts from physiological signals by computing the correlation coefficients [START_REF] Roy | Gaussian eliminationbased novel canonical correlation analysis method for eeg motion artifact removal[END_REF].

4.3/ DEEP LEARNING APPROACHES FOR IOT-HEALTHCARE

Representation learning is a modern, rapidly evolving approach to machine learning in recent years that allows automatic features learning from raw data and to some extent solves the hand-designing features problem. Deep learning is a standard approach to representation learning. Unlike classic machine learning algorithms, in which features need to be given manually, deep learning techniques automatically extract important features after determining the features that are the most important for classification or clustering. Autoencoders [START_REF] Hinton | Reducing the dimensionality of data with neural networks[END_REF], deep belief networks [START_REF] Hinton | A fast learning algorithm for deep belief nets[END_REF], and deep Boltzmann machines [START_REF] Salakhutdinov | Deep boltzmann machines[END_REF].

Recently, many advances in healthcare analytics have been made using deep learning.

Deep learning methods have been applied to various areas and applications in health

informatics where the performance of the classical approaches to machine learning is limited, for example in medical imaging and bioinformatics. huge databases containing data on proteins, genes, and other genetic data [START_REF] Alansari | Evaluation of iot-based computational intelligence tools for dna sequence analysis in bioinformatics[END_REF]. In addition to big data-related technologies (e.g. cloud computing, IoT, Hadoop), deep learning's ability to abstract big, complex, and unstructured data provides an efficient way to analyze such heterogeneous data. The authors in [START_REF] Fakoor | Using deep learning to enhance cancer diagnosis and classification[END_REF] proposed a method for enhancing the diagnosis and classification of cancer from gene expression data using an using unsupervised deep leaning approach based on a deep Autoencoder. By collecting vast amounts of data from public sources, the authors in [START_REF] Ramsundar | Massively multitask networks for drug discovery[END_REF] investigated the use of massive multitask neural networks for drug discovery that synthesize information from several different biological sources. In [START_REF] Angermueller | Accurate prediction of single-cell dna methylation states using deep learning[END_REF], The authors proposed a computational method to predict DNA methylation states from the DNA sequence and incomplete methylation profiles in single cells based on deep neural networks.

4.3.4/ PUBLIC HEALTH

Public health aims at preventing illness, prolonging life, predicting demographic info, and improving wellness by examining disease transmission such as pandemics, and social activities in relation to environmental factors. The data used in this area of health informatics are social media data, mobile phone metadata, and text messages. A deep recurrent neural network enhanced with a pre-trained autoencoder has been proposed in [START_REF] Ong | Dynamically pre-trained deep recurrent neural networks using environmental monitoring data for predicting pm 2.5[END_REF] to predict air pollution. In [START_REF] Phan | Social restricted boltzmann machine: Human behavior prediction in health social networks[END_REF], the authors proposed a deep learning model based on

Restricted Boltzmann Machine to model and predict human traits, such as physical activity and intensity, and help spread well-being and healthy behavior in a social network. In addition, natural language processing and sentiment analysis can play a huge role in this area, such as relying on Twitter messages and Facebook posts to identify new mothers at postpartum depression risk.

4.3.5/ PERVASIVE SENSING

The research works done in this dissertation are mainly concerned with this section of health informatics. Pervasive sensors like wearable, implantable and ambient sensors enable continuous health and well-being monitoring. The data collected can consist of physiological time series obtained from wearable or implantable devices, images from sensor cameras, vital signs and food intake information. The applications of pervasive sensing are diverse, ranging from recognition of human activity [START_REF] Hardaker | State detection from electromyographic signals towards the control of prosthetic limbs[END_REF], generic object recognition, and gesture recognition using convolutional neural networks, to detection of anomalies in vital signs and vast quantities of time series using techniques such as autoencoders, deep-belief networks, and recurrent neural networks.

4.4/ CHALLENGES OF ARTIFICIAL INTELLIGENCE IN HEALTHCARE

There are several obstacles to the application of artificial intelligence techniques in healthcare. Also, ethical issues raised by this technology are highly discussed and must be addressed. Finally, while obstacles imply a possibility of being overcome, this technology also has limitations, or aspects that are unlikely to be resolved soon.

4.4.1/ OBSTACLES

Healthcare has typically been slow to adopt emerging technologies, a challenge that needs to be overcome. Healthcare was characterized as a conservative sector, slow to accept change. For instance, there was initial resistance to using electronic blood pressure cuffs in hospitals. Analytics and artificial intelligence are definitely no exception; it is just another modern, innovative technology, and while industries such as automotive and manufacturing adopted it with little concern, healthcare is likely to be another case. Perhaps an important fundamental reason why doctors resist analytics and machine learning is fear of computers trying to "take over" or "replace" doctors. The fear that doctors have about being replaced by machines is a real possibility, albeit distant, ways must be found for doctors and artificial intelligence to work together rather than against each other.

Another explanation for theoretical skepticism is "hope versus hype" argument [START_REF] Feldman | Big data in healthcare hype and hope[END_REF]. Buzz words like "big data" and "deep learning" often bear negative connotations due to their hype. Some people assume over-inflated confidence in these fields. Specifically, analytics and machine learning skeptics argue that most large-data applications, while "sounding cool", rarely save lives or money. Who determines the ratio to undertake these opposing goals? Another ethical issue concerns responsibility. If a machine learning model makes an incorrect judgment, who is responsible? Should it be the physician or the data science team that made the model?

A third problem lies in patient privacy. Is using patient data to train models appropriate?

Should this require consent or not? What data points should be used? Finally, there is also the bias problem. There is concern that estimating health outcomes may rely on things like race, gender, and age. This can result in patient discrimination.

4.4.3/ LIMITATIONS

Limitations are those aspects of healthcare analytics that a data scientist may face while designing applications for healthcare. An significant weakness of deep learning is the ability to clarify decisions. The decision-making method of a machine learning system should be transparent to the user. For example, when a certain health risk is automatically identified, an algorithm will provide a description of circumstances that prompted such a warning. For instance, graphic models and decision trees are more appropriate than black box neural networks algorithms, where mathematical reasoning is hard to explain.

Another big problem in healthcare analytics is the imbalanced classification issue. This This high level of abstraction allows an automated set of features, which would otherwise require human interaction for sophisticated feature extraction. Finally, the obstacles, ethical issues, and limitations facing the application of artificial intelligence technologies in healthcare are discussed. The emphasis of the following works presented in this dissertation is on applying deep learning to pervasive sensing, where physiological data is obtained from wearable or sensor devices and transmitted for analysis to the sink.

This part examines the main contributions in this thesis. As discussed in the previous chapters, the proposed approaches and methods are designed to solve different challenges in the data collection and data processing phases of an IoT-healthcare application.

IOT DATA COMPRESSION FOR EDGE MACHINE LEARNING

IoT-healthcare systems generate a huge and varied amount of data that need to be processed and responded to in a very short time. One of the major challenges is the high energy consumption due to the transmission of data to the cloud. Edge computing allows the workload to be offloaded from the cloud at a location closer to the source of data that need to be processed while saving time, improving privacy, and reducing network traffic.

In this chapter, we propose an energy efficient approach for IoT data collection and analysis. First of all, we apply a fast error-bounded lossy compressor, namely S queeze (SZ), on the collected data prior to transmission, that is considered to be the greatest consumer of energy in an IoT device. In a second phase, we rebuild the transmitted data on an edge node and process it using a supervised machine learning technique. To validate our approach, we consider the context of driving behavior monitoring in intelligent vehicle systems where vital signs data are collected from the driver using a Wireless Body Sensor Network (WBSN) and wearable devices and sent to an edge node for stress level detection. The proposed technique was implemented on a Polar M600 wearable, ESP Wroom 32, and WiFi LoRa 32 microcontrollers.

5.1/ INTRODUCTION

Wireless Sensor Networks (WSNs), Wireless Body Sensor Networks (WBSNs), and wearable devices make up the essential blocks of IoT architectures. Many of these smart objects, that are responsible for the collection, processing, and transmission of data, are still battery operated and resource constrained. The three major constituents of a smart object that consume energy are the microcontroller (MCU), transceiver, and sensor units.

Among all tasks, it is well known that data transmission is the highest energy-consuming task in IoT nodes [36] [83]. An important step towards energy efficiency in IoT applications is the transfer of computational tasks from the cloud to the edge. In general, the radio communication task between the IoT nodes and the edge consumes less energy than transmitting the data directly to the cloud over the cellular network [START_REF] Miettinen | Energy efficiency of mobile clients in cloud computing[END_REF][START_REF] Shi | Edge computing: Vision and challenges[END_REF]. Equally important, reducing the amount of data to be transmitted to the edge can further increase the lifetime of the IoT nodes and save storage at the edge.

5.2/ RELATED WORK

In this section, we first introduce the analysis of data in edge computing using machine and deep learning, and then we discuss data reduction in IoT applications.

5.2.1/ MACHINE AND DEEP LEARNING IN EDGE COMPUTING

The use of machine and deep learning techniques for data processing could help edge devices to be smarter, and improve privacy and bandwidth usage. In [START_REF] Li | Learning iot in edge: Deep learning for the internet of things with edge computing[END_REF], the authors introduced deep learning for IoT into the edge computing environment and proposed an approach that optimizes network performance and increase user privacy. Machine and deep learning in edge computing can bring multiple improvements to the traditional approaches that rely on cloud computing by:

• Processing data using conventional machine learning techniques and transferring the results or necessary features extracted from raw sensor data.

• Deploying part of deep learning networks layers on the edge and transferring the extracted features whose size is smaller than that of the input data.

• Deploying neural networks on the edge with minimized size that maintain accuracy.

• Training the networks on the cloud and shipping the trained models to the edge.

The aforementioned approaches reduce the pressure on the network by reducing the size of the data to be transferred to the cloud. For instance, each layer in a deep learning network processes and scales down the size of the generated features from the previous layer. The more layers are deployed on the edge, the smaller is the size of the features to be transferred to the cloud and the more they are incomprehensible, hence, increasing the privacy.

Edge nodes are devices such as mobile phones, IoT gateways, and local PCs that have a limited processing capability as compared to cloud servers. The size of neural networks deployed on these devices should be reasonable. In [START_REF] Varghese | Challenges and opportunities in edge computing[END_REF], the authors showed that different lightweight libraries and algorithms can be deployed on edge nodes such as smartphones and enable real-time data analytics.

5.2.2/ IOT DATA REDUCTION

Different data reduction schemes for energy saving in IoT applications have been proposed in the state of the art. In [START_REF] Laiymani | Adaptive data collection approach for periodic sensor networks[END_REF][START_REF] Habib | Real-time sampling rate adaptation based on continuous risk level evaluation in wireless body sensor networks[END_REF], the authors proposed data reduction approaches based on adaptive sampling. These approaches work by studying the level of variance between the collected data over a certain time frame, and dynamically adjusting the sampling frequency of the devices. Adaptive sampling approaches work well in applications where the collected time series are stationary. In the case of quickly varying data, these approaches perform poorly. In [START_REF] Tayeh | A distributed real-time data prediction and adaptive sensing approach for wireless sensor networks[END_REF], the authors proposed a data reduction mechanism based on dual prediction. The proposed mechanism works by building a model that describes the sensed phenomenon and deploying it on both the edge node and the IoT devices. The advantage of prediction approaches is that the model at the edge predicts the sensed measurement without requiring any radio communication unless the prediction error exceeds a predefined threshold. However, such prediction mechanisms suffer when it comes to devices like a high frequency motion sensor, where the data collection frequency is high and the data varies quickly.

Numerous aggregation approaches that take advantage of the temporal correlation in the collected data have been proposed [START_REF] Alieksieiev | One approach of approximation for incoming data stream in iot based monitoring system[END_REF][START_REF] Harb | En-route data filtering technique for maximizing wireless sensor network lifetime[END_REF][START_REF] Harb | A real-time massive data processing technique for densely distributed sensor networks[END_REF]. In [START_REF] Harb | En-route data filtering technique for maximizing wireless sensor network lifetime[END_REF], the authors proposed a data filtering technique based on the Pearson coefficient metric. This method works by recursively dividing the dataset into two equal parts and aggregating the data based on the correlation between the subsets. In [START_REF] Alieksieiev | One approach of approximation for incoming data stream in iot based monitoring system[END_REF], the author proposed a data aggregation method for incoming data stream in IoT based monitoring systems. The proposed method is an approximation with 'extremums' technique that reduces the volume of data to be stored or transmitted. The results show that this method was able to achieve a compression of up to 10 times on temperature data.

5.2.3/ IOT DATA COMPRESSION

It is possible to classify data compression algorithms into two types: lossless compression and lossy compression. Lossless compression does not involve data loss, while lossy compression leads to some data loss. However, the maximum data reduction that can be reached by lossless compression is limited. Typically, when choosing the appropriate algorithm, the main property to check is the Compression Ratio (CR) factor, denoted in Equation 5.1:

CR = uncomp size comp size , (5.1)
where uncomp size is the size of the original data, and comp size is the size of the compressed data.

Lossless compression techniques work on a basis to eliminate data redundancies. Huffman coding, Arithmetic Coding, Run-length Encoding (RLE), dictionary-based general purpose techniques such as Lempel-Ziv compression, are the most commonly used loss-less compression techniques. More recently, Sprintz has been proposed in [START_REF] Blalock | Sprintz: Time series compression for the internet of things[END_REF] In [START_REF] Azar | Using dwt lifting scheme for lossless data compression in wireless body sensor networks[END_REF][START_REF] Azar | On the performance of resource-aware compression techniques for vital signs data in wireless body sensor networks[END_REF], the authors proposed data compression techniques that take advantage of Compressive Sensing (CS) and transform domain compression techniques that are usually used for images have been proposed as well for multivariate time series compression in IoT applications. In [START_REF] Gaeta | Multisignal 1-d compression by ftransform for wireless sensor networks applications[END_REF], the authors proposed a multisignal compression technique based on the theory of fuzzy transform. The proposed method has been applied on multisignal environmental data collected by a wireless sensor network and reduced the data by approximately two times. In [START_REF] Cheng | Lifting wavelet compression based data aggregation in big data wireless sensor networks[END_REF], the authors proposed the 2-D lifing wavelet transformation to compress multisignal data collected from different sensor nodes. The proposed method uses the Haar wavelet and achieves a compression ratio of 1.33 and recovery accuracy of 98.4%. Transform domain compression techniques are characterized by the ability to recover the data accurately. However, the compressing performance of these techniques remains limited. On the other hand, CS theory has emerged as an efficient approach for energy-efficiency in IoT applications in recent years [START_REF] Deligiannakis | Compressing historical information in sensor networks[END_REF][START_REF] Fragkiadakis | Adaptive compressive sensing for energy efficient smart objects in iot applications[END_REF]. By taking advantage of the signal sparsity, CS approaches assure an accurate signal recovery by sampling signals at a much lower rate than the traditional Shannon-Nyquist theorem.

Nevertheless, CS techniques suffer when dealing with non-sparse multi-dimensional signals containing diverse features with different scales of values.

The major drawbacks of the above-mentioned propositions is that they yield low compression ratio on non-stationary multi-sensor data and they are not tested on real devices.

This work proposes a data compression technique for IoT applications and resource con-strained devices that works efficiently on multivariate time series and implemented on real devices.

5.3/ THE PROPOSED DATA COMPRESSION WITH SZ

This section provides a background on the SZ compression method and details its implementation on a Polar M600 smartwatch and low-power system on a chip microcontrollers.

5.3.1/ BACKGROUND

In this work, a lighweight version of the work presented in [START_REF] Di | Fast error-bounded lossy hpc data compression with sz[END_REF] is given. The authors in [START_REF] Di | Fast error-bounded lossy hpc data compression with sz[END_REF] proposed a fast error-bounded lossy compression scheme namely S queeze (SZ)

for High Performance Computing (HPC) applications. This compression scheme has been proposed to deal with the huge amounts of data generated during the execution of HPC applications. SZ is a flexible compressor as compression errors are bounded by absolute or relative error bound and can be managed by the user. Additionaly, SZ can be applied on 1D floating-point arrays and on multi-dimensional arrays. The original SZ compresses input data files that are in binary format and can have different data shapes and data types (single-precision and double-precision). In this work, we propose to adapt the SZ algorithm for IoT devices by considering only the floating point data type and discarding the other types which make the code smaller in size and easier to compile on tiny devices. Moreover, the algorithm was adapted to take a 1-D array of float sensor data as input and return a byte array that is going to be transmitted to the edge node. The motivations behind choosing SZ for IoT applications are as follows:

• SZ allows the compression of multivariate medical time series containing diverse features with different scales

• SZ allows the control of information loss by using an error bound

• SZ leads to higher compression ratio than the multi-dimensional transform domain compression techniques

The proposed compression scheme is defined in Algorithm 1. It is considered that the data are transmitted to the edge after each period P of time t. The collected data are in the form of M × N array, where M denotes the number of readings and N denotes the number of features. For example, consider a motion sensor that collected 128 gyroscope and accelerometer readings for the three coordinate axes after a period P. In that case, M is equal to 128, and N to 6.

To begin, the 2-D array is converted to the 1-D array (Algorithm 1, line 4). The transformation of a multi-dimensional array to 1D array is the first step of the compression process.

The flattened array is then compressed using the lossy SZ technique. Finally, the resulted binary array is transmitted to the edge. Algorithm 2 presents the main steps employed by the adapted SZ compression scheme. Note that the adaptation has been done by extracting the necessary functionalities from the original SZ to make it fit on wearables and resource constrained devices.

Algorithm 1 Proposed compression scheme

Require: E (error bound) 1: while Energy > 0 AND S ensors status = ON do 2:

for each period do

3: data[M, N] ← collected sensors data 4: input[M × N] ← Flatten(data) 5: bin output ← adapted S Z(input, E, M, N) (Alg 2) 6:
transmit Data(bin output) As for the error bound, the absolute error bound has been used in which the compression/decompression errors are limited to be within an absolute error. For instance, if the value of a data point is considered to be X, an absolute error bound of 10 -1 means that the decompressed value should be in the range [X -10 -1 , X + 10 -1 ].

5.3.2/ LIGHT SZ FOR IOT

The respect for the given error bound and the ability to compress multi dimensional arrays of floating points make this algorithm an excellent candidate for IoT applications. This method, however, runs efficiently on a PC/server in its current form, but not on a highly resource-constrained device. First, SZ was implemented on a wearable device (Polar M600 smartwatch) using Android NDK toolset by slightly adapting the algorithm written in C language. However, things become more complicated when it comes to microcontrollers that are more resource-restricted in terms of memory, space, and computing than wearable devices, more changes should be made to SZ in order to work well on any low-power IoT device.

As explained earlier, SZ is a lossy compression tool dedicated to HPC environment. Several modifications are required to adapt the code on ESP-32 like devices. First, the code is long (around 20,000 lines) and has been designed for 64-bit processors. The first adaptation, therefore, consisted of changing some of the pointers and some types to explicitly force the compiler to use 32-bit pointers. Then, because the code is made for different types of data (double, float, int), only the float case was taken into account. One must bear in mind that the storage is very small on IoT devices, which is why all unnecessary parts have been removed. Many large buffers have been used inside the code, so they have been reduced as much as possible to run the code on ESP-32 chips. Since SZ can use Gzip or Zlib to compress in a lossless manner the output of lossy compression, only

Zlib was considered because it is easier to use on Arduino devices. Finally, as it is more difficult to develop codes with arduino than to develop codes on regular machines, it has taken us a lot of time to be able to adapt this code. In fact, the Arduino environment does not have an efficient debugger. to adapt the data rate in a trade-off with the range of the transmission. Higher spreading factor allows longer range at the expense of lower data rate, and vice versa. The combination of bandwidth and spreading factor can be chosen according to the link conditions and the level of data to be transmitted. Thus, a higher spreading factor improves transmission performance and sensitivity for a given bandwidth, but it also increases transmission time as a result of lower data rates.

LoRa end-devices have a maximum data rate of around 50kb/s. Compared with most of the other technology this rate is the lowest, which makes it not ideal for certain applications where high data rates are required. Moreover, LoRa-IoT devices are constrained to tight transmission duty cycles. In order to minimize the impact of these limitation on LoRa-based IoT application, data compression can be introduced.

Assuming an ECG sensor operating on a 1000Hz frequency and acquiring 1000 samples per second accounting for 10kb (1250 bytes) worth of data. Assuming also that this sensor is using SF7, and the payload size is 230 bytes (calculate waiting time between each transmission = 36 seconds). Therefore, six packets transmitted over 3.6 minutes are required to transfer the 1250 Bytes to the gateway. Assuming that we compressed the data from 10kb to 1kb (125 bytes). Thus, to transmit the data, only one packet is required, and with approximately 250 bits/s data rate, the transmission time will become 4 seconds.

By compressing the amount of data to transmit we will achieve the following gains: (1)

With long waiting period between each transmission forced by the Duty Cycle, the amount of time required to transmit the collected data-set to the gateway is heavily reduced.

(2) Since transmission consumes battery, fewer transmissions means lower battery consumption as long as compressing the data-set consumes less than transmitting it.

Therefore, the proposed approach for data compression can be considered as an effective solution for energy-efficiency in LoRa-based applications. The effect of compression on transmission time and energy consumption will be detailed in the experimental results section.

5.4/ CASE STUDY

The combination of IoT, cloud computing, and healthcare has taken a lot of attention during the past years. Among the major challenges that face the healthcare applications are:

• Latency due to communication between cloud and IoT devices.

• Limited network bandwidth due to the high amount of generated data.

• High cost of privacy and security breaches.

Here is where the benefits of edge computing take place. As mentioned in previous sections, edge computing can be considered a major solution for latency and bandwidth challenges in IoT and healthcare applications. In a similar way, efficient on-node data compression can increase the lifetime of the application, and reduce the size and the number of transmitted packets which may affect the latency and network bandwidth positively. However, the integrity of the data and loss of information due to compression remain critical issues for healthcare applications. In this section, the impact of data compression and energy efficiency on the analysis of medical data at the edge is studied.

Let us consider the case of driving behaviour monitoring and stress detection where the physiological signals are continuously collected from a driver and transmitted to the edge node for analysis and detection of stress level.

In the following, the dataset used in our work is described, then the processing and analysis of the data are discussed, and finally, the model used for stress level detection is presented.

5.4.1/ DATASET

The Stress Recognition in Automobile Drivers database published on PhysioNet has been used in this work [START_REF] Al | physiotoolkit, and physionet: Components of a new research resource for complex physiologic signals[END_REF][START_REF] Healey | Detecting stress during real-world driving tasks using physiological sensors[END_REF]. This multivariate dataset contains multiple physiological signals recorded from healthy volunteers, taken while they were driving on a specified route in and around Boston, Massachusetts. The driving task done by each driver varies from about 50 min to 1.5 h and can be divided into six sections as shown in Figure 5.2:

• Rest [1,6]: The resting periods in the beginning of the driving task and at the end of it are labeled as "low stress".

• City [START_REF] Williams | A learning algorithm for continually running fully recurrent neural networks[END_REF]5]: Driving in the city periods in sections 2 and 5 are labeled as "high stress"

since the subjects drove in a busy main street and frequently handled the traffic conditions and the unexpected emergencies created by cyclists and jaywalkers.

• Highway [3,4]: Driving on the highway periods in sections 3 and 4 are labeled as "moderate stress".

Note that the labeling of the data has been validated by drivers' self-reported questionnaires in [START_REF] Healey | Detecting stress during real-world driving tasks using physiological sensors[END_REF].

5.4.2/ DATA PROCESSING AND ANALYSIS

For each driver data file, the noise has been removed from HR and GSR signals following [START_REF] Ollander | Wearable sensor data fusion for human stress estimation[END_REF]. In order to study the impact of data compression on the information contained in the data, a feature extraction phase is used from which time-domain and frequencydomain features are extracted from the ECG signal in addition to the two main components of the GSR signal namely: Skin Conductance Level (SCL), and Skin Conductance

Response (SCR). The objective of this step is to compare the features extracted from the original data with the features extracted from the compressed data.

Table 5.1 describes the features extracted from the ECG signal by applying time and frequency domain analysis such as FIR-filters and fast fourier transform methods. In order to analyze the GSR signal, which can be considered an important sensitive measure for emotional arousal, we extract the slow variation (SCL) and the faster alterations (SCR) following a convex optimization approach proposed in [START_REF] Greco | A convex optimization approach to electrodermal activity processing[END_REF]. Table 5.2 shows the features extracted from the GSR signal. That is, whether the sequence corresponds to low stress, moderate stress, or high stress.

5.4.3/ STRESS DETECTION USING FEED-FORWARD NEURAL NETWORK

Providing that edge analytics require lightweight algorithms to perform reasonable machine learning [START_REF] Varghese | Challenges and opportunities in edge computing[END_REF], we have used a network with a minimized size that maintains accuracy. The implemented network has four hidden layers consisting of 60 neurons, which use the ReLU activation function [START_REF] Nair | Rectified linear units improve restricted boltzmann machines[END_REF]. The number of layers The network was trained with a variant of stochastic gradient descent 'Adam' [START_REF] Kingma | A method for stochastic optimization[END_REF] and categorical cross entropy.

Furthermore, Dropout regularization technique [START_REF] Srivastava | Dropout: A simple way to prevent neural networks from overfitting[END_REF] has been used to prevent overfitting and 10-Fold Cross Validation has been used to validate and find the optimal set of hyperparameters for the model. Finally, the network has been trained for 300 epochs with a learning rate of 0.011 .

5.5/ EXPERIMENTAL SETUP

This section describes the tools and datasets used to evaluate and validate the proposed approach by measuring the effect of data compression on the IoT devices' energy consumption and the time required for processing and transmitting the collected data. To do so, the ESP Wroom 32 and Wifi LoRa 32 were used to test the transmission with WiFi and LoRa.

ESP Wroom 32 is a WiFi+Bluetooth microcontroller unit module capable of targeting applications for low-power sensor networks. WiFi LoRa 32 is a popular IoT dev-board manufactured by Heltec Automation (TM), a highly integrated system based on ESP32, featuring WiFi, bluetooth, and LoRa capabilities and suitable for smart city applications.

In order to assess the impact of processing and transmission on energy, a USB Tester has been used to measure USB voltage and current drawn by USB devices. USB tester helps to measure the amount of energy consumed in mWH by a device plugged into a USB port. These devices are shown in Figure 5.4.

In addition to the multivariate Stress Recognition in Automobile Drivers dataset discussed in the previous section, two other univariate datasets were also considered. The first is the ECG-ID Database that was published in Physionet [START_REF] Al | physiotoolkit, and physionet: Components of a new research resource for complex physiologic signals[END_REF] and originally proposed in [START_REF]Biometric human identification based on electrocardiogram[END_REF].

The second is a PPG dataset that was recorded in the Femto-ST laboratory department DISC, Belfort, France, using Shimmer3 GSR+Unit In addition to the aforementioned devices, a Polar M600 smartwatch has been used as well to test the impact of data compression on its battery lifetime.

5.6/ EXPERIMENTAL RESULTS AND ANALYSIS

This section describes the results of the experiments conducted to validate the solution proposed in this chapter. Four metrics are discussed in the following: data reduction, processing and transmission time, energy consumption, and the impact of information loss on the prediction accuracy. Most of the sensors deployed in real world applications capture and transmit data periodically. The experiment conducted simulates this approach and consists of compressing a 10Kb batch of data after each period of time t = 30s and logging the compressed size for 80 periods. This process was repeated using the three error-bounds for ECG and PPG data compression. The results are shown in Figure 5.5.

The results clearly show that increasing the error bound results in a higher compression ratio. The ECG and PPG data compression ratio obtained by using SZ with 10 -1 error bound ranges from 80:1 to 100:1. When using an error bound of 10 -2 , the compression

Size (bytes)

Uncompressed PPG ABS E-1 PPG ABS E-2 PPG ABS E-3 ECG ABS E-1 ECG ABS E-2
ECG ABS E-3 Although the objective of the work in this chapter is to increase the lifetime of IoT devices, the remainder of our experiments use SZ for data compression with an absolute error bound of 10 -1 .

5.6.2/ PROCESSING/TRANSMISSION TIME

A major advantage of data compression is to reduce the time it takes to send the data to the edge/gateway, which is a critical requirement in near-real-time applications. This section compares the time required for transmitting uncompressed data and the time required for compressing and transmitting compressed data. To do so, the Mackay-Glass time series was generated on the ESP Wroom 32 and the time needed to transmit various sizes of this time series using WiFi to a local PC was calculated. The same procedure was conducted for the time series compression and transmission and it was repeated 20 times for each data size. The results show that using the proposed compression technique prior to transmission provides a time gain of 3.5 to 10 times as compared to directly transmitting the original data. Additionally, the results show that data compression becomes more effective with the increase in data size. This will allow for a larger time period t for periodic applications, thereby collecting and sending more data with fewer transmissions.

5.6.3/ ENERGY CONSUMPTION

The effect of data compression on energy consumption is discussed in this section. The The ratio of energy savings varies from about 1.5 to 2.5. For example, using the proposed approach to transmit 40Kb can reduce energy consumption by up to 2.5 times compared to uncompressed data transmission. It is possible to deduce the same conclusion as the previous section, i.e. increasing the period time t and collecting more information, then compressing and transmitting, is the optimized method which allows for the highest energy and storage gain.

5.6.3.2/ LORAWAN

The second experiment is to send different sizes of the generated Mackay-Glasstime series to a LoRaWan Gateway. Similarly, to the first test we consider the following cases:

• The raw data are transmitted without any compression

• Data are compressed before transmission.

10K 20K 30K 40K

Data size (1k=1000 bytes) Each case was repeated 10 times, and the final results seen in Figure 5.8 are the averaged values. Unlike Wifi and in order to respect the Duty Cycle of the LoRaWan, the device is forced to transmit a limited amount of data periodically after a certain amount of time is passed. Meanwhile, while the device is not allowed to transmit, it is put to sleep.

The allowed size of the transmitted packet, in addition to the sleep duration depends on the used Spreading Factor (SF). Detailed information can be seen in The energy consumption varies greatly depending on the SF. The higher the latter is, the lower the data rate is, which forces the radio module to operate for a longer duration in order to transmit the packet and increases the transmission energy. In addition, the packet size gets smaller for higher spreading factors. As a consequence, more packets are needed to transmit the same total amount of data, therefore, more energy is consumed in the process. Finally, while the sensor is in sleep mode it still consumes some energy.

The higher the spreading factor is, the higher the time on the air (ToA) of the transmitted packet is, which means the sensor is forced to wait longer for the next transmission. The more time the sensor waits to transmit the stored data, the more it consumes.

All of this can be seen in Figure 5.8, the higher the SF is the more energy is consumed.

But most importantly, we can see the impact of compression on the energy consumption. Indeed, compressing the data before transmission reduces drastically the amount of consumed energy.

5.6.3.3/ BLE

The multivariate Stress Recognition in Automobile Drivers dataset has been used to study the energy consumption on the wearable smartwatch. The signals in this dataset were recorded from the drivers at 496 Hz. In order to test the efficiency of the proposed compression scheme, we have deployed the data on the SD card of a Polar M600 wearable.

In the same way, the compression technique written in C language using Android NDK toolset was implemented. After each period p = 1 min, an array data[M, N] is transmitted using Android BLE to the edge device, which is a local PC where the received data are processed and analyzed. The results are then transferred to the cloud. Note that M, the number of readings, is equal to 148800 and N, the number of features, is equal to 5. The experimentation has been conducted for around 4 hours, equivalent to 241 periods. • Black line: the wearable device is in the idle state.

• Red line: the wearable device is continuously collecting data (motion and heart rate sensors are turned on).

• Yellow line: the wearable device is collecting data and running the compression algorithm after each period.

• Green line: the wearable device is collecting data, and performing compression and transmission after each period.

• Blue line: the wearable device is collecting data, and performing data transmission after each period (no compression).

The results clearly show the impact of data reduction on the communication task energy consumption. The battery level of the device continuously collecting data was decreased to around 86% after 241 periods. Note that by comparing the sensing and computation tasks with the idle state, it can be noticed that these tasks contribute a little in the energy consumption of the device. On the other hand, when applying the proposed data compression scheme prior to transmission, the battery level was decreased to 83% while sending the data without compression decreased the battery level to around 56%. As a result, the device lifetime could be increased by up to 27% after 4 hours.

5.6.4/ LOSS OF INFORMATION AND STRESS DETECTION

In this section, the impact of information loss on the prediction accuracy of the FFNN model for stress level detection is studied. For each of the drivers datasets, a sliding window of 30 seconds with 75% overlap on the data is applied, and the physiological features described in the previous section are extracted from each window. Note that for each window, the extracted features form a set/sequence labeled as low, moderate, or high stress that is going to be fed as an input to the neural network.

Figure 5.10 compares the original ECG signal transmitted to the edge without compression with the compressed signal using an error bound of 10 -1 . Even though the compression has affected the shape of the signal, the positions of the peaks that are used to exploit the signal and extract the most important features remained unchanged. Note that one of the advantages of the SZ algorithm is that the error bound is controllable and can be initialized according to the medical need. In other words, the trade off between compression ratio and loss of information can be easily controlled by the medical staff. [START_REF] Healey | Detecting stress during real-world driving tasks using physiological sensors[END_REF] are randomly divided into train and test sets (75%/25%). Two models are considered, the first one was trained on the sequences of features extracted from the original data and the second one on the sequences of features extracted from the compressed data.

For hyperparameter optimization, 10-fold cross validation is performed on the training sets, and then our models are evaluated on the test sets. Table 5.6 summarizes the stress level detection performance of the aforementioned models. The results show that the average accuracy achieved by the two models is 98%. It can be noticed that not only the compression did not affect the prediction accuracy but even improved it in some cases such as for driver 7 and driver 12, which is due to the denoising capability of the compression technique.

5.7/ LIMITATIONS OF THE PROPOSED WORK

The results of this work have shown that the proposed compression technique has been able to achieve satisfactory results in terms of energy conservation and data reduction.

For maximizing the compression ratio, SZ with an absolute error bound of 10 -1 was used and Section 5.6.4 showed that the impact of data compression on data quality and the values of the extracted features was not significant. However, after compression with SZ E-1, the features extracted from the Stress Recognition in Automobile Drivers dataset [START_REF] Healey | Detecting stress during real-world driving tasks using physiological sensors[END_REF] were extracted from the ECG-ID [START_REF]Biometric human identification based on electrocardiogram[END_REF] and the locally-collected PPG datasets as well.

The results showed that the hypothesis of using SZ with maximum compression ratio in different scenarios can not produce consistent results.

Contrary to the results obtained in Table 5.5 when the drivers stress recognition use case was considered, the average values of the extracted features from the reconstructed ECG-ID and the locally-collected PPG datasets were not plausible. It can be seen that the the compression with SZ with an absolute error bound of 10 Another limitation of the reconstructed signal is its graphical representation and form.

Even though the peak positions were not affected as shown in Figure 5.10, when compressed with a high compression ratio, a medical doctor or physician may not accept the visual representation of the signals.

The straightforward possible solution to these limitations is considering a slightly smaller error-bound such as 10 -2 or 10 -3 . So if the question stated in Section 5.1 is to be addressed, we may conclude that while the use of a lossy compressor in IoT-healthcare applications may help solve several challenges, it does not guarantee accurate data restoration in all scenarios when it comes to data quality. These limitations will be further discussed and addressed in the next two chapters.

5.8/ CONCLUSION

Since bringing intelligence closer to IoT devices reduces network latency and energy consumption due to radio communications, data reduction can be seen as an additional solution to increase the lifetime of IoT devices. In this work, an energy efficient data reduction scheme for IoT-Edge applications in healthcare was proposed. The proposed scheme is based on an error-bounded lossy compressor designed for high performance computing applications that produce large amounts of data during the execution. A lightweight version of the Squeeze (SZ) compressor have been implemented on real IoT hardware and a Polar M600 wearable. The performance of the compressor was tested on one medical multivariate time series dataset related to automobile drivers stress and two physiological univariate time series datasets. Furthermore, we considered the use case of drivers stress recognition and studied the impact of lossy data compression on the analysis, exploit, and classification of medical data.

The results showed that the proposed solution could reduce energy consumption by as much as 2.5 times. In addition, compressing large batches of data prior to transmission will reduce the time required to transfer data from the IoT to the edge. It has been shown

that the proposed solution has provided up to 10 times gain in time compared to the direct transmission of uncompressed data. As a result, what is proposed in this chapter can be considered for a wide range of IoT applications requiring an easy-to-implement algorithm that reduces the processing/transmission time and optimize the lifetime of the devices.

IOT TIME SERIES CLASSIFICATION WITH DATA COMPRESSION AND DEEP LEARNING

Internet of Things (IoT) and wearable systems are very resource limited in terms of power, memory, bandwidth and processor performance. Sensor time series compression can be regarded as a direct way to use memory and bandwidth resources efficiently. On the other hand, the time series classification has recently attracted great attention and has found numerous potential uses in areas such as finance, industry and healthcare. This chapter investigates the effect of lossy compression techniques on the time series classification task using deep neural networks.In Chapter 5 it was shown that the optimal data quality is not always guaranteed when using a compressor with maximum compression ratio, therefore the trade-off between compression ratio and data quality must be further investigated. This chapter proposes an efficient compression approach for univariate and multivariate time series that combines the lifting implementation of the discrete wavelet transform with the error-bound compressor presented in Chapter 5, namely S queeze (SZ),

to attain an optimal trade-off between data compression and data quality.

6.1/ INTRODUCTION

The world is becoming increasingly connected and intelligent through the Internet of Things (IoT), which can be defined as a wireless network of smart sensing devices connected to the Internet, ready to collect and transmit data supported by embedded devices or sensor networks. IoT devices are generally composed of five main components: 1) sensors, 2) processor, 3) memory, 4) communication module, and 5) battery. Many of these devices are connected by a gateway functionality that is capable of communicating with the sensors and providing storage and processing capabilities. This gateway could be located in the cloud or at the edge.

Time series data collected from IoT devices such as sensors, machines, and wearables, are becoming the most widespread. These data are generated with high velocity from different real-world applications such as healthcare, manufacturing, agriculture, and urban infrastructure [START_REF] Guizani | Internet of things: A survey on enabling technologies, protocols, and applications[END_REF], and transmitted to cloud or edge processing.

One of the main issues with IoT applications is the huge volume of collected data. The onboard signal processing and compression algorithms could be used to avoid this problem and therefore avoid the transmission and storage of large amounts of data. Generally, radio communication dominates energy consumption. Therefore, data compression can significantly decrease communication energy costs by reducing the number of bits to be transmitted and thus increase the lifetime of the device [START_REF] Razzaque | Compression in wireless sensor networks: A survey and comparative evaluation[END_REF]. Consequently, this directly affects the energy consumption and battery life of the devices in addition to the storage requirements of the transmitted data, enabling much less data to be managed.

Data compression algorithms can be divided into two types: lossless and lossy compression. Lossless compression does not involve data loss, while lossy compression leads to data loss. However, the maximum level of compression that can be achieved without loss is limited. This limited compression ratio is unfortunately a big drawback in the context of IoT data and resource constrained devices covered in this work. On the other hand, lossy techniques cannot reconstruct the original data from the compressed data. This does not mean, however, that reconstructed data are of low quality. A good lossy compressor maintains the critical information while dropping, for example, the relatively useless data such as noise.

While on-board lossy compression techniques can increase the lifetime of IoT devices and enormously reduce the amount of data sent to the gateway, the impact of compression ratios on data analysis can not be neglected nologies. The third layer is the main layer of the entire analytical system that processes the data using tools such as Apache Storm and Spark. In this layer, the classification of time series data takes place. The fourth layer is responsible for the interpretation and use of the generated results. In real world applications, time series data are highly compressed in layer 1 before their processing in layer 3. On the basis of this comparison, this chapter proposes a new approach that combines advantageous properties of the discrete wavelet transform with the presented S queeze (SZ) compressor, taking into account all the above-mentioned metrics and requirements.

6.2/ RELATED WORK

Different data reduction techniques are proposed in the literature to resolve energy constraints [START_REF] Srisooksai | Practical data compression in wireless sensor networks: A survey[END_REF][START_REF] Razzaque | Compression in wireless sensor networks: A survey and comparative evaluation[END_REF]. In a recent work, Blalock et al. [START_REF] Blalock | Sprintz: Time series compression for the internet of things[END_REF] presented an efficient high-ratio lossless compression technique for multivariate integer time series, namely Sprintz, with a significantly lower memory and latency than state of the art methods. Compared to different compressors, like SIMD-BP128 [START_REF] Lemire | Decoding billions of integers per second through vectorization[END_REF], FastPFOR [START_REF] Lemire | Decoding billions of integers per second through vectorization[END_REF], Zstandard (Zstd) [170] and Zlib [3], the proposed algorithm achieved strong compression ratio, speed and memory requirements. The authors in [START_REF] Ukil | Iot data compression: Sensoragnostic approach[END_REF] proposed a dynamic lossy compression approach to extract valuable information from IoT data with constant adaptation and information loss. The proposed technique is based on the lossy Chebyshev compression and yields a compression ratio of up to 3:1. Various compression algorithms have been proposed

that take advantage of the temporal correlation in the data. A new principle for delta compression was developed by the authors in [START_REF] Stojkoska | Data compression for energy efficient iot solutions[END_REF], which allows the compression of tempo-related data and results in a higher compression ratio and a lower memory capacity than standard delta coding. Dictionary-based compressors have been proposed to benefit from repetitive patterns in the data. In [START_REF] Le | Lossless data compression algorithm to save energy in wireless sensor network[END_REF], the authors proposed a lossless data compression technique called Differential-Lempel-Ziv-Welch (D-LZW), which consists in finding the difference between two successive data samples before placing the data in the LZW algorithm. The authors compared their approach to bzip2 and gzip, showing better results in compressing electrocardiogram (ECG) data.

With regard to the problem stated in this work, the influence of data reduction on classification performance was investigated in previous studies. In [START_REF] Zareei | Impact of compression ratio and reconstruction methods on ecg classification for e-health gadgets: A preliminary study[END_REF], the authors examined the effect of compressed sensing and reconstruction algorithms like Basis Pursuit and Orthogonal Matching Pursuit on ECG arrhythmia detection using Support Vector Machine (SVM) classifier. The results show that the classification performance remains stable until a compression ratio of 7:1, after which Basis Pursuit outperforms Orthogonal Matching Pursuit on ECG arrhythmia detection. In a similar work [START_REF] Concha | Compressive sensing of time series for human action recognition[END_REF], the authors proposed the compressed sensing of time series for the recognition of human activities. The results

show that the use of compressed sensing on the original time series increased the accuracy of classification using Hidden Markov Model from 77% to 95%. The explanation for this increase in classification accuracy is that the compressed sensing has some kind of advantageous dimensionality reduction, which facilitates pattern recognition. In web page classification, the authors in [START_REF] Shen | Web-page classification through summarization[END_REF] used the idea of data reduction to make both summarized and pure data available as inputs for the classifier. Their study showed that human or machine summaries help improve the performance of the web page classification.

In the following sections, the influence of three compression techniques, namely Compressed Sensing (CS), Discrete Wavelet Transform (DWT), and Squeeze (SZ) proposed in [START_REF] Di | Fast error-bounded lossy hpc data compression with sz[END_REF] and presented in Chapter 5, on time series classification is studied. Moreover, the proposed data compression approach is presented. CNNs [5] are prevalent to image processing activities, reducing the number of parameters that need to be learned when the number of neuron connections in the hidden layer is limited to just certain input neurons (i.e. the local area in the image input). In many practical applications, CNNs have achieved positive results, particularly in the field of computer vision. In case of TSC problems, it is possible for CNNs to learn or automatically extract features from raw input data. A sequence of observations can be processed as a one-dimensional image, that can be read and distilled in the most salient elements by a CNN model. The network structure of LSTM-FCN and GRU-FCN proposed in [START_REF] Karim | Lstm fully convolutional networks for time series classification[END_REF] and [START_REF] Elsayed | Deep gated recurrent and convolutional network hybrid model for univariate time series classification[END_REF] respectively.

For semantic segmentation on images, FCN [START_REF] Long | Fully convolutional networks for semantic segmentation[END_REF] has demonstrated impressive quality and efficiency. The FCN used for TSC is constructed by stacking three blocks, each of which consists of a convolutional layer with f filters, followed by a batch normalization layer and a ReLU activation layer as shown in Figure 6.2-a. The features are fed into the global average pooling layer after the first three convolutional blocks, largely reducing the number of weights and the final result comes from the softmax layer.

ResNet is a deep CNN that uses shortcut connections between successive convolutional layers for training. The architecture used for TSC consists of 9 convolutional layers, followed by a general average pooling layer as shown in Figure 6.2-b.

6.3.2/ RECURRENT NEURAL NETWORK

RNN is a network that has loops. The Long Short-Term Memory, or LSTM, is a type of RNN. In the context of deep learning, LSTM has recently been widely used as it is free from the problem of vanishing gradients and offers excellent performances and results.

LSTM based networks are suitable for classifying time sequences and replacing many conventional approaches to deep learning.

LSTM-FCN architecture has been proposed in [START_REF] Karim | Lstm fully convolutional networks for time series classification[END_REF]. The authors improved the previously discussed FCN's performance by transferring the time-series into a shuffle layer and subsequently passing it into a LSTM block as shown in Figure 6.3-a. The output of the LSTM block is concatenated with the output of the global pooling layer and the final results are obtained from the softmax layer.

Similarly, the authors in [START_REF] Elsayed | Deep gated recurrent and convolutional network hybrid model for univariate time series classification[END_REF] proposed the GRU-FCN architecture, shown in Figure 6.3b. The proposed architecture has replaced the LSTM with a Gated Recurrent Unit (GRU), which produces higher classification accuracy.

The application of deep learning models for TSC task will be further discussed in Chapter 8.

6.4/ IOT TIME SERIES COMPRESSION

In order to study the impact of data compression on the performance of DNNs for univariate TSC, three compression techniques were considered in this work: Compressed Sensing (CS), Discrete Wavelet Transform (DWT), and an error-bounded lossy compressor, namely SZ. As SZ is described in Chapter 5, this section describes the CS and DWT techniques.

6.4.1/ COMPRESSED SENSING

Compressed sensing is a digital signal processing technique capable of effectively acquiring and rebuilding a signal from a smaller number of measurements. CS can capture and display sparse signals at a rate that is considerably lower than the one normally used in the Shannon sampling theorem.

The basic measurement model for compressed sensing is defined as in Equation 6.1:

[Y] M,1 = [φ] M,N [X] N,1 , (6.1)
where X is the original sparse signal of length N, Y is the compressed signal of length M(M << N), and φ ∈ R M×N is the sensing matrix that enables the reconstruction of the signal.

Most signals generally have a low sparsity in the time-domain representation. The representations of these signals are therefore sparse in the frequency domain or under a certain basis. In that case, X can be represented using ψ as a sparse vector as shown in Equation 6.2: 82CHAPTER 6. IOT TIME SERIES CLASSIFICATION WITH DATA COMPRESSION AND DEEP LEARNING

[X] N,1 = [ψ] N,N [z] N,1 , (6.2)
where z is the frequency/spectral domain representation of the original signal X, and ψ is the matrix that converts the signal to the temporal-domain from the spectral-domain. The reconstruction of the signal allows z to be calculated from Y by combining Equation 6.1 and Equation 6.2 as follows:

[Y] M,1 = [φ] M,N [ψ] N,N [z] N,1 . (6.3)
Note that in this work, ψ is calculated by applying the inverse Discrete Cosine Transform upon the columns of the identity matrix. Additionally, the l 1 -norm minimization [START_REF] Romberg | Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information[END_REF], also known as Basis Pursuit, has been employed to recover the original signal X.

In this work, we assume that the data collected are time series of floating point numbers, so the compressed vector Y contains floating point data. In that case, to encode the resulting Y vector, an additional lossless entropy coder is required. Furthermore, we utilize the lossless FPZIP compressor proposed in [START_REF] Lindstrom | Fast and efficient compression of floatingpoint data[END_REF] for the encoding step.

6.4.2/ DISCRETE WAVELET TRANSFORM

DWT has many advantageous properties that are valuable for time series data mining [START_REF] Chaovalit | Discrete wavelet transform-based time series analysis and mining[END_REF]. It transforms and analyzes a time series at multiple resolutions using the socalled wavelets.

The DWT allows a time-frequency representation of a signal. It splits the signal into low-frequency components (approximations) and high-frequency components (details) through the use of filters. The motivation for exploiting the DWT lies in the transformation of redundant samples in the temporal domain to decorrelated coefficients in the time-frequency domain, which allows the compaction of the original samples and their representation with fewer coefficients. Hence, this process facilitates the study of certain features of the original dataset. The application cases of the DWT for time series analysis are excessively various, for example, compression and noise filtering [START_REF] Azar | Using dwt lifting scheme for lossless data compression in wireless body sensor networks[END_REF][START_REF] Azar | Using adaptive sampling and dwt lifting scheme for efficient data reduction in wireless body sensor networks[END_REF].

In this work, the DWT is used for compression by maintaining only a signal's approximation data. These approximations are floating point values that need to be encoded, similar to the compressed sensing method, the FPZIP was considered.

One of the methods that can be used to compress and denoise a time series using DWT is to retain only the approximation data after performing the DWT, as a perfect reconstruction can be done using these approximations, while the details can be discarded and considered as noise. During the reconstruction, the details data can be set to zero.

6.5/ PROPOSED COMPRESSION APPROACH

In this section, a compression scheme that enables a high compression ratio, denoises input data, and controls compression/decompression error is presented. It begins by presenting the lifting scheme implementation of the DWT and its capacity to compress and denoise the input signal, and then details the proposed compression scheme.

6.5.1/ FASTER IMPLEMENTATION OF THE DWT

The conventional method of wavelet transform needs complicated mathematical calculations, making it unfit for resource-constraining devices. Sweldens had proposed the lifting scheme in [6], a more efficient algorithm for calculating wavelet transforms and building bi-orthogonal wavelets.

The lifting scheme forward transform consists of three operations: split, predict, and update. The split operation divides the signal into even and odd samples. This step is also known as the lazy wavelet transform. In view of the locally correlated structure of the signal, even and odd samples are strongly correlated. The predict step predicts odd samples from even samples. Finally, The update step guarantees that the smoothed approximation signal has the same average as the initial signal. For a detailed explanation of the lifting procedure, refer to [START_REF] Azar | Using dwt lifting scheme for lossless data compression in wireless body sensor networks[END_REF][START_REF] Azar | On the performance of resource-aware compression techniques for vital signs data in wireless body sensor networks[END_REF].

There are many benefits of applying the lifting scheme to IoT devices: (1) It enables a faster implementation of the wavelet transform and is very appealing for real time applications with low energy. (2) It is memory efficient and enables a fully in-place calculation.

(3) Very easy to understand, implement, deploy and adapt to various nodes.

6.5.2/ THE LIFTING SCHEME FOR NOISE FILTERING

The data collected from real world applications are usually noisy. Data reduction is the primary reason to implement the DWT. Equally important, eliminating the large variations of data mixed in the collected signal before transmission can be a crucial step in real-time applications as this step is no longer required at the edge of the network. Thus, taking less time to process and classify the transmitted data at the edge/sink. In this work, we propose to apply the classification methods on the approximations of the original data. This is driven by the reality that approximations are smaller in size than the original raw data, leading in quicker implementation of the algorithms and reducing data access time. In addition, the DWT's noise filtering capacity isolates important features from the original signal. The meaningful data is thus fed to the deep learning model.

6.5.3/ PROPOSED COMPRESSION SCHEME

The data collected from sensors in IoT applications are generally multivariate time series.

An M-dimensional multivariate time series, X = [X 1 , X 2 , ..., X M ] comprises of M different univariate time series. In our compression scheme, the first step is to transform each univariate time series into approximation and detail sets using the lifting scheme. This step is referred to as column-lifting. Then the details are removed, maintaining only an M-dimensional set of approximations A = [A 1 , A 2 , ..., A M ]. Note that the lifting scheme was implemented based on the Haar wavelet due to its simplicity. Multiple levels of transformation can be done by reapplying the wavelet function on the approximation coefficients.

The number of levels can be defined by the user depending on the application and the collected data. Next, the SZ algorithm described in Chapter 5 processes the approximations array. The motive behind the combination of SZ and the lifting scheme is that SZ is a prediction method, and how smooth or jagged the time series affects its output. The benefit of the lifting scheme transformation is that it results in a smoother version of the initial time series that allows the SZ's bestfit curve-fitting to better predict the data in the user-required error.

When the data reaches the edge/sink, the time series reconstruction method consists of using the SZ algorithm to decompress the compressed approximation coefficients. Then the wavelet-transform data is introduced into a deep learning model without the need to apply the inverse wavelet transform and recover the original data. This process is illustrated in Figure 6.6 and Algorithm 3. The input multidimensional array is firstly processed by the forward lifting transform. Based on the provided number of decomposition levels L, the three operations (split, predict, and update) are repeated L times. The results of this operation are one matrix of approximation coefficients A and a set of L matrices of detail coefficients D {d 1 , ..., d L }. The proposed approach consists of discarding the set D, considered as noise, and keeping the approximations only. Then the approximations are converted to 1-D array, SZ's bestfit curve-fitting is applied and finally the unpredictable data points are represented using the IEEE 754 binary representation. The output is a binary array ready to be transmitted to the sink/edge.

Algorithm 3 Proposed compression approach

Require: input (N-D array), E (error bound), L (decomposition levels), M (num rows), N (num columns) Ensure: output (binary array)

6.5.4/ TIME COMPLEXITY AND COMPRESSION PERFORMANCE

The time complexity of the DWT lifting scheme is Θ(N log N), and the time complexity of the SZ algorithm is Θ(N). In order to test how the use of the DWT can help increasing the compression ratio, 3axis accelerometer data have been collected over 80 periods (1 period = 30 seconds).

The user was at rest for the first 40 periods (sitting on a chair) and walking for the last 40 periods. Figure 6.8 shows the number of transmitted bytes after the compression of 36864 bytes of accelerometer data using SZ and DWT+SZ methods. The results show that the averages of the transmitted bytes per period are 742 bytes at rest and 1062 bytes at walking using SZ, and 446 bytes at rest and 718 bytes at walking using the proposed approach.

6.6/ EXPERIMENTAL RESULTS AND ANALYSIS

The discussed compression techniques and classification models were tested on 8 UCR univariate time series datasets [START_REF] Chen | The ucr time series classification archive[END_REF], 1 UCI multivariate time series dataset [START_REF] Anguita | A public domain dataset for human activity recognition using smartphones[END_REF] and 3 UEA multivariate time series datasets [START_REF] Bagnall | The UEA multivariate time series classification archive[END_REF]. Table 6.1 describes these time series and shows their source (ECG, Motion, Sensor, etc.), the size of the training and testing sets, the number of classification classes, the length of the time series and their type 88CHAPTER Table 6.1: The descriptions of the utilized datasets for time series classification based on [START_REF] Anguita | A public domain dataset for human activity recognition using smartphones[END_REF], [START_REF] Bagnall | The UEA multivariate time series classification archive[END_REF], and [START_REF] Chen | The ucr time series classification archive[END_REF].

(U: univariate, M: multivariate), and the number of multivariate time series features. The results acquired on univariate and multivariate time series are presented in the followings of this section.

6.6.1/ SELECTION OF DECOMPOSITION LEVELS AND ERROR-BOUND

This section discusses the SZ error-bound value selection and the number of decomposition levels for the lifting scheme. The main goal of this work's study is to come out with an approach that considers the trade-off between the compression ratio and the classification performance. To answer this question, an empirical approach was taken, recording the model's classification accuracy trained on each dataset with different SZ error-bound and DWT decomposition level. Figure 6.9 shows the outcome of the experiment on two datasets, namely Adiac and Non-InvasiveFatalECG Thorax1. For the SZ algorithm, the results show that the classification accuracy for an error bound of 10 -3 remains very similar to that of the model trained on the original dataset, but the compression ratio is low compared to other compression settings. The highest compression ratio was achieved for an error bound of 10 -1 , but the classification performance dropped significantly. Using a 10 -2 error bound resulted in a good balance between classification accuracy and compression ratio. As for the number of decomposition levels, it can be seen that doing more than two wavelet decompositions greatly reduces classification accuracy while one level decomposition keeps the accuracy similar to the one of the original model and two levels decomposition helps to improve the compression ratio at the cost of slightly sacrificing the classification performance.

The proposed approach in this chapter is to combine the lifting scheme with SZ. Two combinations were considered in the followings according to the above experiment: DWT L1+SZ E-2 and DWT L2+SZ E-2.

O ri g 1 0 E -3 1 0 E -2 1 0 E -1 SZ error bound

6.6.2/ UNIVARIATE TIME SERIES

The first studies were conducted on univariate time series. Two metrics were considered: compression ratio and classification performance.

6.6.2.1/ COMPRESSION RATIO

The following compares the compression ratios of the previously discussed techniques.

Different variations of these techniques with different compression ratios were considered as follows:

• SZ E-1: SZ with an absolute error bound of 10 -1 (the decompressed value should be within the range [V -10 -1 , V + 10 -1 ])

• SZ E-2: SZ with an absolute error bound of 10 -2

• SZ E-3: SZ with an absolute error bound of 10 -3

• CS20: Compressed sensing with M = N×20 • DWT L2 + SZ E-2: Two levels DWT decomposition using the lifting scheme based

Haar transform followed by SZ with an absolute error bound of 10 -2

To compare the performance of the aforementioned techniques, the compression ratio (CR) is considered.

ECG5000 Adiac NonInv-ECGTh1

NonInv-ECGTh2

StarLight [START_REF] Chen | The ucr time series classification archive[END_REF].

The obtained results are shown in Table 6.2. Table 6.2 shows the compression ratio of the different compression techniques. It can be seen that the best results are achieved by the SZ method. The closer the absolute error bound value is to zero, the higher the compression ratio is. As for the compressed sensing, the compression ratio depends on M, and on the number of decomposition levels in the case of DWT. Note that CS and DWT outputs are encoded using FPZIP.

As for the proposed approach, it can be seen that combining the SZ method with an appropriate error-bound and the DWT helps to achieve a higher compression ratio. For instance, SZ with an absolute error of 10 -2 achieves a compression ratio of 5:1 on the ECG5000 dataset, while the compression ratio has been increased to 9:1 and 12:1 when combining SZ with DWT with one level decomposition and two levels decomposition respectively. The reason behind the improvement in the performance resides in the fact that each decomposition level of the DWT results in a more smoothed and correlated approximation coefficients. As a result, the SZ computes the approximation coefficients instead of all the data points in a time series. Furthermore, the DWT removes the noises from a time series, allowing the SZ method to perform better and to produce better results. It can be seen from these figures that the SZ method with an absolute error of 10 -1 does not maintain the quality of the time series. Although it has the highest compression ratio, the classification accuracy of most datasets has been greatly affected. For example, the maximum classification accuracy values obtained on the uncompressed Adiac dataset and the compressed Adiac dataset with SZ E-1 ( Figure 6.10 ) are 0.83 and 0.64 respectively. This can show the effect of data compression on the classification task. The SZ with absolute errors of 10 -2 and 10 -3 slightly affected the performance of the DNN models.

Resnet

As for the CS method, the reconstruction quality of the compressed data was not satisfactory. In spite of the fact that the CS method is known to reconstruct a signal perfectly, the signal must be S-sparse, meaning noise-free, in order to be perfectly reconstructed, which is not the case for the time series used and the most real life data collected from IoT devices. This explains the performance decrease of the classifiers when working on reconstructed time series using CS. It can be noticed that the classification performance of the DNN models is highly affected by parameter M. For example, on the uncompressed Adiac dataset, the maximum accuracy achieved is 0.84 versus 0.66 on the reconstructed dataset from 40% of the original data points (CS 40) and 0.4 on the reconstructed dataset from 20% of the original data points (CS 20).

On the other hand, the classification performance of the models was slightly affected by the DWT method, which was able to maintain the quality of the data. This can be explained by the denoising ability of the DWT method. The results also show that the classification accuracy values of the time series compressed with the proposed approach (DWT L1 + SZ E-2 and DWT L2 + SZ E-2) remained very close to those of the uncompressed time series. Taking into account the trade-off between compression ratio and classification performance, the proposed approach has yielded the best results on the univariate time series. It is important to note that the performance of the Resnet model was the most robust against compression in the experiments conducted. This can be seen in Figures 6.10 and 6.11, where data is compressed with SZ E-1 and CS 20, Resnet has produced the best accuracy compared to other models.

6.6.3/ MULTIVARIATE TIME SERIES

The compression approach presented can handle both univariate time series and multivariate time series. The followings address the effectiveness of the proposed approach when dealing with multivariate time series in terms of compression ratio, classification performance, and energy efficiency.

6.6.3.1/ COMPRESSION RATIO

The compression ratio of the different compression techniques achieved on the 3 UEA multivariate time series datasets in addition to the reconstruction time in seconds are shown in Table 6.4. Compared to the results obtained on the univariate time series, SZ with 10 -1 error-bound and the two combinations of DWT and SZ achieved the highest compression ratio. However, in the case of multivariate time series, DWT L2+SZ E-2 outperformed SZ E-1 for UWave and Wafer datasets, and the compression performance of DWT L1+SZ E-2 became closer to that of SZ E-1. As for the reconstruction time, for the compressed sensing technique, the time needed to reconstruct the compressed data increases with the number of features in a dataset. This can be explained by the fact that CS uses a method of optimization to recover the data, and the more features a dataset has, the greater the process of minimizing the l1-norm. The SZ method's reconstruction time ranged from 0.02 to 0.05 seconds, making it very suitable for applications requiring quick decision-making. As for the DWT, the reconstruction time was not calculated since this work's proposed solution is to use the approximation coefficients directly for classification without reconstruction of the original data. [START_REF] Bagnall | The UEA multivariate time series classification archive[END_REF].

ECG

Another experiment was carried out in which 300 batches of 1000 feature vectors were taken from the HAR [START_REF] Anguita | A public domain dataset for human activity recognition using smartphones[END_REF] dataset, each containing 9 features, and deployed on a Polar M600 wearable. We considered that each batch corresponds to a period of time. The techniques described in the previous section compress the corresponding batch for each period and the resulting number of bytes is recorded. After 300 periods, the average number of output bytes for each compression method is calculated with the standard deviation. The obtained results are shown in Figure 6.12. Figure 6.12 indicates two main things: (1) the combination of DWT and SZ improved the compression performance, (2) the standard deviation of the number of bytes after compression at each period is high for SZ relative to CS and DWT. The latter can be explained by the fact that the compressed data are motion data (accelerometer and gyroscope), and these time series are generally jagged and vary rapidly between different activities (sitting, walking, running, etc). Since SZ is based on a prediction mechanism, its performance depends heavily on the characteristics and variability of the data. For the same reason, using DWT increased the performance of SZ due to each level of decomposition resulting in a smoother version of the data.

6.6.3.2/ CLASSIFICATION PERFORMANCE

The FCN model was used to evaluate the effectiveness of our compression approach on the multivariate datasets. The data processed by the model are tensors with the dimensions (samples, seq len, n channels), where samples is the number of training examples, seq len is the number of steps in the time series, and n channels is the number of columns (features) in the data.

The FCN model was trained on three variants of the data. In the first one, the model processes the original data. In the second and third variants, the model processes the approximations resulting from one level decomposition (seq len = length 2 ) and two levels decomposition (seq len = length 4 ) using the column lifting. Note that the length of each dataset is shown in Table 6.1. Table 6. The proposed compression scheme was implemented on a Polar M600 wearable using Android NDK toolset in order to test the impact of data compression on energy conservation. The collected data are multivariate time series consisting of 3-axis accelerometer.

These time series are transmitted to a local PC using Android BLE after each period. for four distinct situations:

• Yellow line: the wearable device is in the idle state.

• Red line: the wearable device is continuously collecting data (motion sensors are turned on).

• Green line: The wearable device is continuously collecting data and compresses and transmits data after each period.

• Blue line: the wearable device is continuously collecting data, and transmits data after each period (no compression).

The results show that the battery level decreased to 76% when continuously collecting data, to 72% when performing sensing, compression, and transmission, and to 56% when performing sensing and transmission. Note that we set the sensing frequency for testing purposes to the maximum in this experiment, generally gathering data with the default sensing frequency does not consume so much energy. From these outcomes, it can be seen that by implementing the proposed compression scheme, the device's lifetime can be improved by 16% after 2 hours. Recall that the main goal is to propose a compression approach that will help maximize an IoT device's lifetime. It operates on multivariate time series and floating point data efficiently. It can be tailored to any application, sensor or activity and suitable for near real-time applications.

The compressed sensing method with a low value of M showed a good compression ratio but after reconstruction did not maintain the required data features, thus decreasing the quality of the classification. Another weak point for compressed sensing is the reconstruction time, which is highly dependent on the data size and the number of features. Note that compressed sensing works perfectly when the sparsity of the data is high in the time/frequency domain, which is not always the case in IoT applications. On the other hand, the SZ method yielded a high compression ratio and the classification performance remained intact with the appropriate error-bound. One concern about SZ is that its performance depends on the stationarity of the time series as shown in Figure 6.12.

The proposed approach of using the discrete wavelet transform as a denoising and smoothing step prior to SZ can be useful for applications where the time series collected are jagged, such as recognition of human activity where high variations can be found between consecutive data points. The proposed approach helped to increase the compression ratio and maintain classification performance when using DWT with one level decomposition. Training a neural network with two levels decomposition approximations 98CHAPTER 6. IOT TIME SERIES CLASSIFICATION WITH DATA COMPRESSION AND DEEP LEARNING decreased the classification accuracy by up to 13% for some datasets. Two things can be recommended to solve this problem: (1) Increasing the size of the training set or testing this approach on datasets such as HAR [START_REF] Chen | The ucr time series classification archive[END_REF] which contain a good amount of training data enabling the model to learn from the compressed time series the necessary features.

(2) Test this approach with wavelets that are more complex than the Haar wavelet.

The selection of the corresponding wavelet family is considered for future work.

6.8/ CONCLUSION

Considering that IoT devices are generally limited in calculation, storage and energy, data compression can be seen as an effective way to increase the lifetime of these devices.

Given the limitations of using a maximum compression ratio as stated in Chapter 5, an empirical study has been conducted in this chapter to identify appropriate compression ratios, which maintain important information from different time series. Different variations of compression techniques were considered based on an error-bound lossy compressor, namely SZ, the Discrete Wavelet Transform (DWT), and the Compressed Sensing (CS).

Additionally, a new compression approach that combines the DWT lifting scheme and SZ has been proposed. The proposed method can manage univariate and multivariate time series effectively, attain a high compression ratio, and can be easily implemented and tailored to various applications.

In order to study the impact of time series compression on the classification task, four newly proposed deep neural networks for time series classification (TSC) were implemented. The experimental results showed that using DWT as a transformation step followed by SZ helps to denoise input data and enables SZ to compress more smooth approximation coefficients resulting in a higher compression ratio.

In addition, this chapter suggested to use the frequency-domain coefficients as an entry

7.1/ INTRODUCTION

Lossy compression techniques are known for achieving the highest reduction ratio, however, the high reduction in data size does not occur without expense, i.e, data distortion.

This has been shown in Chapter 5, where the use of SZ with an absolute error-bound of 10 -1 maintained the data quality of one dataset, and distorted the others. This inconsistency of the results obtained by maximizing the compression ratio led to the use of SZ with a lower error-bound such as 10 -2 and 10 -3 while combining it with a transformation Due to the enormous need to track chronic diseases and monitor elderly parents, ubiquitous health monitoring applications were listed among the various categories on the wearables market as the fastest growing segments [14][50]. Today, current wearable devices and sensors no longer focus on basic metrics for fitness tracking such as the number of steps taken, but also control essential physiological features. Commercial smartphone and wearable devices are currently able to measure a range of physiological parameters using PPG, such as the interval between successive heartbeats, respiration rate, and blood pressure [START_REF] Pantelopoulos | A survey on wearable sensorbased systems for health monitoring and prognosis[END_REF].

One of the challenges of using PPG-based monitoring methods is the inaccuracy of the PPG signals during daily routine activities and physical exercises. This restriction is based on the fact that PPG signals are highly vulnerable to hand motion artifacts and environmental noise [START_REF] Castaneda | A review on wearable photoplethysmography sensors and their potential future applications in health care[END_REF]. higher-level analysis in addition to wasting storage space on meaningless data.

The aim of the second goal of this chapter is to address the artifacts in PPG data. The problem can be conceived as a problem of anomaly detection since the artifacts can be viewed in a PPG signal as anomalies. The difference between denoising a PPG signal and removing artifacts is important to note. An area containing artifacts such as in The author used artificial ECG data to train the network and found that the network trained with artificial data performed better than the network trained with real data. In [START_REF] Xiong | Ecg signal enhancement based on improved denoising auto-encoder[END_REF], the authors proposed a method for ECG signals denoising using a DAE and a wavelet transform method with soft thresholding. The primary concept is to use the wavelet transform to filter the basic noise of a signal and then use DAE to remove the complex residual noise that is difficult to remove using conventional techniques.

The authors in [START_REF] Shen | Denoising gravitational waves using deep learning with recurrent denoising autoencoders[END_REF] in the context of wearables and IoT. In [START_REF] Elgendi | On the analysis of fingertip photoplethysmogram signals[END_REF], the technology of photoplethysmography and its potential applications was reviewed. This review focused on two important stages when dealing with PPG data, namely: pre-processing and feature extraction.

Van Gent et al did extensive work on analyzing and processing PPG. They developed the HeartPy library which works well with noisy PPG data [START_REF] Van Gent | Heartpy: A novel heart rate algorithm for the analysis of noisy signals[END_REF]. The developed algorithm is capable of extracting the heart rate from the raw data and estimating the breathing rate. Additionally, they proposed a method that uses the R-R intervals and R-peaks to detect error/artifacts in the data [START_REF] Van Gent | Analysing noisy driver physiology real-time using off-the-shelf sensors: Heart rate analysis software from the taking the fast lane project[END_REF]. In [START_REF] Singha Roy | Improving photoplethysmographic measurements under motion artifacts using artificial neural network for personal healthcare[END_REF], the authors proposed a neural network model to enhance PPG measurements containing artifacts. The proposed approach consists of a global reference template reflecting a subject's clean heart beat morphology to be prestored in system memory. The reference template is derived through a beat quality assessment method from the acceptable quality beats of the current data. The extracted template should reflect the subject's clean heart beats morphology in order for the neural network to work well. In [START_REF] Cennini | Heart rate monitoring via remote photoplethysmography with motion artifacts reduction[END_REF], the authors used frequency-domain analysis techniques such as fast Fourier transform and band-pass filtering to process PPG data.

They referred to an adaptive echo cancellation method to remove the motion artifacts from the signal. The authors in [START_REF] Askari | Artifact removal from data generated by nonlinear systems: Heart rate estimation from blood volume pulse signal[END_REF] proposed to use the singular spectrum analysis and a spectral subtraction technique to reduce the corruption in the signal and remove the artifacts. The authors used the artifact-related 3-D accelerometer signal as an additional information to help eliminating the artifacts. Different other approaches have been proposed in [START_REF] Kim | Motion artifact reduction in photoplethysmography using independent component analysis[END_REF][START_REF] Lee | Improved elimination of motion artifacts from a photoplethysmographic signal using a kalman smoother with simultaneous accelerometry[END_REF][START_REF] Raghuram | Evaluation of wavelets for reduction of motion artifacts in photoplethysmographic signals[END_REF][START_REF] Ram | A novel approach for motion artifact reduction in ppg signals based on as-lms adaptive filter[END_REF][START_REF] Bac À | A robust motion artifact reduction algorithm for heart rate monitoring from ppg signals[END_REF] that use methods such as independent component analysis, Kalman smoother, wavelets, and adaptive filters in order to reduce the artifacts from PPG data.

The second contribution of this chapter, as compared to the above approaches, consists of detecting and removing the zones where the data are meaningless, and not denoising or enhancing the signal. The removal of these zones happens in an unsupervised manner without the need of extra information from other types of data or manually crafted features. the original samples to be compacted and represented with less coefficients [START_REF] Azar | Using adaptive sampling and dwt lifting scheme for efficient data reduction in wireless body sensor networks[END_REF][START_REF] Azar | On the performance of resource-aware compression techniques for vital signs data in wireless body sensor networks[END_REF].

This process therefore helps facilitate the analysis of certain original dataset's features.

DWT has been used in several research works for time series classification tasks [START_REF] Tzanetakis | Musical genre classification of audio signals[END_REF][START_REF] Subasi | Epileptic seizure detection using dynamic wavelet network[END_REF].

Usually, accuracy is evaluated in accordance with other criteria when comparing several competing classification approaches. The classification algorithm's computation time (speed) is probably the second most important criterion, particularly for time series data.

Since DWT produces a number of signal decompositions, the classification methods can be applied to the wavelet-transformed domain at a specific level. Compared to the original data, the wavelet coefficients are sets of smaller size, and therefore the computation speed of the classification method can be increased. Besides being used as a method of regularization, the object of DAE is not to learn the exact representation of a sample in order to recreate it from low-demensional features, but rather to remove the noise from the input. DAE is now being used to reconstruct images from corrupted versions. This DAE functionality was successfully used for 1D signals as well such as for denoising time series. The first contribution of this chapter is heavily based on DAE's concept.

The autoencoder can be used for anomaly detection problems as well. This is done by learning the pattern of a normal process. A given input that does not follow this pattern is then categorized as an anomaly since the model will find it different from what it has learned during the training phase. The reconstruction error is the metric used to evaluate a given input. By defining a threshold, an input vector can be labeled as anomaly if the difference between the values of this input and the output exceeds the threshold.

Autoencoder-based anomaly detection can be used to process different types of data such as images and time series, therefore it can contains convolution layers (CNN autoencoder), long short-term memory layers (LSTM autoencoder), or a combination of both (CNN-LSTM autoencoder). The technique used to enhance the reconstructed time series is inspired from the work done in [START_REF] Couturier | Image denoising using a deep encoder-decoder network with skip connections[END_REF] for image denoising. The authors implemented a fully convolutional network consisting of an encoder decoder with skip connections. This architecture is based on the U-Net network originally presented in [START_REF] Ronneberger | Convolutional networks for biomedical image segmentation[END_REF]. Even though the data collected from IoT are time series, we propose implementing a 1D U-Net with skip connections from encoder layers to decoder layers on the same level. The proposed architecture takes a 1D signal input of size n as shown in Figure 7.3 and consists of three sections: the contraction, the bottleneck and the expansion section. The contraction part is made up of many blocks of contraction. Each block takes an input and applies two 1D convolution layers with a kernel size of 3 followed by batch normalization and 1D max pooling with pool size equal to 2. After each block the number of feature maps doubles so that the architecture can effectively learn the complex structures. The bottommost layer serves as an intermediary between the contraction layer and the expansion layer.

The expansion part also consists of several expansion blocks similar to the contraction layer. The decoding phase starts with the bottommost layer and an upsampling operation consisting of an upsampling layer with size of 2 followed by 1D convolution layer with a kernel size of 2 and batch normalization. Each expansion block connects the input by the corresponding contraction layer's feature maps and passes the concatenated result to two 1D convolution layers with kernel size of 3 followed by the upsampling operation.

After each block, the number of feature maps get half to keep symmetry. This action will ensure that the learned features in the contraction part are used in the reconstruction of the time series. Note that the number of expansion blocks is equal to the number of contraction blocks. Given that the input values are in the range [0,1], the last top decoder layer is mapped back to the clean output signal with a 1D convolution with kernel size equal to 1 followed by a sigmoid activation. For the same reason, binary cross-entropy was used as the loss function [START_REF] Creswell | On denoising autoencoders trained to minimise binary cross-entropy[END_REF] and variant of stochastic gradient descent 'Adam' [START_REF] Kingma | A method for stochastic optimization[END_REF] as optimizer.

7.4.2/ RESULTS

The first goal of this chapter is to enhance the data received to the edge/gateway using the proposed deep learning method. This dissertation considers IoT-healthcare applications context. Thus, medical data such as electrocardiogram (ECG) and photoplethysmogram (PPG) are used. The motivation behind the use of medical data is the importance of the quality of these data for analyzing and extracting meaningful information. That is, a high compression ratio applied to medical data may make the analysis unfeasible. This section shows how the proposed deep learning technique changes the quality of the reconstructed data from unacceptable to acceptable.

The ECG dataset used is the ECG-ID Database that was published in Physionet [START_REF] Al | physiotoolkit, and physionet: Components of a new research resource for complex physiologic signals[END_REF] and originally proposed in [START_REF]Biometric human identification based on electrocardiogram[END_REF]. The PPG dataset was recorded in the Femto-ST laboratory department DISC, Belfort, France, using Shimmer3 GSR+Unit [237]. Note that these datasets were introduced and used in Chapter 5. The computations were performed on a NVIDIA Tesla Titan X GPU to train the NN on these datasets.

Enhanced PPG signal

7.5/ PPG ARTIFACTS FILTERING

This section presents a PPG data augmentation approach and then discusses the proposed DNN model that allows the filtering of the artifacts in a PPG signal.

7.5.1/ DATA AUGMENTATION

The approach to data augmentation used in this section is to apply various types of noise to the existing time series. The purpose of data augmentation is to prevent overfitting and enhance a deep learning model's generalization ability. Different approaches to data augmentation were proposed in the literature such as in [START_REF] Um | Data augmentation of wearable sensor data for parkinson's disease monitoring using convolutional neural networks[END_REF]. While working with medical signals such as PPG, the main challenge is to ensure that the signal produced follows the temporal order of samples and the original signal form/shape. In other words, the peaks should still be easy to detect and the time between two consecutive peaks should stay the same so that the same features can be derived from the newly generated data as from the original data.

7.5.1.1/ GAUSSIAN AND UNIFORM NOISE

Uniform noise has a flat distribution which ranges between 0 and 1, which means that it is equally likely to draw all values between 0 and 1. Normally distributed noise, or Gaussian noise, has a zero-centered "bell-curve" distribution, with most values clustered to zero.

Through adding and multiplying by some constants, the distribution of both uniform and Gaussian noises can be shifted and stretched. Such constants are carefully selected to keep the produced signal analyzable and meaningful and their values depend on the application and the available data.

These two types of noise are referred to as "white noise" since they have a flat power spectrum.

7.5.1.2/ SCALING AND MAGNITUDE-WARPING

The scaling approach adjusts the magnitude of the data in a batch by multiplying by a random scalar, while magnitude-warping adjusts the magnitude of each sample in this batch by convolving the data with a smooth curve that varies around one. These two approaches were inspired from the work proposed in [START_REF] Um | Data augmentation of wearable sensor data for parkinson's disease monitoring using convolutional neural networks[END_REF]. The results of applying scaling and magnitude-warping to a PPG time series are shown in Figure 7.6.

7.5.1.3/ PINK AND BROWNIAN NOISE

Pink noise, also known as fractal noise or 1 f noise, has a power spectrum that decreases as the frequency increases. Pink noise is weighted toward low frequencies, as its power decreases like 1 f . The application of a vanishing frequency filter is one way to compute pink noise [START_REF] Cohen | Fundamentals of Time-Frequency Analyses in Matlab/Octave[END_REF]. Brownian noise further lowers the higher frequencies than the pink noise. It is also known as random walk noise and is calculated by integrating random noise that is normally distributed. Brownian noise has memory, which means that its past values influence each time point. Figure 7.7 shows the results of adding pink and brownian noise to a PPG time series. Although the shape of the time series has been affected, it is still possible to extract the relevant features. The first problem of dealing with long sequences is the very long time required to train the model. Additionally, the back propagation through long input sequences can lead to vanishing gradients and, in turn, an unlearnable model. The first step in this section's proposed solution is to address the issue of long input sequences. Note that the goal is to check that a PPG data window is clean or contains artifacts, and that window can contain hundreds to thousands of data points. The approach taken is sequences summarization using the discrete wavelet transform (DWT). In natural language processing where input sequences are words, summarizing sequences were used, it might be possible to eliminate all words from input sequences above a defined word frequency. Instead of removing samples from the data, the use of the DWT will introduce a more compact version of the signal to the neural network. It can be viewed as a summary of the original signal with fewer data points. For example, if we take a PPG signal with length of 312 as shown in Figure 7.8, applying one-level decomposition will result in a set of 156 approximation coefficients and 156 detail coefficients. Then another decomposition can be applied to the approximations obtained, resulting in 78 approximation and detail coefficients. The model will then be trained on the approximation coefficients and the details will be discarded. As a result, the speed of the learning could be improved and the problem of the vanishing gradient avoided. The proposed architecture takes as inputs a fixed-length vector with shape < S , T, 1 >, where S is the number of data windows in a mini-batch, and T is the number of samples in each data window. Note that the data are standardized before being initialized to the model. The encoder part is made up of a 1D convolution layer with a kernel size of 5 and 320 feature maps, followed by a 1D max pooling layer with a pool size of 4 and a dropout layer with a rate of 40%. The output of the convolution layer is then flattened and fed into a bidirectional LSTM layer with 256 units followed by a second dropout layer.

The decoder part consists of a LSTM layer with 192 units followed by a Gaussian noise layer for regularization and a time distributed dense layer. The linear activation function has been used for the output dense layer and ReLu [START_REF] Nair | Rectified linear units improve restricted boltzmann machines[END_REF] for the convolution and LSTM layers. Additionaly, the He normal initialization [START_REF] He | Delving deep into rectifiers: Surpassing human-level performance on imagenet classification[END_REF] was used for weights initialization, 114CHAPTER 7. DEEP LEARNING FOR TIME SERIES RECONSTRUCTION AND ARTIFACTS FILTERING the mean squared error was used as a loss function, and Adam [START_REF] Kingma | A method for stochastic optimization[END_REF] as optimizer with gradient clipping to avoid exploding gradients. In the experimentation two strategies are considered. The first is to use PPG recording windows of 3 seconds (F s × 3 = 156 samples), so the model's input will be a tensor of shape < S , 156, 1 >. The second strategy is the proposed one, which takes larger PPG recording windows of 6 seconds (312 samples) and then applies two-level decomposition on these windows to reduce their length. As a result, the model's input will be a tensor of shape < S , 78, 1 >. The data augmentation process has been applied to the second strategy only in order to assess its advantage on the final output. The computations were performed on a NVIDIA Tesla Titan X GPU.

In order to determine what benefit training the model on wavelet approximations and augmenting the data give compared to the standard approach, we used the Precision vs.

Recall and Receiver Operating Characteristic (ROC) curves. The ROC curve illustrates the trade-off between the true positive rate and the false positive rate for a model using different thresholds. Precision vs. Recall curve illustrates the trade-off between the true positive rate and the positive predictions for a model using different thresholds. Note that high precision is associated with a low false positive rate and high recall is associated with a low false negative rate. The thresholds in the curves are the autoencoder reconstruction error and the desired outcome is a model with high scores for both metrics (high precision and high recall). Figure 7.10 shows that a better balance between recall and precision could be achieved by the proposed approach. If the model is trained on three seconds PPG windows with no data augmentation, the model will have a precision of less than 0.4 in order to achieve a recall greater than 0.9 while the model was able to have a precision of 0.9 with a Given the advancements in wearables and the capability of most modern smartwatches to capture PPG data, in addition to PPG's importance in stress detection, PPG's analysis and processing is of considerable importance. Before training the model, two major steps were taken that helped to achieve better results. First, a data summarization step was applied to the input data through the discrete wavelet transform to reduce the length of the sequences and avoid vanishing gradients. As a result, summarizing large windows can still allow the model to learn the same patterns while processing less data points, the model can better learn patterns from larger data windows than small ones.

8.1/ INTRODUCTION

Efficient real-time edge analytics covers numerous functionalities in data mining, such as classification, clustering, outlier detection, time series analysis and association analysis, and has recently been attracting many researchers [START_REF] Harth | Predictive intelligence to the edge: impact on edge analytics[END_REF]. Many of the data collected from IoT-healthcare and Industrial IoT (IIOT) applications have been gathered over the course of time, constituting a time series. Time Series Classification (TSC) has been used to solve recognition tasks in different areas, from healthcare to science and industry. These tasks include signature verification, driver guidance, activity recognition, cardiovascular disease detection, and neurological disorders [START_REF] Kurbalija | Time-series analysis in the medical domain: A study of tacrolimus administration and influence on kidney graft function[END_REF][START_REF] Florido | Detecting precursory patterns to enhance earthquake prediction in chile[END_REF][START_REF] Tervonen | A review of the cognitive capabilities and data analysis issues of the future industrial internet-ofthings[END_REF]. With the development of the [START_REF] Bagnall | Time-series classification with cote: The collective of transformation-based ensembles[END_REF][START_REF] Bagnall | The great time series classification bake off: An experimental evaluation of recently proposed algorithms[END_REF].

On the other hand, deep learning has offered significant neural architectures that are designed to address the particular structural features of image and language data. For instance, convolutional neural networks (CNNs) are built to take advantage of two-or three-dimensional image structures, whereas most language models use recurrent neural networks (RNNs) that embrace sequence and memory naturally found in both spoken and written languages. Such recent technologies were also extended to areas where classical machine learning has historically dominated. Time Series Classification (TSC) is one such field.

End-to-end deep learning approach to time series classification has proved to be effective in recent years [START_REF] Fawaz | Deep learning for time series classification: a review[END_REF]. This approach consists in learning the hidden features from raw time series using non-linear transformations without the need for extensive feature engineering. Different architectures have been proposed in the literature that are based on Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Multi Layer Perceptron (MLP), and Echo State Network [START_REF] Wang | Time series classification from scratch with deep neural networks: A strong baseline[END_REF][START_REF] Fawaz | Deep learning for time series classification: a review[END_REF]. This chapter proposes a Deep Neural Network (DNN) model that is based on the densely connected convolutional network, namely DenseNet, and the Long Short-Term Memory (LSTM) RNN. Note that the objective of this chapter is not to compare the proposed deep learning model with classifiers in different categories (distance-based, feature-based, ensemble, etc.), but rather to show that DenseNets are candidates which should be taken into account when choosing a deep learning architecture for TSC. Note that when processing time series, DenseNets can be used in a stand-alone way, or combined with LSTMs and the work of this chapter will consider both strategies.

8.2/ BACKGROUND

This section provides a reminder from Time Series Classification (TSC) perspective on CNNs and RNNs, as most of the proposed TSC models are based on convolution blocks and LSTM units.

8.2.1/ CONVOLUTIONAL NEURAL NETWORKS FOR TSC

Normally, CNNs are used to analyze image data. With multidimensional data, such as images and MTS in our case, this kind of network scales well. A CNN is a feed forward network consisting of many layers including convolutional filters with Batch Normalization (BN) [START_REF] Ioffe | Batch normalization: Accelerating deep network training by reducing internal covariate shift[END_REF] and layers for rectification and pooling. A CNN typically adopts one or more fully-connected layers after the last pooling layer in order to convert 2-D feature maps into a 1-D vector to allow for final classification.

CNNs have proven to be effective in solving computer vision issues, including achieving state-of-the-art results on tasks such as image classification and captioning, object localization and more. This is done by working directly on raw data such as raw pixel values instead of on manually derived features extracted from the raw data. In order to solve the addressed problem, the model learns how to automatically extract the useful features from the raw data. This type of learning is referred to as representation learning, and the CNN does this in a way that extracts the features regardless of how they appear in the data. CNNs' ability to learn and derive features automatically from raw input data can be extended to TSC problems. A series of observations can be viewed as an image that can be read and transformed into the most salient elements by a CNN model. In this case, a convolution can be seen as applying and sliding a one-dimensional filter over the time series to perform a non-linear transformation.

8.2.2/ RECURRENT NEURAL NETWORKS FOR TSC

Recurrent neural networks such as the Long Short-Term Memory Network (LSTM) provide the explicit handling of order between the input samples while learning a mapping function from inputs to outputs that CNNs do not provide. Typically, RNNs are used with training samples that have clear interdependencies and relevant representation to hold information about what happened in previous time steps. In other words, these models are providing output by leveraging two input sources, the current and the recent past.

RNNs suffer from the so-called long-term dependencies problem. This means that when attempting to link previous information to a present task they can not reach far previous memory. LSTM networks can be effective for TSC problems because they can overcome 122CHAPTER 8. USING DENSENET FOR IOT MULTIVARIATE TIME SERIES CLASSIFICATION the long-term dependencies issue by incorporating weights and gates [4], and they have the ability to learn long-term associations in a sequence. LSTM networks do not require a pre-specified time window and are able to model complex multivariate sequences accurately. However, even if an LSTM is expected to capture the long-term dependencies better than the RNN, it appears to become forgetful. This issue is tackled by Bahdanau et al in [START_REF] Bahdanau | Neural machine translation by jointly learning to align and translate[END_REF]. Bahdanau et al proposed the attention mechanism to address the long-term dependencies problem in neural-based machine translation of texts. The goal was to assign some of the input words more significance compared to others while the sentence was being translated. The authors have done this simply by building a context vector and taking a weighted sum of the hidden states. The core idea is an attempt to mimic the human brain by selectively concentrating on a few relevant things, while ignoring others.

The authors in [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF] detail the use of the attention mechanism for TSC.

8.3/ RELATED WORK

Different neural network architectures for multivariate TSC were proposed in the literature. In the following we will present the most effective architectures based on the results obtained on the TSC benchmarks, namely the UCR/UEA archive [START_REF] Chen | The ucr time series classification archive[END_REF][START_REF] Bagnall | The great time series classification bake off: An experimental evaluation of recently proposed algorithms[END_REF] and the MTS archive [START_REF] Baydogan | Mustafa baydogan -multivariate time series classification data sets[END_REF], in addition to the conclusions derived from detailed surveys [START_REF] Wang | Time series classification from scratch with deep neural networks: A strong baseline[END_REF][START_REF] Fawaz | Deep learning for time series classification: a review[END_REF].

The Fully Convolutional Networks (FCNs) were originally proposed for segmentation tasks [START_REF] Long | Fully convolutional networks for semantic segmentation[END_REF][START_REF] Lea | Temporal convolutional networks for action segmentation and detection[END_REF] and are very effective in extracting features from input data. The FCN used for TSC is formed by stacking three blocks, each consisting of a convolutional layer with filters, preceded by a batch normalization layer and a ReLU activation layer as shown in Figure 8.1-a. Then a global average pooling layer is applied to the features after the first three convolutional blocks, effectively reducing the number of weights. Finally, the softmax layer produces the final output.

The Residual Network (ResNet) is a deep architecture used for TSC. There are many variants. The version presented in Figure 8.1-b consists of 9 convolutional layers followed by global average pooling and softmax layers. This architecture uses shortcut connections between successive convolutional layers for training and adds linear shortcuts to connect a residual block's output to its input thus resulting in an easier training.

The authors in [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF] proposed the Multivariate LSTM Fully Convolutional Network (MLSTM-FCN). This proposed architecture has yielded so far the best results on the multivariate UEA archive. The MLSTM-FCN model, as shown in Figure 8.1-c, consists of a fully convolutional block and a LSTM block. The input multivariate time series is transferred into a shuffle layer and subsequently passing it into a LSTM block with attention mechanism followed by dropout. The attention LSTM layer output is concatenated with An interesting approach used by the authors is the addition of the squeeze and excite block proposed and detailed in [START_REF] Hu | Squeeze-and-excitation networks[END_REF] after each convolutional block, thus enhancing the The Densely Connected Convolutional Networks (DenseNet) was proposed in [START_REF] Huang | Densely connected convolutional networks[END_REF]. The proposed architecture attempts to solve the problem of vanishing gradient by introducing connection from one layer to all its consequent layers in a feed forward manner. The authors in [START_REF] Richard | Densenets for time series classification: towards automation of time series pre-processing with cnns[END_REF] adapted the DenseNet architecture for univariate TSC. The motivation behind using DenseNet for time series is that this architecture facilitates the propagation of features and enables feature reuse, which greatly reduces the number of parameters.

However, the main objective of the work in [START_REF] Richard | Densenets for time series classification: towards automation of time series pre-processing with cnns[END_REF] is to study the normalization techniques used with DenseNet and not to compare its performance with the state of the art DNN techniques used for TSC.

The rest of this chapter introduces an adapted version of DenseNet for the processing of multivariate time series (Figure 8.1-d), and a new architecture inspired by the work described in [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF] in which the DenseNet is used with LSTM. Notice that the authors in [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF] referred to their architecture as MALSTM-FCN, where they use the attention mechanism with LSTM. We will refer to this architecture in this work as MLSTM-FCN.

8.4/ PROPOSED MODELS

This section presents the two DNN models considered in this work. Similarly to [START_REF] Richard | Densenets for time series classification: towards automation of time series pre-processing with cnns[END_REF], the first model is an adapted version of the DenseNet for multivariate time series, and is illustrated in Figure 8.2. It takes a signal input of size (m, n) where m is the number of timesteps and n the number of features. The input goes first through a 1D convolution layer with a kernel size of 3 then through two dense blocks and a global pooling step. Each dense block consists of four convolution steps. Each step applies four operations, namely batch normalization, ReLU activation, squeeze and excite operation inspired from [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF] as well as a 1D convolution with kernel size of 3. The number of filters is initialized to 32 and incremented by 16 after each step. It may be noticed that, after each step, the number of parameters in each dense block increases by more than 16. This is due to the concatenation operation, where features of the k th layer are concatenated with features of previous layers and are provided as input to the next layer. Between both dense blocks, a down-sampling layer that reduces the size of feature maps is used. This layer is referred to as the transition layer and it applies batch normalization, ReLU activation, 1D convolution with kernel size 1 and 1D average pooling with pooling size 2 to the input. The last dense block's output is passed through batch normalization, ReLU activation, 1D global average pooling, and softmax.

The second model uses the same DenseNet architecture of the first, and adds more complexity to it. It is illustrated in Figure 6 in [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF]. As shown in Figure 8.3, a signal input of size (m, n) is fed to the previously described dense architecture, in addition to a LSTM layer with 8 units and an attention mechanism followed by a dropout operation. The number of units has been chosen based on the results achieved in [START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF]. Note that the temporal dimension of the input is shuffled before being fed to the LSTM layer when the number of timesteps is greater than the number of features. Given that the number of timesteps m is usually greater than the number of features n in a time series, the LSTM will involve n timesteps to handle m features, which is more efficient, when shuffling the dimension and providing the LSTM an input of dimension (n, m). The output of the attention LSTM layer is then concatenated 126CHAPTER 8. USING DENSENET FOR IOT MULTIVARIATE TIME SERIES CLASSIFICATION with the output of the global pooling layer of the DenseNet block and passed through a softmax layer. Both models use the variant of stochastic gradient descent 'Adam' [START_REF] Kingma | A method for stochastic optimization[END_REF] with a learning rate of 0.001 as optimizer1 .

8.5/ EXPERIMENTS

In this work we use the Keras library [114] with the Tensorflow backend [START_REF] Abadi | TensorFlow: Large-scale machine learning on heterogeneous systems[END_REF] to train the aforementioned models. In the experiments of this section, 15 datasets coming from [START_REF] Li | Action recognition based on a bag of 3d points[END_REF][START_REF] Dua | UCI machine learning repository[END_REF][START_REF] Baydogan | Mustafa baydogan -multivariate time series classification data sets[END_REF] are used. Note that the authors in previous works have made their experiments on more datasets, such as in [START_REF] Fawaz | Deep learning for time series classification: a review[END_REF][START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF]. The previously proposed models were able to achieve very high accuracy on multiple datasets, ranging from 95% to 100%. Such datasets are omitted in our experiments where very high accuracy is reached by most of the DNN models, since the features in these datasets can be easily learned by a simple classifier and there is nothing to improve. The computations were performed on an NVIDIA Tesla Titan X GPU to train the models on these datasets.

A DNN model's input is a tensor with shape (s, m, n), where s is the number of samples, m is the length of each sample's time series (or number of timesteps), and n is the number of features. The samples of each dataset are already divided into train and test sets.

Hyperparameters such as the number of epochs and batch size are specified for each dataset, and the option of standardizing the numerical features to have a mean 0 and unit variance using standard scalar is based on the numerical ranges of the features and the various empirical tests performed. Table 8.1 shows the properties and parameters used for each dataset.

The accuracy metric was used to evaluate the performance of the five DNN models discussed in this section, namely FCN, ResNet, MLSTM-FCN and the two models described in section IV: DenseNet and MLSTM-DenseNet. Important to note that the accuracy value achieved in the experiments by the state-of-the-art models may vary from the one achieved in the original papers, and this is due to the change in the hyperparameters, and the standardization of some datasets in addition to the stochastic nature of deep learning algorithms. Though, we assured that all models are trained and evaluated on each dataset with the same settings and conditions. Table 8. For future work, we intend to perform further experiments and compare the models with regard to other metrics than the accuracy such as using the mean per-class error, training and prediction time and the complexity of the models. Another important task to be considered in the future is to present an interpretable feedback highlighting the reason for a certain decision taken by the classifier using Class Activation Map as discussed in [START_REF] Fawaz | Deep learning for time series classification: a review[END_REF].

Moreover, we intend to better understand why the proposed model does not match the FCN and ResNet performance on the Uwave dataset. In this thesis, data collection as well as data processing and analysis approaches for wireless body sensor networks and IoT-healthcare have been proposed in order to ensure efficient health monitoring. This dissertation is composed of two parts: the first part covers the scientific background of Iot-healthcare, whereas the second one presents the contributions that have been made in this thesis.

The first part began by presenting some of the Iot-healthcare applications, such as mobile health, ambient assisted living and elderly monitoring, smart medical implants, and detection of stress and mental overload. Then, the data collection, data integration, big data, unobtrusiveness, interoperability, and privacy issues that need to be addressed in such applications are discussed.

Second, the wireless body sensor network and the consumer health wearables technologies are discussed. The major mechanisms of energy-efficient communication, sensing, and processing were presented. Given that the first major goal of this thesis is energyefficiency with data compression, various practical approaches to IoT data compression have been presented. the results showed that it was able to enhance the compressed data after reconstruction, thus fixing the shape of the signal and the allowing the features to be extracted more accurately.

In this thesis, special attention was given to the application of stress detection. Today most commercial smartwatch will collect PPG data. Given the amount of features that can be derived from this type of data, PPG data will open up various possible medical applications. One of the significant applications that can benefit from PPG is stress de- We believe that the solutions proposed in this thesis for various challenges in the phases of data collection and analysis in an IoT-healthcare application can serve as additional and efficient solution choices or tools to address the above-mentioned challenges in healthcare.

9.2/ PERSPECTIVES

There are many perspectives to consider in a environment that grows constantly and has immense potential to impact the lives of people. The key focus of this thesis was to suggest solutions for IoT-healthcare applications where the data obtained are physiological time series. Multiple different approaches should be considered for future research such as considering the Generative Adversarial Networks for data augmentation, and further exploiting deep learning on the mobile and edge.

Generative Adversarial Networks (GANs) have demonstrated significant success as a framework for training models to produce realistic data. A GAN is informally defined as an iterative game played between a discriminator and a generator; while the objective of the discriminator is to reduce its loss by learning to recognize real data as real and fake data as fake, the aim of the generator is to reduce its loss by learning to fool the discriminator by converting random noise into fake data.

As already stated, the work of this thesis generally focused on time series data and In recent years, Internet of Things (IoT) technology has gained tremendous attention for its ability to relieve the burden on healthcare caused by an aging population and the increase in chronic disease. Cette th èse se focalise principalement sur la collecte de donn ées ainsi que sur les approches de traitement et d'analyse des donn ées pour les r éseaux de capteurs corporels sans fil et les syst èmes de soins de sant é IoT. Dans cet ordre d'id ées, deux axes principaux ont ét é consid ér és, à savoir le processus de collecte de donn ées d'une application IoT-sant é et l'analyse et le traitement des donn ées au niveau de la p ériph érie (edge). Le premier axe aborde l'efficacit é énerg étique et le probl ème de trouver un compromis entre le taux de compression et les performances de classification. Le deuxi ème axe étudie l'utilisation des techniques d'apprentissage en profondeur pour r ésoudre de nombreux d éfis, tels que la reconstruction, l'am élioration et la classification de s éries temporelles physiologiques.

  Consumption, Data compression, Digital signal processing, Internet of Things, Health informatics, Stress detection, Physiological signals, Time series classification, Deep learning, Data enhancement. 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.1 Convolutional neural networks for TSC . . . . . . . . . . . . . . . . . 8.2.2 Recurrent neural networks for TSC . . . . . . . . . . . . . . . . . . . 8.3 Related work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4 Proposed models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv CONTENTS IV Conclusion & Perspectives 129

5 .

 5 Finally, we tackle the multivariate time series classification task. Nowadays, most Internet of Things (IoT) devices collect multiple features and produce multivariate time series. In an IoT application, the mining and classification of the collected data have become crucial tasks. This study examines the use of the DenseNet architecture for the classification of multivariate time series, originally proposed for computer vision applications. More specifically, we are proposing a hybrid LSTM-DenseNet model that can achieve and surpass the performance of the state-of-the-art models in many situations, based on the results obtained from various experiments on 15 benchmark datasets. Thus, we suggest the 1D DenseNet as a potential tool to be considered by machine learning engineers and data scientists for IoT time series classification task. 1.4/ DISSERTATION OUTLINE The rest of this dissertation is organized as follow: Chapter 2 discusses the scientific background of IoT in healthcare. Chapter 3 presents the wireless body sensor network and consumer health wearables technologies. Chapter 4 examines the different workflows of classic machine learning and deep learning approaches for IoT-healthcare. Chapter 5 presents the first contribution of this dissertation, namely an energy efficient approach for IoT data collection and analysis. Chapter 6 investigates the effect of lossy compression techniques on the time series classification task using deep neural networks. Chapter 7 resolves the limitations of the contribution presented in Chapter 5 by offering deep learning solutions to two different problems encountered in IoT-healthcare. Chapter 8 addresses the time series classification task and proposes a novel deep learning model that is able to achieve the performance of the state-of-the-art models and surpass them in many situations. Chapter 9 concludes the work that has been done in this thesis. II IOT IN HEALTHCARE: FROM DATA COLLECTION TO ARTIFICIAL INTELLIGENCE 13 This part examines the scientific background of IoT in healthcare by discussing the recent advances in this area and the numerous challenges faced by healthcare applications.

Figure 3 .

 3 Figure 3.1: Wireless Body Sensor Network architecture

4. 2 . 5 /•

 25 TIME SERIES AND SEQUENTIAL DATA Time series consist of various types of physiological data obtained from WBSNs or wearables. The points in time are usually similarly spaced. Measurement frequency depends on the type of the data and its applications. To make sense of the collected physiological time series, stochastic signal analysis techniques in combination with conventional machine learning classifiers can be used for accurate classification and modeling. Various hand-engineering feature methods can be used to extract features from signals and be able to accomplish numerous tasks such as classification of ECG signals, prediction of seizures from EEG signals, and identification of patients with neuropathy from EMG signals. Fourier and Wavelet Transforms: A Fourier Transform converts a signal into its frequency domain equivalent, and the Fast Fourier Transform (FFT) algorithm easily calculates these transformations by factorizing the Discrete Fourier Transform (DFT) matrix into a product of sparse variables, including frequency data such as magnitude, amplitude, phase, power density and other calculation results. Those extracted features may be used as classification features 1 [33]. Wavelet transform is another common time-frequency transformation method for features extraction. Wavelet transform is designed to tackle the non-stationary signal problem. It involves the representation of a time function in terms of simple, fixed building blocks, called wavelets. The Discrete Wavelet Transform (DWT) has been used as a feature extraction mechanism, as it has been shown to efficiently solve health-related classification problems [138]. • Principal Component Analysis (PCA): PCA is a statistical method that uses an orthogonal transformation to map a set of observations of possible correlated variables into a collection of values of linearly uncorrelated variables called principal components. Generally PCA is considered a technique for data reduction. A property of PCA is that the number of dimensions or key components in the transformed

4. 2

 2 .6/ ANOMALY DETECTION The problem of finding items or patterns in a dataset that do not correspond to other items or an anticipated pattern is called anomaly detection. Medical and public health administration are key applications for anomaly detection. There are three major types of anomaly detection techniques, based on the degree of available labels. A binary (abnormal and normal) dataset is given in supervised anomaly detection techniques, then a binary classifier is trained. The issue of unbalanced data resulting from having few data points with an abnormal label remains a challenge to address. Semi-supervised anomaly detection techniques involve a training set of only normal data points. Unsupervised anomaly detection methods deal with unlabeled dataset by assuming that most data points are normal. One-class support vector machine is an example of an anomaly detection technique that can be used in an unsupervised manner to solve various tasks including medical diagnosis[START_REF] Amer | Enhancing one-class support vector machines for unsupervised anomaly detection[END_REF].

Figure 4 .

 4 1 illustrates the different workflows of classic machine learning and deep learning approaches. Every block in the deep learning workflow gradually extracts the input features and then processes data from the previous blocks, which have already been processed, extracting more abstract data features and thereby building up the hierarchical representation of data. Deep learning techniques can be divided into supervised learning techniques such as Convolutional Neural Network (CNN)[5] and Recurrent Neural Network (RNN)[START_REF] Williams | A learning algorithm for continually running fully recurrent neural networks[END_REF], and unsupervised or semi-supervised techniques such as deep

Figure 4 .

 4 2 summarizes the different applications of deep learning by areas in health informatics.

Figure 4 . 1 :

 41 Figure 4.1: Flowcharts showing the different parts of classic machine learning and deep learning approaches. Shaded boxes indicate components that are able to learn from data.

4. 3

 3 .2/ MEDICAL IMAGING Deep learning techniques are used in medical image processing to efficiently and effectively extract information from medical images which are obtained using various imaging modalities such as magnetic resonance imaging (MRI). Such techniques provide essential functional and anatomical details about different body organs, and play a crucial role in detecting/locating and diagnosing anomalies. Deep learning applications for medical imaging range from improving poor medical images with convolutional autoen-

Figure 4 . 2 :

 42 Figure 4.2: Summary of the different deep learning applications by areas in health informatics.

4. 4

 4 .2/ ETHICAL ISSUES Ethics has always been part of assessing new technologies, including computer science in IoT-healthcare. The first ethical challenge is the inability to give human feelings and painlessness a value or number. A cost function is used by many machine learning models for training. What is the cost function in these cases? Will it be based on decreasing costs, and increasing outcomes and quality? or decreasing pain and emotional turmoil?

  issue is an example of a classification task where the distribution of samples is not equal across known classes. Distribution can range from a slight bias to an extreme disparity where there is one example for hundreds, or thousands of examples in the majority class.Imbalanced classifications present a challenge for the predictive models because most of the machine learning techniques used for classification assume an equivalent number of examples for each class. This results in low prediction performance, especially for minority classes that are extremely important in healthcare applications. Other limitations are the presence of noise in physiological time series due to sensors misplacement or sensitivity to motion. In addition, patient data collection is often costly and time-consuming for doctors, it is important to have a classifier that can accurately identify a health threat with fairly low amount of training data about the patients.4.5/ CONCLUSIONThe different approaches for machine learning and deep learning for IoT-Healthcare have been discussed. While the multiple success of machine learning in different healthcare fields has been achieved, deep learning provides more potential success when it comes to medical imaging, text messages, and a vast amount of physiological data. A pipeline of layer by layer results in an efficient high-level abstraction of the raw data or images.

Figure 5 . 1 :

 51 Figure 5.1: IoT network architecture

  scheme and the Differential Pulse Code Modulation (DPCM). The aforementioned data reduction techniques, in addition to many others proposed in the literature, perform well on stationary univariate time series. However, an important number of IoT devices nowadays include more than one sensor and are able to collect multiple features. Therefore, data reduction techniques that work efficiently on multivariate time series are required.

2

 2 Adapted SZ steps Require: input (1-D array), E (error bound),M (num rows),N (num columns) Ensure: output (binary array) 1: Bestfit Curve-Fitting Compression 2: Compressing Unpredictable Data The second step of the compression process consists of compressing the 1-D array using adaptive curve-fitting models. The bestfit step employs three prediction models: Preceding Neighbor Fitting (PNF), Linear-Curve Fitting (LCF), and Quadratic-Curve Fitting (QCF). PNF attempts to predict each data point by using the previous data point value. LCF predicts each data point by fitting a line with the previous two consecutive data points, and QCF by fitting a curve with the previous three consecutive values. The adopted model is the one that yields the closest approximation. The estimated data point is replaced by a two-bit code specifying the type of the prediction model. In the case when none of the prediction models in the curve-fitting step satisfies the error bound, the data point is marked as unpredictable and is then encoded by analyzing the IEEE 754 binary representation. (Algorithm 2, line 2). Finally, lossless compression is conducted using algorithms such as Huffman encoding and LZ77.

Figure 5 . 2 :

 52 Figure 5.2: Driving task.

Figure 5 .

 5 Figure 5.3 shows the FFNN architecture used in the classification task. The neural network consists of 17 input neurons, corresponding to a sequence of 17 physiological features. Additionally, the neural network is provided with a correct label of that sequence.

Figure 5 . 3 :

 53 Figure 5.3: Feed Forward Neural Network.

Figure 5 . 4 :

 54 Figure 5.4: Captures of the materials used for measuring the effect of data compression on energy consumption and processing/transmission time.

5. 6

 6 .1/ DATA REDUCTION This section shows the results obtained after compressing different batches of ECG and PPG data using SZ with three different error boundaries: 10 -1 , 10 -2 , and 10 -3 . The ECG and PPG batches used in this section come from the ECG-ID dataset and the locallycollected PPG dataset respectively. Note that using SZ with an error bound e means that the decompressed data points d are within the range [de, d + e].

Figure 5 . 5 : 9 Table 5 . 3 :

 55953 Figure 5.5: Compression of 10000 bytes of ECG and PPG data using SZ with different absolute error bound values over 80 periods.

Figure 5 . 6 :

 56 Figure 5.6: Comparing the time needed to transmit data and the time needed to compress and transmit data in ms.

Figure 5 . 7 :

 57 Figure 5.7: Amounts of energy consumption in mWH for original data transmission, compressed data transmission, and compression after 2500 cycles.

Figure 5 .

 5 Figure 5.7 shows that the energy required to perform 2500 transmissions of 10240, 20480, 30720, and 40960 bytes of floating points data is around 13, 24, 33 and 43 mWH respectively. On the other hand, the energy required to compress and transmit 10240, 20480, 30720, and 40960 bytes of floating points data 2500 times is around 8, 12, 15, and 18 mWH respectively. It can be noted that the energy needed to transmit the compressed data remains stable (5 mWH) with the increase in data size while the processing energy increases slightly with the size of the data.

Figure 5 . 8 :

 58 Figure 5.8: The effect of SF and data size on the energy consumption.

Figure 5 .

 5 Figure 5.9 describes the change of the wearable battery level over 241 periods for five different scenarios:

Figure 5 . 9 :

 59 Figure 5.9: Polar M600 battery level over 241 periods.

  . The time series collected from IoT applications are transferred to the edge or cloud for processing. Time Series Classification (TSC) is a major and challenging problem for mining received data. TSC research have found a large number of potential applications in areas such as finance, healthcare, and industry. Deep Neural Networks (DNNs) are among the promising techniques used recently for TSC [201]. The main advantage of end-to-end DNN models over state-of-theart approaches is their lack of heavy preprocessing on raw data. In an IoT Big Data architecture, time series data pass through different phases. An example of IoT Big Data architecture can be composed of four layers as shown in Figure 6.1 [159]. In the first layer, time series data are generated from different IoT sources and then collected and compressed prior to transmission. The second layer provides communication between IoT devices and gateways using different communication tech-

Figure 6 . 1 :

 61 Figure 6.1: Example of IoT Big Data architecture.

Figure 6 . 2 :

 62 Figure 6.2: The network structure of FCN and ResNet tested in [164].

80CHAPTER 6 .

 6 Figure 6.3: The network structure of LSTM-FCN and GRU-FCN proposed in[START_REF] Karim | Lstm fully convolutional networks for time series classification[END_REF] and[START_REF] Elsayed | Deep gated recurrent and convolutional network hybrid model for univariate time series classification[END_REF] respectively.

Figure 6 . 4 :

 64 Figure 6.4: Discrete Wavelet Transform frequency portions of signal.

Figure 6 .Figure 6 . 5 :

 665 Figure 6.5 shows an example of two level decomposition of an ECG signal. In the first decomposition, the initial signal is divided into approximations and details. The approximations maintain the information of the initial signal, and the details contain the fast varying changes that may be regarded as noise. The second decomposition reapplies the lifting forward transform on the approximations resulting in level two approximations with fewer data points and less noise.

Figure 6 . 6 :

 66 Figure 6.6: Proposed compression scheme for IoT time series classification.

Figure 6 .

 6 7 shows the execution time in seconds of the DWT, SZ, and DWT+SZ methods written in C on a Polar M600 watch for different numbers of floating-point data. The results show that the execution time of the SZ technique is low, and the proposed technique needs around 0.02 Seconds to process 2000 data points, 0.04 Seconds to process 8200 data points, and around 0.13 Seconds to process 33000 data points.

Figure 6 . 7 :Figure 6 . 8 :

 6768 Figure 6.7: Execution time in seconds of the SZ, DWT, and the proposed compression scheme

Figure 6 . 9 :

 69 Figure 6.9: Accuracy vs compression ratio for different SZ error-bound values and DWT decomposition levels. The graphs correspond to Adiac and NonInvasiveFatalECG Tho-rax1 datasets.

100 • 100 •

 100100 CS40: Compressed sensing with M = N×40 DWT L2: Two level DWT decomposition using Haar wavelet 90CHAPTER 6. IOT TIME SERIES CLASSIFICATION WITH DATA COMPRESSION AND DEEP LEARNING • DWT L1: One level DWT decomposition using Haar wavelet • DWT L1 + SZ E-2: One level DWT decomposition using the lifting scheme based Haar transform followed by SZ with an absolute error bound of 10 -2

Figure 6 . 10 :Figure 6 . 11 :

 610611 Figure 6.10: Accuracy metrics achieved by the four DNN models on the compressed periodic univariate time series.

Figure 6 . 12 :

 612 Figure 6.12: Compression of [1000 × 9] batches of the HAR [72] dataset over 300 periods. Next to each compression technique is shown the average number of bytes per period alongside the standard deviation (shown in parenthesis).

  5 shows the classification accuracy achieved by the FCN on the four datasets with different input data. The results show that the model was able to learn from compressed data. The results also show that training on level-2 approximations decreased classification performance compared to training on level-1 approximations for ECG, UWave, and Wafer datasets. The model, on the other hand, learned well from the HAR dataset's level-2 approximations. The amount of training data will explain this discrepancy. The training size of the ECG, UWave, and Wafer datasets ranges from 100 to 300, while the training size of the HAR dataset is 7352, as shown in

Figure 6 .

 6 Figure 6.13 shows the wearable battery level change over 120 periods (1 period = 1 min)

Figure 6 . 13 :

 613 Figure 6.13: Polar M600 battery level over 120 periods for the four situations: Idle, Sensing, Sensing+compression+transmission, and sensing+transmission

  to the classification models, showing that deep learning models can still learn features from compressed data and attain good classification accuracy. DEEP LEARNING FOR TIME SERIES RECONSTRUCTION AND ARTIFACTS FILTERING Recently, the need for fast, cost-effective, convenient and non-invasive cardiovascular analysis techniques is the primary attractive reason to use raw physiological signals such as electrocardiogram (ECG) and photoplethysmogram (PPG). Most wearable devices on the market today, are capable of collecting PPG data and enabling the measurement of important features such as heart rate, respiration rate, and blood pressure in addition to detecting irregular pulses and cardiovascular diseases. One major drawback of these raw data is their high sensitivity to motion, resulting in distorted signal and meaningless data zones. This chapter addresses two issues: (1) Resolving the limitations discussed in Chapter 5 of using a lossy compressor with high compression ratio, namely the distorted graphical representation and the inaccurate values of the extracted features due to signal deformation. (2) Proposing a neural network-based filtering method to remove corrupted zones from the collected PPG data in an unsupervised manner. It also proposes a PPG data summarization and augmentation strategy which optimizes the network performance.

100CHAPTER 7 .

 7 DEEP LEARNING FOR TIME SERIES RECONSTRUCTION AND ARTIFACTS FILTERINGtechnique that removes the fast-varying changes, or noise, from the signal as shown in Chapter 6. The effect of data compression techniques on the data received for analysis is questionable when it comes to medical use, where the quality of the data is of great importance. The aim is not only to reduce energy consumption and data volume, but also to preserve data quality. Deep learning techniques have recently shown impressive results in extracting artifacts of compression from images. The first goal of the work done in this chapter is to apply this approach to physiological time series data in the same way by enabling better data recovery at the edge level using a 1-D convolutional autoencoder.Given the general interest of this dissertation in addressing IoT-healthcare applications based on physiological signals and the specific interest of proposing solutions for stress detection applications, a dedicated emphasis will be provided to photoplethysmography in the second part of this chapter since this signal can be provided by most wearable devices today. Wearable devices and fitness tracking applications have been introduced and used by millions of people, allowing continuous and unobtrusive tracking of an individual behavior and physiological features. One of the important signals to calculate the physiological features from these devices is the photoplethysmogram (PPG) signal. Photoplethysmography is a non-invasive optical method to monitor vital signs of the body such as heart rate, heart rate variability, and blood oxygenation. The PPG waveform represents variations in blood volume and contains important characteristics such as cycle period, baseline, and amplitude that are useful for analysis. Fortunately, wearable health monitoring devices, including smart watches and fitness trackers, can now capture PPG signals and allow cardiac activity monitoring by deriving from the PPG the same R-R intervals derived from the electrocardiogram (ECG).

  Figure 7.1: Processing two PPG signals using the HeartPy library developed in [234].

Figure 7 .

 7 Figure 7.1(b) is an area where features such as heart rate variability and heart rate can not be extracted, while those features can still be extracted with confidence if the signal contains an acceptable noise level.

  DISCRETE WAVELET TRANSFORM The Discrete Wavelet Transform (DWT) allows a signal to be represented in a timefrequency domain. It divides the signal into components of low frequency (approximations) and components of high frequency (details) by using filters as shown in Chapter 6. 104CHAPTER 7. DEEP LEARNING FOR TIME SERIES RECONSTRUCTION AND ARTIFACTS FILTERING The inspiration to use the DWT in this chapter lives in transforming redundant samples in the temporal domain into decorrelated coefficients in the time-frequency domain, enabling

7. 3

 3 .2/ AUTOENCODERS An Autoencoder (AE) is an NN which uses data driven learning to extract features from a dataset. An Autoencoder has the same number of input and output nodes, and is trained to reconstruct the input vector instead of assigning a label to it. The addition of a noise in the encoding process is a successful strategy we can use to increase the robustness of the model. Denoising Autoencoder (DAE) can be seen as a regularization technique to address the issue of having more nodes in the hidden layer than in the input layer where the AE can simply copy those values without finding any meaningful features. As illustrated in Figure7.2, the AE is trained on a randomly modified version of the input.Once the data is passed through the AE, the output is paired with the original values, not the modified values. The DAE is a stochastic version of an AE due to the stochastic corruption of the input while the uncorrupted version of the same input is used as the target for the decoding stage.

Figure 7 . 2 :

 72 Figure 7.2: Schematic illustration of a simple Denoising Autoencoder.

106CHAPTER 7 .

 7 DEEP LEARNING FOR TIME SERIES RECONSTRUCTION AND ARTIFACTS FILTERING

Figure 7 . 5 :

 75 Figure 7.5: PPG signal enhancement. An example of a compression, reconstruction and enhancement of 3000 PPG data points.

Figure 7 . 6 :

 76 Figure 7.6: Applying scaling and magnitude-warping to a PPG time series.

Figure 7 . 7 :

 77 Figure 7.7: Adding pink and brownian noise to a PPG time series.

Figure 7 . 8 :

 78 Figure 7.8: Example of the two-level decomposition of a PPG signal.

Figure 7 . 9 :

 79 Figure 7.9: Proposed neural network approach for unsupervised PPG artifacts detection using CNN-LSTM Autoencoder.

Figure 7 .

 7 Figure 7.9 illustrates the proposed approach used for unsupervised PPG artifacts detection. Note that the data augmentation described in section 7.5.1 is applied on the training set after applying the wavelet transform on the original signals and splitting the resulting approximations into training, validation and testing sets. Then the model is trained only on clean PPG signals and tested on mixed PPG signals.

Figure 7 . 13 :

 713 Figure 7.13: Four windows taken from the test set showing the prediction results obtained from the trained model.

7. 6

 6 / CONCLUSIONThe contribution in this chapter is twofold: First, a convolutional autoencoder-based deep learning model was introduced to solve the limitations discussed in Chapter 5, namely the distortion of the signals when compressed using SZ with high error-bound value. The proposed model was able to enhance the compressed data after reconstruction, thus fixing the shape of the signal and allowing the features to be extracted more accurately. Second, a deep learning model for automatic motion artifacts detection from photoplethysmography (PPG) was proposed.

Finally

  , a CNN-LSTM autoencoder architecture was proposed to detect and discard irrelevant zones in photoplethysmogram signals in order to avoid analyzing and processing meaningless data. The findings of this work show that the proposed approach to data summarization and augmentation helped to improve the performance of the neural network and was able to achieve 90% precision and 95% recall. The proposed method for PPG artifacts filtering can be generalized for various types of medical time series such as electrocardiogram (ECG) data in addition to periodic sensory data. USING DENSENET FOR IOT MULTIVARIATE TIME SERIES CLASSIFICATION Time series classification task was first discussed in Chapter 6. This chapter examines the use of the DenseNet architecture, originally proposed for computer vision applications, for the classification of multivariate time series. Nowadays, most Internet of Things (IoT) devices collect multiple features and produce multivariate time series. In an IoT application, the mining and classification of the collected data have become crucial tasks. Hybrid LSTM-fully convolutional networks (MLSTM-FCN) provide state-of-the-art classification results on multivariate time series benchmarks. We propose in this chapter a hybrid LSTM-DenseNet model that is able to achieve the performance of the state-of-the-art models and surpass them in many situations, based on the results obtained from various experiments on 15 benchmark datasets. Thus, this work suggests the 1D DenseNet as a potential tool to be considered by machine learning engineers and data scientists for IoT time series classification in healthcare applications.

120CHAPTER 8 .

 8 USING DENSENET FOR IOT MULTIVARIATE TIME SERIES CLASSIFICATIONIoT and 5G, the learning representations and the TSC become more and more relevant.A time series is a set of ordered real values. Nowadays, many of the IoT devices can collect multiple features, resulting in Multivariate Time Series (MTS). A MTS T = [t 1 , t 2 , ..., t n ] consists of n univariate time series, where t i ∈ IR L and L is the length of each time series t i . Various time series classification methods were proposed in the literature [140]. The most famous classifiers are the distance-based classifiers such as k-nearest neighbor with Dynamic Time Warping (DTW) distance and dictionary-based classifiers in which a time series is converted into representative words. An example of dictionary-based techniques is the bag-of-SFA-symbols (BOSS). Certain classifiers are shapelet-based, such as the Fast Shapelets (FS) and the Shapelet Transform (ST), and ensemble-based, such as the Collective of Transformation Ensembles (COTE), which is a combination of classifiers in different domains. The aforementioned categories and methods of classification are described in detail in

Figure 8 . 1 :

 81 Figure 8.1: The network structure of FCN, ResNet, MLSTM-FCN, and DenseNet.

124CHAPTER 8 .

 8 USING DENSENET FOR IOT MULTIVARIATE TIME SERIES CLASSIFICATION performance of the model.

Figure 8 . 3 :

 83 Figure 8.3: The adapted MLSTM-FCN architecture proposed in[START_REF] Karim | Multivariate lstm-fcns for time series classification[END_REF] where the FCN is replaced by the 1D-DenseNet. The numbers in each box denote the number of parameters at each step.

  2 shows the classification accuracy value obtained by implementing the 1D-DenseNet and MLSTM-DenseNet, and regenerating the FCN, ResNet, and MLSTM-FCN models based on their actual implementation on github. The proposed MLSTM-DenseNet model was able to outperform the other models on 8 datasets and provide the highest accuracy on 3 datasets, namely ECG, LP2, and KickvsPunch, alongside the MLSTM-FCN.

8. 6 /

 6 CONCLUSIONThe proposed MLSTM-DenseNet classification model shows that replacing the Fully Convolutional Network (FCN) with a DenseNet is a potential solution that needs to be considered for the classification of multivariate time series. The benefit of DenseNet is that every layer has direct access to the gradients from the loss function and the original input signal, resulting in an enhanced flow of information and gradients across the network, as well as a regularizing effect that decreases overfitting on tasks with limited training set sizes. Experiments have been conducted on 15 multivariate time series datasets, and the results show that the proposed approach is capable of achieving the performance of the state-of-the-art models and bypassing them in several cases. For some datasets, such as the ones in which the number of timesteps is high, the standalone 1D DenseNet outperformed the hybrid models. Considering the 1D DenseNet as a standalone model or as a replacement for FCN in the MLSTM-FCN for the classification of multivariate time series can thus help to improve classification performance.

Third, the use

  scheme based on an error-bound lossy compressor, namely Squeeze (SZ), for IoT-Edge applications in healthcare. A lightweight version of the compressor have been imple-

  tection. The biggest challenge facing these applications is the presence of corrupted zone in the signal due to motion or incorrect sensor positioning. A CNN-LSTM autoencoder architecture was proposed to detect and discard irrelevant zones in PPG signals to prevent the analysis and processing of meaningless data. The results obtained were satisfactory and and the proposed model can be expanded for different types of medical time series such as electrocardiogram (ECG) data in addition to periodic sensory data. Finally, the time series classification task has been addressed given its significance in physiological time series analysis and stress detection. Various recent time series classification models based on a deep neural network were presented in the chapters of the second part of the dissertation. In the final contribution, a deep learning model was proposed for the time series classification task based on the DenseNet architecture. The proposed MLSTM-DenseNet classification model combines the LSTM architecture with the DenseNet architecture to achieve better results on multivariate time series benchmark datasets. The results show that the proposed approach is able of achieving and, in several cases, bypassing the outcomes of the state-of-the-art models.

  particularly on physiological time series. A common problem with the considered use case of stress recognition and other medical use cases is class imbalance. This means that samples of the minority class (stress or other health-related problems) are very little in comparison with samples of the majority class (regular or stable condition). The result of such an issue biases the classification algorithms and allows for low generalization. Many traditional approaches have been used to solve the problem of class imbalances, but very few deal with time series generation. GANs have the potential to increase data and to generate realistic medical synthetic time series. Such frameworks model the processes that generate data and can help represent the first step towards the development of a new approach to predictive systems and benefit the medical community for use in training simulators.The work done in this thesis targeted applications where physiological data is gathered from IoT devices and sent for processing to an intermediate node (sink, coordinator).As smaller devices are packed with more computational power, Artificial Intelligence (AI) has become more mobile than it was before. With the introduction of AI, mobile and IoT devices have now been transformed into smart devices. Edge deep learning has recently become an interesting research field, as AI-powered device capabilities are expected to grow day by day. As addressed in this dissertation, when it comes to medical applications, the question to be asked is to what degree do the deployment of light deep learning models on the devices to perform the processing tasks in place instead of transmitting the data to the sink is more efficient? Is it more energy efficient, or is the computation energy consumption of these models high? What kinds of medical applications require that the data be processed directly on the device and do not require its transmission and storage?Personalization means modifying a system to suit the preferences of a particular individual, sometimes in relation to clusters of individuals. The state of the art research has shown, in the example of stress detection, that individual models are better suited to such application than generalized models. The deployment and study of deep learning on the edge becomes more important in such cases. Mobile and wearable device AI algorithms leverage the user-specific data available, such as the collected PPG signal, location, behavior patterns, etc. Edge deep learning is a field worth exploring and opens up potential solutions for IoT-healthcare applications. Finally the work done in this thesis opens up limitless perspectives in various research lines. One of the future works is to study applications that collect heterogeneous data and not just time series, and to develop deep learning models that can incorporate and learn from a variety of data types. Additionally, lightweight encryption algorithms can be implemented at node level to ensure secure data transmission and data anonymization should be taken into account in medical applications as well. The 7th International Conference on Ambient Systems, Networks and Technologies (ANT 2016) / The 6th International Conference on Sustainable Energy Information Technology (SEIT-2016) / Affiliated Workshops. Title: Data Compression and Deep Learning for IoT Healthcare Applications based on Physiological Signals Keywords: Energy Consumption, Data compression, Digital signal processing, Internet of Things, Stress detection, Physiological signals, Deep learning Abstract:

  Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 9.2 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

	9 Conclusion & Perspectives 9.1 LIST OF ABBREVIATIONS 131

AAL . . . . . . . Ambient Assisted Living AE . . . . . . . . AutoEncoder AI . . . . . . . . Artificial Intelligence ANN . . . . . . . Artificial Neural Network AUC . . . . . . . Area Under the Curve BLE . . . . . . . Bluetooth Low Energy BN . . . . . . . . Batch Normalization CCA . . . . . . . Canonical Correlation Analysis CNN . . . . . . . Convolutional Neural Network COTE . . . . . . Collective of Transformation Ensembles CR . . . . . . . . Compression Ratio CS . . . . . . . . Compressive Sensing DAE . . . . . . . Denoising AutoEncoder DBS . . . . . . . Deep Brain Stimulation DenseNet . . . Densely Connected Convolutional Network DFT . . . . . . . Discrete Fourier Transform DNN . . . . . . . Deep Neural Network DPCM . . . . . . Differential Pulse Code Modulation DRDNN . . . . . Deep Recurrent Denoising Neural Network DTW . . . . . . Dynamic Time Warping DWT . . . . . . . Discrete Wavelet Transform ECG . . . . . . . ElectroCardioGram EEG . . . . . . . ElectroEncephaloGram EMG . . . . . . ElectroMyoGraphy EWS . . . . . . Early Warning Score FCN . . . . . . . Fully Convolutional Network FFNN . . . . . . Feed Forward Neural Network FFT . . . . . . . Fast Fourier Transform GAN . . . . . . . Generative Adversarial Network GRU . . . . . . . Gated Recurrent Unit GSR . . . . . . . Galvanic Skin Response HPC . . . . . . . High Performance Computing HR . . . . . . . . Heart Rate ICD . . . . . . . Implantable Cardioverter Defibrillator IoT . . . . . . . . Internet of Things LSTM . . . . . . Long Short-Term Memory LTC . . . . . . . Lightweight Temporal Compression LZW . . . . . . . Lempel-Ziv-Welch MAC . . . . . . . Medium Access Control MCU . . . . . . Microcontroller mHealth . . . . Mobile Health ML . . . . . . . . Machine Learning MLP . . . . . . . Multi Layer Perceptron MRI . . . . . . . Magnetic Resonance Imaging MTS . . . . . . . Multivariate Time Series NN . . . . . . . . Neural Network PCA . . . . . . . Principal Component Analysis PLA . . . . . . . Piecewise Linear Approximations PPG . . . . . . . PhotoPlethysmoGram ResNet . . . . . Residual Network RFID . . . . . . Radio Frequency IDentification RLE . . . . . . . Run Length Encoding RMSE . . . . . . Root Mean Square Error RNN . . . . . . . Recurrent Neural Network ROC . . . . . . . Receiver Operating Characteristic RR . . . . . . . . Respiration Rate SCL . . . . . . . Skin Conductance Level SCR . . . . . . . Skin Conductance Response I DISSERTATION INTRODUCTION 1 INTRODUCTION This thesis focuses on advancing the state of the art of IoT-healthcare, with a specific focus on time series data, energy-efficient data collection and the application of deep learning methods to solve various challenges. The presented research was carried out in the Department of Informatics and Complex Systems (DISC in French) of FEMTO-ST laboratory.

Table 3 .

 3 1: Commonly used sensors in body sensor networks

	Sensors	Function	Sampling Frequency	Placement
	Accelerometer	Obtaining acceleration on each spatial axis of three-dimensional space.	High	Wearable
		Converting voice signal into electric pulse and
	Artificial cochlea	sending it to implanted electrodes in ears, generating auditory sensation by stimulating	High	Implantable
		acoustic nerves.
		Receiving pictures captured by external camera
	Artificial retina	and converting them to electric pulse signals, which are used to stimulate optic nerves to	High	Implantable
		generate visual sensations.
	Blood-pressure sensor	Measuring the peak pressure of systolic and the minimum pressure of diastolic.	Low	Wearable
	Camera pill	Detecting gastrointestinal tract by wireless endoscope technique.	High	Implantable
	Carbon dioxide sensor	Measuring the content of carbon dioxide from mixed gas by infrared technique.	Low/Very low	Wearable
	ECG/EEG/EMG sensor	Measuring voltage difference between two electrodes which are placed on surface of body.	High	Wearable
		Measuring angular velocity of rotating object
	Gyroscope	according to principle of angular momentum	High	Wearable
		conservation.
		Measuring humidity according to the changes
	Humidity sensor	of resistivity and capacitance caused by	Very low	Wearable
		humidity changes.
	Blood oxygen saturation sensor	Measuring blood oxygen saturation by passing through a thin part of body. absorption ratio of red and infrared light	Low	Wearable
	Pressure sensor	Measuring pressure value according to the piezoelectric effect of dielectric medium.	High	Wearable/ Surrounding
	Respiration sensor	Obtaining respiration parameters indirectly by chest or abdomen. detecting the expansion and contraction of	High	Wearable
	Temperature sensor	Measuring temperature according to the changes of materials physical properties.	Very low	Wearable
	Visual sensor	Capturing features of subject, including length, count, location, and area.	High/Low	Wearable/ Surrounding
	Photoplethysmogram
	(PPG)

  for IoT applications as an efficient high-ratio lossless compression technique for multivariate integer time series.If some insignificant data can be omitted in data transmission, a compression technique is said to be lossy. Many IoT applications do not require accurate signal reconstruction and further analysis can be performed on signals that are compressed with lossy techniques. One major advantage of using lossy techniques over lossless techniques in IoT applications is that the lossy compression yields higher compression ratio and helps to reduce the amount of data transmitted. Lossy compression techniques can exist in time domain such as curve fitting, fractal resampling, box car and in frequency domain such as wavelet transform, Fourier transform, and Chebyshev compression.

Table 5 .

 5 1: Features extracted from ECG signal.

	This section considers the features shown in Tables 5.1 and 5.2 in addition to heart rate

(HR) and respiration rate (RR) as a single sequence in which a label is assigned. The prediction task is a supervised sequence classification task. A FFNN is a network that contains a large number of neurons, arranged in layers: one input layer, one or more hidden layers, and one output layer.

Table 5 . 2

 52

: Features extracted from GSR signal.

Table 5 .4. Data rate Configuration bits/s Max payload size (Bytes) Time on Air (ms)

 5

	Duty Cycle
	(mm:ss)

Table 5 . 4

 54

: LoRa experimental settings.

Table 5 .

 5

						2500 ECG samples
		0.8
	Original	0.2 0.4 0.6
		0.0
		-0.2	0	500		1000	1500		2000	2500
	Compressed E-1	0.0 0.2 0.4 0.6 0.8
		-0.2	0	500		1000 # samples 1500		2000	2500
	Figure 5.10: 2500 original ECG samples vs compressed ECG samples. Dataset: Stress
	Recognition in Automobile Drivers [20]
			4	6	7	8	Driver # 9	10	11	12	16	Average
	HR		0.27 0.08 0.07 0.10 0.04 0.08 0.07 0.07 0.26 0.11
	RMSSD	1.57 1.68 1.18 0.94 1.20 2.45 3.77 2.28 2.42 1.94
	meanNN	0.91 1.24 0.24 0.23 0.25 1.02 0.30 0.70 1.09 0.66
	sdNN	0.61 1.01 0.29 0.33 0.58 1.12 1.65 0.87 1.44 0.87
	cvNN	0	0	0	0	0		0	0	0	0	0
	CVSD	0	0	0	0	0		0	0	0	0	0
	medianNN 2.19 1.4	0.67 1.34 1.01 2.08 1.74 1.06 1.63 1.45
	madNN	1.91 1.19 1.01 1.22 1.12 1.96 1.95 0.88 1.52 1.41
	mcvNN	0	0	0	0	0		0	0	0	0	0
	pNN50	1.78 2.2	1.23 1.51 1.91 1.92 2.24 1.56 1.27 1.72
	pNN20	2.52 3.63 1.70 1.95 1.93 2.39 1.80 1.92 3.38 2.35
	mean gsr	0	0	0.01 0.02 0.02 0.01 0.02 0	0	0
	mean scl	0.23 0.22 0.23 0.21 0.21 0.20 0.20 0.19 0.23 0.21
	slope scl	0.38 0.36 0.34 0.34 0.28 0.33 0.34 0.29 0.44 0.34
	mean scr	0.22 0.22 0.23 0.21 0.21 0.20 0.20 0.19 0.23 0.21
	max scr	0.37 0.31 0.30 0.31 0.23 0.30 0.23 0.27 0.41 0.30
	RR		0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02
	Table 5.5: Root mean square error between the features extracted from original data and
	the features extracted from reconstructed data. Dataset: Stress Recognition in Automo-
	bile Drivers [20]

5

shows the Root Mean Square Error (RMSE) between the features extracted from the compressed and original ECG and GSR signals for the 9 drivers. Notice that the average RMSE for each feature is small, and the important features such as heart rate, respiration rate, and R-R interval have a RMSE close to zero, which means that the compression had very low impact on the information loss.

In order to fully answer the stated problem in the first section, the sequences of features

Table 5 .

 5 -1 resulted in certain features such as RMSSD and sdNN being unreliable and entirely different from those extracted from the original datasets. 7: Comparison of the average values of the root mean square error and the features of the original and reconstructed signals. Datasets: ECG-ID [241] and locallycollected PPG.

		RMSE RMSSD meanNN HR pNN20 pNN50 sdNN
	Original PPG		4.33	999.44	60	0	0	2.89
	Reconstructed PPG	0.05	64.50	997.48	60	0.76	0.61	41.09
	Original ECG		1.81	1000	60	0	0	1.09
	Reconstructed ECG	0.05	116.51	974.06	68	77.27	63.63	85.28

  6. IOT TIME SERIES CLASSIFICATION WITH DATA COMPRESSION AND DEEP LEARNING

	Dataset	Type	# Classes Length Train size Test size # Features Type
	ECG5000	ECG	5	140	500	4500	1	U
	Adiac	Sinusoidal	37	176	390	391	1	U
	NonInvECGTh1	ECG	42	750	1800	1965	1	U
	NonInvECGTh2	ECG	42	750	1800	1965	1	U
	StarLightCurves	Sensor	3	1024	1000	8236	1	U
	UWaveX	Motion	8	315	896	3582	1	U
	UWaveY	Motion	8	315	896	3582	1	U
	UWaveZ	Motion	8	315	896	3582	1	U
	HAR [72]	Motion	6	128	7352	2947	9	M
	ECG [195]	ECG	2	152	100	100	2	M
	UWave [195]	Motion	8	315	200	4278	3	M
	Wafer [195]	Motion	2	198	298	896	6	M

Table 6 . 2

 62

	Curves	-	UWaveX UWaveY UWaveZ

: Compression ratios achieved by the different data compression techniques on the UCR univariate time series

Table 6 .

 6 3: Experimental adjustments used in the implementation of the four DNN models.

				LSTM FCN	GRU FCN	FCN
		Epochs Batch Epochs Batch Epochs Batch Epochs Batch
	ECG5000	200	16	400	128	400	128	200	128
	Adiac	1500	16	4500	128	4500	128	1500	128
	NonInvECGTh1	1500	16	4500	128	4500	128	1500	128
	NonInvECGTh2	1500	16	4500	128	4500	128	1500	128
	StarLightCurves	500	16	1000	128	1000	128	500	128
	UWaveX	750	16	2000	128	2000	128	750	16
	UWaveY	750	16	2000	128	2000	128	750	16
	UWaveZ	750	16	2000	128	2000	128	750	16

Table 6 .

 6 4: Compression ratios and reconstruction time (seconds) achieved by the different data compression techniques on the UEA multivariate time series

				UWave		Wafer
		CR	rec time (sec)	CR	rec time (sec)	CR	rec time (sec)
	SZ E-1	27	0.02	6.46	0.04	12.9	0.05
	SZ E-2	5.4	0.02	3.36	0.03	4.4	0.05
	SZ E-3	2.5	0.02	2	0.03	2.66	0.05
	CS 40	2.8	15.4	2.7	255	2.64	280.2
	CS 20	5.35	27.4	5.42	300.6	5.29	308.7
	DWT L1	4.6	-	5.37	-	5.4	-
	DWT L2	2.4	-	3	-	2.9	-
	DWT L1+SZ E-2 12.6	0.02	6	0.03	8.37	0.05
	DWT L2+SZ E-2 19.6	0.02	11.2	0.03	15.2	0.05

Table 6

 6 .1. The small amount of training data did not help the model to learn from level-2 approximations the necessary structure. 96CHAPTER 6. IOT TIME SERIES CLASSIFICATION WITH DATA COMPRESSION AND DEEP LEARNING

	Dataset	Input data	Length Accuracy
		original	152	0.87
	ECG	level 1 approximations	76	0.86
		level 2 approximations	38	0.72
		original	315	0.93
	UWave	level 1 approximations	157	0.93
		level 2 approximations	78	0.80
		original	198	0.98
	Wafer	level 1 approximations	99	0.98
		level 2 approximations	49	0.89
		original	128	0.93
	HAR	level 1 approximations	64	0.93
		level 2 approximations	32	0.92

Table 6 .

 6 5: Classification accuracy achieved by the FCN model on the multivariate time series datasets.

	6.6.3.3/ ENERGY EFFICIENCY

  proposed the unsupervised Staired Multi-Timestep Denoising Autoencoder (SMTDAE) model to denoise gravitional waves containing non-Gaussian noise. .e, no clean versions of the noisy data are available. The proposed model is based on a generative adversarial architecture which does not require prior information about the source of the noise in the data. The results obtained were encouraging and demonstrate the potential medical use of GANs.7.2.2/ PPG PROCESSING Different research work in the literature tackled the processing and analysis of PPG data

	The proposed model combines a DAE with a RNN architecture and is based on sequence
	to sequence bi-directional Long Short Term Memory (LSTM). By training the model on
	data with white Gaussian noise, the proposed model outperformed principal component
	analysis and dictionary learning in recovering signals with non-Gaussian noise. Since
	its emergence in 2014, the research community has developed considerable interest in
	the Generative Adversarial Network (GAN) models. The authors in [202] proposed the
	asymmetricGAN to remove the noise from EEG time series where the training data are
	unpaired, i

  .2-c and inspired from the work proposed

				Dense block 1				Dense block 2
		32	64		112 176 256	86		172 274 392 526	526
	Input multivariate time series	Convolution				Pooling Convolution +			Activation
											Global Pooling
	3x Conv 1D							BatchNorm + ReLu
	BatchNorm + ReLU + Squeeze & Excite + 3x Conv 1D			Global Average Pooling 1D
	BatchNorm + ReLU + 1x Conv 1D + 2x Average Pooling 1D		Dense + Softmax
				Dimension shuffle					8
									LSTM + Attention	Concatenate
											534
	Input multivariate
	time series							Dense block 2		Softmax
		64	112	176	256	86	172	274	392	526	526
					Convolution +				Activation
	Convolution				Pooling
										Global Pooling
	3x Conv 1D						BatchNorm + ReLu
	BatchNorm + ReLU + Squeeze & Excite + 3x Conv 1D		Global Average Pooling 1D
	BatchNorm + ReLU + 1x Conv 1D + 2x Average Pooling 1D		Dense + Softmax
	Attention LSTM + Dropout

Softmax

Figure 8.2: The adapted 1D-DenseNet architecture for multivariate time series classification. The numbers in each box denote the number of parameters at each step.

32 Dense block 1

Table 8 .

 8 1: Properties of all the datasets used in this chapter and originated from[START_REF] Dua | UCI machine learning repository[END_REF][START_REF] Baydogan | Mustafa baydogan -multivariate time series classification data sets[END_REF][START_REF] Li | Action recognition based on a bag of 3d points[END_REF]. The batch size and number of epochs used to train the DNN models are shown for each dataset. The 1D-DenseNet model yielded the best accuracy on the Uwave and Netflow datasets, the ResNet model on the HT Sensor dataset, and the MLSTM-FCN model on the Movement AAL dataset. This means that the performance of the proposed MLSTM-DenseNet model over various datasets is generally higher than that of other state-of-the-art models. 128CHAPTER 8. USING DENSENET FOR IOT MULTIVARIATE TIME SERIES CLASSIFICATION

	Dataset	FCN ResNet DenseNet MLSTM-DenseNet MLSTM-FCN
	Uwave	93.4	92.6	93.6	89.7	89.3
	Gesture Phase 45.9	47.9	48.9	57.0	55.5
	LP3	46.6	43.3	70.0	83.3	80.0
	LP5	68.0	65.0	68.0	69.0	67.0
	Ozone	81.5	83.2	81.9	86.0	82.0
	ECG	90.0	91.0	92.0	93.0	93.0
	EEG	64.0	62.5	62.5	67.0	65.6
	KickvsPunch	60.0	80.0	100	100	100
	Netflow	95.5	95.8	96.6	95.1	87.2
	Action 3D	55.5	57.5	52.1	77.1	75.4
	LP2	46.3	30.0	76.6	83.3	83.3
	HT Sensor	84.0	88.0	82.0	86.0	82.0
	Movement AAL 61.1	59.2	58.6	77.0	79.0
	Occupancy	71.0	72.3	72.3	79.0	77.0
	AREM	84.6	89.7	87.18	94.8	92.3

Table 8 .

 8 2: Achieved accuracy by the five DNN models on the 15 multivariate time series datasets. The best performance is shown in bold.

  IoT technology facilitates the tracking of patients with different conditions and the processing of vast volumes of data, of which a substantial part of this data are physiological signals. Physiological signals are an invaluable source of data which helps to diagnose, rehabilitate, and treat diseases. The signals come from a Wireless Body Sensor Network or wearable devices placed on a patient's body. There are many difficulties in IoT-healthcare systems, such as data collection and processing.This dissertation mainly focuses on the data collection as well as data processing and analysis approaches for wireless body sensor networks and IoT-healthcare. To do so, two main axes have been considered, namely, the data collection process of an IoT-healthcare application and edge-level data analysis and processing. The first axis tackles the energy-efficiency and the problem of finding a tradeoff between compression ratio and classification performance. The second axis studies the use of deep learning techniques to solve numerous challenges, such as physiological time series reconstruction, enhancement, and classification.Ces derni ères ann ées, la technologie de l'Internet des objets (IoT) a suscit é un vif int ér êt en raison de sa capacit é à all éger certaines t âches de soins de sant é caus é par le vieillissement de la population et l'augmentation des maladies chroniques. La technologie IoT facilite le suivi des patients souffrant de diff érentes pathologies et le traitement de vastes volumes de donn ées, dont une partie substantielle de ces donn ées sont des signaux physiologiques. Les signaux physiologiques sont une source inestimable de donn ées qui aident à diagnostiquer, r éhabiliter et traiter les maladies. Les signaux proviennent d'un r éseau de capteurs corporels sans fil ou d'appareils portables plac és sur le corps d'un patient. Il existe de nombreuses difficult és dans les syst èmes de soins de sant é IoT, tels que la collecte et le traitement des donn ées.

Titre : Data Compression and Deep Learning for IoT Healthcare Applications based on Physiological Signals Mots-cl és : Consommation d' énergie, Compression de donn ées, Traitement num érique du signal, Internet des objets, Signaux physiologiques, Deep learning R ésum é :

The following example illustrates how digital signal processing techniques such as Fourier transform can be used in stress detection tasks for features extraction: https://josephazar.net/blog/dspstressml1.php

The following example illustrates how features can be extracted from raw physiological signals and used as input to an artificial neural network: https://josephazar.net/blog/mlmitdriver.php

The codes and weights of some models are available at https://github.com/josephazar/MLSTM-DenseNet

ACKNOWLEDGEMENTS I would like to thank my PhD advisors, Professors Rapha ël Couturier and Abdallah

Makhoul, for supporting me during these past three years. I am very grateful to Raphael for his scientific advice and knowledge and insightful discussions and suggestions. He is my primary resource for getting my scientific questions answered. I am also thankful to Abdallah for all the fruitful discussions we had and for being supportive. He has given me the freedom to pursue various projects without objection.

This section illustrates how, when applied to highly compressed data, the proposed deep learning model in this section can improve the quality of the data and make it feasible for analysis. The standard evaluation strategy used for such problems is to compare the root mean square error of the reconstructed and enhanced data. It may not be enough for all applications, however, and especially for medical applications. Different features from the time-domain and frequency-domain of the reconstructed and improved signals are extracted in the use case considered and compared to those extracted from the original signals. recall greater than 0.9 when trained on six seconds compacted PPG windows with data augmentation. During the experiments, it was noticed that the larger the data window, the easier it was for the model to detect anomalies since large PPG windows contain more features and enable the model to learn more about the regular shape of PPG signals.

The improved results of the proposed approach can be explained by the fact that we can allow the model to learn the patterns and shape of larger windows of PPG data from a summarized version by using the discrete wavelet transform.

Figure 7.11 shows that the proposed approach have a higher area under the ROC curve (AUC) than the standard approach. Note that a model with an AUC higher than 0.5 is better than a random classifier. Selecting a threshold that gives a true positive rate greater than 0.9 and a false positive rate close to 0 is possible when using data augmentation.

In order to define whether or not a PPG signal is valid, we defined the cut point as 0.06, this threshold is based on the last training loss value obtained during the training. If the mean squared error between the reconstructed signal and the input exceeds this threshold then this signal is marked as a meaningless PPG signal. From the figures it can be seen that the model can efficiently predict the irrelevant PPG windows where it is difficult to extract important features. This section, in addition to summarizing data, proposed a data augmentation process for medical time series collected from wearable devices and sensors to increase the amount of training data and make the model more robust to noise.