Place-based Uncertainty Prediction using IoT Devices for a Smart Home Environment

In this work, an uncertainty prediction method for the home environment is proposed using the IoT devices (sensors) for predicting uncertainties using place-based approach. A neural network (NN) based smart communication system was implemented to test the results obtained from placebased approach using the inputs from sensors linked with internet of things (IoT). In general, there are so many smart systems for home automation is available for alerting the owners using IoT, but they can communicate only after an accident happens. But it is always better to predict a hazard before it happens is very important for a safe home environment due to the presence of kids and pet animals at home in the absence of parents and guardians. Therefore, in this work, the uncertainty prediction component (UPC) using place-based approach helps to make suitable prediction decisions and plays a vital role to predict uncertain events at the smart home environment. A comparison of different classifiers like multi-layer perceptrons (MLP), Bayesian Networks (BN), Support Vector Machines (SVM), and Dynamic Time Warping (DTW) is made to understand the accuracy of the obtained results using the proposed approach. The results obtained in this method shows that place-based approach is providing far better results as compared to the global approach with respect to training and testing time as well. Almost a difference of 10 times is seen with respect to the computing times, which is a good improvement to predict uncertainties at a faster rate. Keywords—IoT; place-based approach; uncertainty prediction; MLP; SVM; BN; DTW


I. INTRODUCTION
In recent times, the internet of things (IoT) playing a pivotal role in building a modern society, infrastructure and been instrumental towards the rapid growth of smart cities [1]. The trend of people migrating to urban cities for a better lifestyle made most of the governing authorities to allow improving the growth of smart cities. Therefore, in simple, it is very much evident that major activities by humans, machinery, and administration have a great tracking of life events. Similarly, the possibility of being ignorant/least bothered, as a human tendency towards different homely activities increases due to the excessive involvement of machine-made activities in life. The possibility of these machines to get failed or giving false output response cannot be denied. Especially when it is related to kids at home in the absence of parents/guardians the possibility of risk can be more terrifying and may sometimes lead to death as well. Therefore, it is always suggested to use disruptive technologies (such as artificial intelligence, blockchain, 3D printing, IoT, etc.) carefully especially when it is applied to a home environment [2]. Yes, today's home environment is completely based on electronic gadgets/machinery and is capable of making things faster and easier for a comfortable human life. They are just one click away from making wonders with their features and quality services but a wrong click also may push you into uncertain situations as well. They need careful/skilful operators for better services and need a careful monitoring system for these device functionalities. Recently many business models are proposed to make secure and smart IoT based home environments by leading real-estate companies to enhance the comfort zone of human life.
A secured smart home was suggested by Yuan and Peng based on IoT by interfacing the web and smart phone applications for improving the user experience [3]. The authors provide a full solution to develop a smart home by using hardware design, intelligent controlling method, pervasive computing and virtual reality within their model. They also claimed to build a reduced power consumption and energy consumption model with a secured mechanism of the terminal gateway group. The health hazards using these smart homes and within the smart cities were addressed by Miori and Russo uses semantic knowledge representation using the web 3.0 [4]. The authors used specific ontology's that consider the information from distributed environments. An integration approach based on IPV6 enabled service-oriented architecture (SOA) was proposed by Jung et al. to build automation and smart cities [5]. A proof of concept implementation and performance evaluation results is produced out of this work to build an advanced control scenario for the context of smart cities. Piyare used android based smart phones to develop a monitoring and home control system with low cost and flexible mode of operation [6]. Without using a dedicated server this method proposed a novel communication protocol for monitoring and controlling the home environment with all kinds of switching functionalities using mobile devices. The biggest disadvantage of IoT based systems towards achieving security in an IoT environment. A risk analysis was carried out towards using the smart home automation systems by Jacobsson et al. by involving the leading industrial actors [7]. The results from this research indicated reducing the risks by adding standard security features to the existing IoT architectures. The IoT services provided by Vivek and Sunil are in a secured way by using the Wi-Fi ZigBee gateway for home automation [8]. In this work, this gateway includes the user interaction capabilities with an efficient way of sending and receiving the instruction from different protocols and the graphical user interface (GUI) in this work allows the users to get interacted www.ijacsa.thesai.org with the settings of the ambient environment. Later, Puri and Nayyar suggested a home automation technique using PIC microcontroller (PIC 16F877A), Bluetooth (HC-05) sensors and android based technology [9]. The Bluetooth sensors used in this method are claimed to be useful for long-range and energy-efficient wireless communications. However, it might not be more appropriate using the Bluetooth for the long-range applications in the urban city environment due to the involvement of heavy noise. The role of wireless sensor networks (WSN) plays a vital role in covering the long ranges and to avoid noise issues in several applications. A secured IoT based smart home automation system was proposed by Pirbhulal et al. used the WSN for operating different home appliances [10]. In this work, for providing suitable energyefficient data encryption the authors used a triangle-based security algorithm (TBSA), which is based on an efficient key generation mechanism. Using this method, the secured data transmission was possible and the network could cover long ranges as well. An attempt made by Saha et al. to use the advanced IoT based remote system for health monitoring, home automation and an alarm system [11]. From the proposed method a patient will get an alarm to provide the prescribed medicine in the scheduled time by using an email or SMS. An interactive dual-mode IoT based smart home automation was proposed by Hamdan et al. can monitor and control most of the home appliances remotely [12]. These appliances are interfaced with a single chip microcontroller with an in-built wireless access point which establishes the communication with the home server. This system is scalable and can add or remove the devices connected from different rooms based on the demand/ priority.
In this work, neural network (NN) based methods are used to identify and implement for any kind of uncertainty prediction with the help of IoT devices for establishing a smart communication between the owners and prediction component. The place-based uncertainty prediction models are introduced here for improving efficiency, speed, and accuracy. In the next section, detailed information of neural networks functionality as an uncertainty prediction module is presented for the smart home environment.

II. FUNCTIONING OF NEURAL NETWORKS
NN works on biological genetic pressures applied to prewire forms of the natural neural networks [13]. The first layer is formed with the input nodes followed by, hidden layers and output layers. The nodes and layers of an artificial NN (ANN) represented for a nucleus and axon of a biological NN.

A. Biological Features of Neural Networks
In a biological NN, a neuron will be surrounded with a hair-like (thin) element (i.e. dendrites), which enables the active form of a neuron. They work as input terminals for different sources with certain threshold values. These neurons will burst when the summation of all input signals reachs to maximum levels and the resultant outputs will be carried forward by the axons. These axons will be thicker in size and potentially long as compared to the dendrites, which influence remote neurons that are linked with thousands of other neurons as well. In an artificial NN, the hidden layers will be functioning like the intermediate layers, which receive the input layers and combines them based on the weights of the edges. The calculated output is emitted to the outputs by the subsequent layers, which is considered as a predicted attribute. The NN based systems can be very useful and are very good/faster risk prediction systems in most of the real-time applications such as the healthcare industry, hospitality businesses, stock market detections, etc. [14]. On the other side, the same NN systems can be used as a group for multiple parameter prediction operations such as blood pressure, sugar levels, and heartbeats in the case of the hospital environment. For example, in a home environment the room temperature, humidity, pressure level, smog, windows and door positions, water levels in a tank, electronic switch positions (ON/OFF), status of electronic accessories, automated machines, etc. must be operated within their ideal/defined status levels. These ideal/defined values will be trained to the hidden layers of the neural networks.

B. How a Neural Network Works?
The role of NN is to receive the inputs from the sensor devices that are working based on the fundamentals of internet of things (IoT) and process them along with the ideal values and trained values of the hidden layers of a NN and produce the resultant outputs at output nodes. The output values from the NN system will generate the vector outputs matrix. The conversion of these matrix values will be taking place internally to provide some of the numerical values at the output. These numerical values will be compared by the checker component with various ideal values stored in the database for predicting the uncertainty in the home environment.
To perform the internal operations within the different layers of the NN back propagation algorithm was used to determine the resultant output from the given input signals and the trained values in the hidden layers. In the backpropagation algorithm, the data will be trained to the hidden layers as per the required/expected outputs. The main reason to use this algorithm is due to its nature of being a supervised learning algorithm, which uses multi-layer perceptions for changing the weights of the hidden layers based on the adjustments needed to obtain at the output nodes [13]. This algorithm uses computed output error values to rectify the weights in the backward direction, whereas forward propagation is used to retrieve the total error in this method. Neurons will be activated at the time of forwarding propagation using a sigmoid activation function as given below: The back-propagation algorithm works with four following steps:  Using the input patterns, forward propagation is performed to calculate the error output.
 Weight values of the weight matrix will be modified based on the resultant values obtained by using Eq. 1.
 Process of the algorithm finishes once the output patterns are matched with the target values/patterns.

C. Uncertainty Prediction Component
The role of uncertainty prediction component (UPC) in this work ensures to obtain the information (i.e. ideal values of different parameters from the database) and to compare with the values updated at the input nodes received from sensors by converting them to input vector-matrix form as shown in Fig. 1. The hidden layer weights and random values will be defined by using the back-propagation algorithm and by using some predefined values respectively. The input vector-matrix is compared with the hidden layer weights and the resultant output vector-matrix will be formed to supply the output to the checker component.

D. Functioning of Uncertainty Prediction Component
There are different parameters considered in this work to obtain the sensor data to be analyzed and it will be in the form of analog data. The data collected from the home environment must be converted to a digital and floating form in terms of '0' and '1' because the neural network-based hidden layers will understand the inputs given in digital form only. The weight of the neurons will be equal to '0' or '1' based on the resultant processed values of inputs at nodes and the hidden layer values (i.e. trained values). The vector data set will be converted as a set of a matrix at the input layers from the obtained analog input equivalent values.
The uncertainty prediction component using NN helps to improve the speed of prediction towards any kind of uncertainty in the home environment. The problem detected by the sensing devices can be processed and identification of the risk using the proposed UPC improved the efficiency of the system. Accurate results can be obtained easily using the UPC. In the next section, the detailed architecture of the proposed method for the smart home environment is explained with suitable design components used for IoT. In simple, this method can be called as artificial intelligence (AI) based architecture uses machine learning concepts (such as multilayer perceptrons (MLP), support vector machines (SVM), Bayesian networks (BN), and dynamic time warping (DWT), etc.) also. These techniques help in computing the inputs of different forms observed by the sensors in the absence of the human helps to predict the uncertainties.

E. The Interaction between the Input Layers
The interaction between different layers is carried out through the hidden layers by using the weights of neurons in terms of '0' and '1'. The UPC provides a continuous assessment between different inputs and hidden layer values using the Sigmoid function and is given by Firing rules are very flexible to calculate the timing of firing neurons based on the input patterns. However, it is very important to note that the firing rules applied at input and output stages are different; and the generalization of neurons will be considered at both the ends as they are sensible for random patterns applied at the time of training the hidden layers. Such a flexible property of the firing rules is implemented by using the Hamming distance technique [13]. This flexibility helps UPC to work efficiently for finding multiple and complex natured uncertainty accurately.
This system will help the house owners and the builders to create a peaceful environment in the society by avoiding possible uncertain events in their colonies by predicting the unexpected accidents.

F. Datasets of different Activities in Smart Home Environment
In this work, a dataset is created with daily living activities in smart homes, with well-adapted set of actions for a particular constraint. Five goals have been established which need to be met while recording the dataset.
Goal-1: Record the live home environment data and save it to a hard disk.
Goal-2: Establish and classify the realistic routines of the owners from general public (i.e. visitors).
Goal-3: Use a long-time scale for recording the data.
Goal-4: Ensure to connect more number of smart home sensors to more number of appliances and objects for obtaining more accuracy with the end results.
Goal-5: Now label all four primary contexts with accurate dimension throughout the experiment.
At the time of data collection phase three issues may influence seriously as follows: i) some of the appliances are not used by the owners and may use only few parts of the apartment which are more familiar; ii) some of the common activities performed at home may not be followed by everyone due to different cultural and traditional reasons (for example: five times prayer followed by majority of population in Saudi Arabia, but people visiting from different countries may not follow the same pattern); and iii) some of the activity classes may have few instances during data collection phase, and may influence the training neural network with appropriate information may become a challenging task.

III. PROPOSED ARCHITECTURE FOR SMART HOME ENVIRONMENT
In the proposed architecture, there are three main components to address: i) Sensing Devices, ii) Runtime Monitoring Component, and iii) Communication System as shown in Fig. 2. All these components are connected by using various embedded networking devices and IoT devices for establishing a communication interface between internal devices and end-users by using a middleware processing included with neural network systems. The sensors involved in the smart homes/devices are considered to be the eyes and ears of that environment, which help to inform the owners about any kind of uncertain situation. These devices help to avoid major accidents and reduce the level of damages at home environments [15]. Automated devices control the appliances, events, and activities based on the instructions given by the microprocessors/microcontrollers. They help to monitor and react to different changes in the environment in the absence of human beings. 2) Runtime monitoring component: The runtime monitoring component in this work includes a database, and checker component along with the uncertainty prediction component, which is completely functioning based on the neural networks-based system. Apart from these activities, the runtime monitoring component also involved with the mitigation process, which helps to assess different scenarios and identify the seriousness of an event taking place in the home environment. a) Database: It helps to interact with different types of input and output devices to accumulate and store the information. Based on the demand/instructions of the microprocessor, the database helps different components to provide the desired information or store the information by establishing two-way communications. In this work, the database stores the ideal values of different parameters (such as room temperatures, humidity, door positions, motion, water tank levels, gas leakages, etc.) and provide the same to the uncertainty prediction component in the form of a input vector matrix to compare with the latest values at the input nodes of the neural network from the sensing devices. The database design in this work used MySQL application due to simplicity and faster operation as compared to ORACLE or SQL based database designs.
b) Checker: This will check the executed output results of the UPC and ideal values that are stored in the database to identify the environment of the house regularly. If the obtained results are within the controlled range of the ideal values means there is no problem in the home environment. The checker will send an alert signal to the next level (i.e. communication system using IoT devices) if any kind of big difference is observed with the values of UPC and the ideal values stored in the database.
3) Communication system: The communication in this work is established using IoT based system in three ways, i.e. between the targeted objects (various sensors), web servers and the Internet, and different types of social objects (such as mobiles, laptops, internet-based accessories, etc.) [16]. a) Tagged Objects: This category includes RFID, low power sensors, monitoring devices, etc. from the sensing devices to observe the status of the home environment for temperature, water levels, etc. as mentioned above in Fig. 5.
b) Web Servers and Internet: There are so many other technologies for short-range communication using ZigBee, Wi-Fi, etc. [17]. However, they are not capable to communicate by using the low power sensing devices in the IP networks. Therefore, web-based services are needed to get integrated with these sensor nodes for communicating longer distances.
c) Social Objects: Most of the time, data received from such types of monitoring devices will be huge and the relevant executed information will increase exponentially. Therefore, the role of social objects, clouds, etc. plays a vital role in storing the data and using the same effect at the appropriate locations/scenarios. On the other hand, various security issues also can be addressed easily by using such type of social objects, as the services providers will take care of encryption, authentication, and are more cost-effective for the implementation.
To implement this architecture for predicting the uncertainties using NN based runtime monitoring component needs to follow certain rules as discussed in Section-4 and Section-5.

IV. UNCERTAINTY PREDICTION USING THE PROPOSED METHOD
The list of events taking place using the proposed method are given below as shown in Fig. 3 in a flowchart and some of the highlights are listed below:  The ideal condition of every device/accessory must be defined by the user in the home environment.
 Based on the inputs the database will help the uncertainty prediction module to generate the appropriate training values for the hidden layers.
 The sensor(s) will try to identify the changes at the home environment regularly and will transfer the same information to the next level, i.e. for UPC and to the runtime monitoring component.
 In the UPC, the weights of the hidden layers will be comparing the input vector matrix and provide the resultant output for the checker component.  For any kind of huge gap between the ideal values and the predicted values, an alert will be passed through the IoT section, communicating the owner about the uncertainty.

A. Uncertain Parameters of a Home Environment
In this work, the definition of certain and uncertain conditions of the home environment are listed as shown in Table I. As per the guidelines of the US Environmental protection agency, the pollution levels of smog containing CO of 15.5 ppm to 30.4 ppm and NO2 of 0.65 ppm to 1.24 ppm [18].
In a certain condition, the people living in the home will feel comfortable and it will be safe from any kind of harmful situations. Whereas, in case of uncertain conditions are very much uncomfortable due to the changes in conditions or any kind of unfortunate events such as weather changes, short circuits, etc. For example, the sudden changes in weather increase the humidity in the room and kids might find it uncomfortable at home in the absence of parents. www.ijacsa.thesai.org  Similarly, in a smart home, considering human activity recognition (HAR) [19] helps to identify the regular activities performed by the owners and to predict the uncertainties. Some of the common practices followed by the owners at smart home are listed as possible activity classes and are grouped by places in the dataset as follows: It is very complicated task to consider an occupant following accurate timings on daily basis and when it comes to multi-owners it will become a serious and complex issue to analyse the number of instances using HAR. Berlemont et al. suggested a method to deal with the problems related with gestures and actions using Siamese NN (SNN), which represents two identical ANNs runs simultaneously on two different types of instances [20]. It is also important to note that the data types in the dataset will change based on the type of sensing device used for a particular activity. Some of the data may be in binary form (such as door closed or opened, i.e. assuming Close with '0' and Open with '1'). Similarly, data can be an integer, real number, and could be categorical too. The neural network may need to learn the number of instances and their frequency during working days and weekends/holidays. For such complicated information the network must be well trained with maximum activities and their instances. For example, using toilet may have few instances but using staircase and computing at home may have more instances during a weekend/holiday as compared to any working day. representing the complete set of sensors at ℎ place of the smart home. Any local approach at the ℎ place belongs to a classifier needs to get recognized and the current instance at any point is ∈ ( ) ∪ { } with the combined data produced by ( ) . Here, is a dummy class and it is very much needed to assign a meaningful label for an instance unless it is a part of ( ) . An activity recognition approach is proposed in this work by learning local models for each instance, place and active classes using the following steps: First, use the localization algorithm to locate an occupant at ℎ place; and then to recognize the occupant activity at ℎ place using the local model. Now by considering set of all places of a home by and the cardinal of this set is represented by | |, respective set of decisions are computed for {∆ (1) , ∆ (2) … ∆ ( ) }.
and , ( ) ∈ [0,1] represents degree of membership with the decision of a classifier at ℎ place of ℎ activity class and ℎ www.ijacsa.thesai.org place. In the proposed approach the local models will learn to recognize different activity classes which occurs at respective places, i.e. if ≠ gives , ( ) = 0. Here the NN needs to make a decision and the decision fusion step is to compute set of fused decision (∆ ̅ ) is given by Now from each set of decisions {∆ (1) , … , ∆ ( ) } each place is considered from a smart home and from ∆ ̅ a conclusion is made to identify the class of a particular instance at ℎ activity from ℎ place when a class is having maximum decisions in ∆ ̅ . Therefore, From the above Eq. (5), a given instance will be related to only one activity when the similar activities are occurring throughout the home simultaneously. By using maximum values of ∆ ̅ , modification of decision process for multiple activity labels is possible. The proposed place-based activity recognition scheme is shown in Fig. 4.
There is a requirement of expert knowledge for setting up entire process in a smart home, and need to define the membership of each sensor with respective place is essential. Sensors are generally installed closely with each other and the possibility of discovering same places by the sensors is more. To tackle/address this problem, clustering methods are implemented. The same data collected by nearest sensors helps to find correlated data. It is necessary to standardize the sensor data in a way to have 0 mean and a variance of 1. The training dataset is given by considering mean as ̅ and standard deviation of outputted values the sensor with as Also considering the noise parameters in the collected data, it is essential to ensure a noise reduction process is being carried out. A basic filtering method is used to control the noise and it is controlled by [0,1] is given by Here maximum filtering process is considered when = 0; minimum filtering also considered when = 1 when ′ = for any value of . The basic method applied over raw sensor data is shown in Fig. 5 with the resultant filtered output, where the original signal shape is conserved by softening all the noisy oscillations.

A. Classical Classifiers
There are several classifiers which can be used for predicting the uncertainties in a smart home environment. ∆ ̅ www.ijacsa.thesai.org here, ( ) is the bias neuron, , ( −1) is the weight between two neurons (i.e. between and − 1 ; and and ), and finally activation function of neuron is represented by , which is equal to sigmoid function as listed in Eq. 2.
SVMs are the generalization of linear classifiers with two classes. For a vector of the input data = ( 1 , … , ) a constructing linear classifier is not possible with the help of vector weights = ( 1 , … , ) . Therefore, the output of SVMs can be given by If the value of ≥ 1 it is classified in class 1, and if ≤ −1 then it is classified in class 2.
BN is considered as a directed acyclic graph representing joint probability distribution of different variables forming as a set. For a five variable inputs of = ( 1 , … , 5 ) the BN is represented by different conditional dependencies as shown below: For the purpose of activity classification, any one variable of BN represents the activity class and remaining variables represents the obtained sensor data. For example, in the following Eq. 10 activity class is represented by 1 and sensor data is represented by 2 , 3 , 4 , 5 .
There are many approaches existing to learn from the trained data for the BN structures and conditional probabilities of BN. There are some complex learning problems such as structure learning as compared to distribution learning.
In case of DTW, values of two time-dependent sequences are compared in a geometric approach. For example, assume values of two sensors as and ′ with a time steps of ∈ ⟦1, ⟧ and ′ ∈ ⟦1, ′⟧ . To compare the sensor values it is necessary to conduct cost measurement with : ⟦1, ⟧ × ⟦1, ′⟧ → [0, +∞]. Generally, for similar values of and ′ output of cost function will be smaller values; and for dissimilar values of and ′ output of cost function will have larger values. The warping path is defined as a sequence = ( 1 , … , ) where the value of = ( , ′ ) ∈ ⟦1, ⟧ × ⟦1, ′⟧. This warping path need to consider and respect two conditions: boundary conditions ( 1 = (1,1) = ( , ′) ); and step size conditions ( ∀ ⟦1, − 1⟧, +1 − ∈ {(1,0), (0,1), (1,1)}). The advantage of boundary conditions is to ensure both start and end points are aligned together. Whereas step size conditions enforces all elements from both the sequences are part of warping path for at least once with none of the duplicate pairs in . The later step also enforces monotonicity of the path (i.e. + +1 and ′ ≤ ′ +1 . Finally, the cost of warping path is given by Therefore, DTW distance between two sequences is representing the overall cost of optimal warping path, which is smallest of all possible costs among different warping paths.

B. Experiment Results
At the time of processing data missing values are replaced with cubic spline interpolation and a low-pass filter (with = 0.1) was used for noise reduction. Similarly, care was taken to ensure the value of mean is '0' and standard deviation of the sensors is equal to 1. Sensor values as input vectors are converted to feature vectors by resampling each instance with 20 time steps. WEKA library was used to implement the MLPs, SVMs, and BNs in this experiment [21]. (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 3, 2020 357 | P a g e www.ijacsa.thesai.org Activity recognition performance of this work is compared with place-based approach with the global approach by using different types of classifier types and decision fusion methods. It is also important to note that most of the classes are not frequent in any smart home environment and the frequency may vary from class to class. Weighted F1 score is used to compare the performances at different levels, rather comparing only the accuracy part of it. Performance measure helps to provide equal weights for all classes, irrespective of the total number of instances they consists off. For example, consider a set with activity instances ( ) with true label for all activity classes ∈ , the F1 score is calculated as shown below: The evaluation process in this approach used 10-fold random cross-validation. The five sets of instances were used to train the neural network. The performance of this approach was evaluated by using the test set which never existed before the training the hidden layers. For selecting parameterization of the classifiers/decision fusion validation set was used. Evaluation of validation set took at first place with the learned models and this helps to avoid any kind of bias at the time of evaluation phase. F1 scores of five different places using the four classifiers are given in Table II Table II, it can be seen that the performances are depending on different types of classifiers. Performance using DTW shows poor results as compared BN at the place Kitchen. The observations also show a huge gap between some of the classification performances at some places. Overall recognizing actions from Kitchen seem more complicated as compared to other classifiers. Now in a process of comparing place-based and global approaches, all the places modelled by using same classifier as compared to the global approach in which all classifier types were used for considering a global model action from Opportunity dataset. From the results it can be seen that the place-based approach is far better than the global approach as shown in Table III.
The gap between these two approaches is not significant statistically because the F1 score deviation of the classifiers has a big gap when it is observed in MLP and DTW from the Table III. Also note that the standard deviation of all classifiers is small for place-based approach as compared with global approach, which is due to decision fusion step that tends to go for average out of the overall results.
In this work, anticipation is also made to calculate the computing times (see Table IV) as a benefit of place-based approach. The time taken to run a training phase and activity recognition is observed to be faster in place-based approach when compared with global approach. To calculate the computational times, it is necessary to use a high-end system configuration consisting of high frequency of operation and huge RAM. Here, the computing times are considered for only three classifiers (MLP, SVM, and BN; and ignored DTW since it is very slow as compared to other three classifier types as seen from in Table II) along with global approach over the Opportunity dataset. Whereas in case of decision fusion step it was being ignored due to very slow computing times and can be neglected as compared to any computing times. Parameters used for global approach 1 100 hidden neurons, 120 epochs, 0.2 learning rate, and 0.1 momentum 2 = 1000, = 0.003 Decision fusion used for place-based approach 3 SVM stacking using = 100, = 0.01 4 MLPstacking using 120 hidden neurons, 120 epochs, 0.2 learning rate, and 0.1 momentum 5 MLPstacking using 60 hidden neurons, 120 epochs, 0.2 learning rate, and 0.1 momentum 6 SVM stacking using = 20, = 0.05 Considering the proposed place-based approach executed with multi-core computer processor, training phase can be parallelized. That means all places can be computed simultaneously by assuming decision fusion takes negligible time. Due to this approach the overall computing times of proposed place-based approach is shorter as compared with the global approach for both training and testing phases. For example, considering the MLP for any place as compared with the global approach the training time and testing times are shorter in place-based approach (as 15,586.36 seconds is bigger than any values of MLP classifier).

VI. CONCLUSIONS
In this work, a unique method to predict the uncertain events at the home environment is proposed using a neural network-based system. As compared to the earlier home automation systems, the present method can detect the possible uncertain situations and hazards in an efficient way to improve the safety measures for the people living in the home from any kind of serious life and property damage. There is a lot of improvement in monitoring the events and activities using the sensors and monitoring devices effectively adding the risk prediction component. Both of them working simultaneously and the UPC component will try to judge and mitigate the events based on the previous data also in the absence of the immediate present data when there is a problem with sensors, such as power failures, technical glitches, etc. The place-based approach results proved to be very much useful for the prediction of uncertainties in the smart home environment. Four classifiers were used to examine the performance of proposed UPC and MLP proved to be more accurate in terms or predicting uncertainties. Place-based approach delivered better results as compared with the global approach and the training and testing times required by both the approaches also shown similar results.