Professional Documents
Culture Documents
Article QR
History: Received: April 11, 2022, Revised: May 27, 2022, Accepted: June 8, 2022
A publication of
Department of Information System, Dr. Hasan Murad School of Management
University of Management and Technology, Lahore, Pakistan
Machine Learning Based Implementation of Home
Automation Using Smart Mirror
Aliya Batool1, Baqir Nadeem Hashmi2, Aqib Ali3*, Samreen Naeem3, Sania
Anam4, & Muhammad Munawar Ahmed5
1
Department of Information Technology, The Islamia University of Bahawalpur,
Pakistan.
2
Faculty of Technology Management and Business Universiti Tun Hussein Onn
Malaysia.
3
College of Automation, Southeast University, China.
4
Govt Degree College for Women Ahmadpur East Bahawalpur Pakistan,
Pakistan.
5
Department Information Technology, The Islamia University of Bahawalpur,
Pakistan
Abstract-When ordered, it may be manner. In addition, possible uses of
folded in half quickly and the Mirror are discussed. Compared
effortlessly. IoT (Internet of Things) to this DIY method, the cost is
technology drives the Smart substantially lower, and the result is
Mirror's functionality. Standard more predictable. The result
mirror functionality is included, in produced by the support vector
addition to showing the user's social machine classifier are of accuracy
notifications, daily tasks, weather which is 84% for detecting theft, and
updates, breaking news, reminders, the confusion matrix is often
voice assistant notifications, and diagonal, showing that this classifier
smartphone notifications. The Smart can accurately labelled the data.
Mirror is connected to the Similarly, F1 score of 0.82% shows
Raspberry Pi-based network that there are a few false positives
through Wi-Fi. A two-way mirror or and false negatives, which is a
an acrylic mirror sheet is used with favorable indicator.
the Raspberry-Pi mainboard to
Index Terms- Smart Mirror,
conceal the Mirror's rear end from
Programming, Language, Software,
the user. It supports modules written
Accuracy, Diagonal, Indicator.
in any programming language.
When Python is used as the primary
programming language, these I.Introduction
changes take care of the hardware Our living environment is
and software limitations. This work dynamic and constantly changing.
discusses the creation and building As science and technology advance,
of the Mirror in appropriate our way of life will become
*
Corresponding Author: aqibcsit@gmail.com
UMT Artificial Intelligence Review
38 Volume 2 Issue 1, Spring 2022
Batool et al.
ensure that model can learn from the When attempting to solve a
data [17]. challenging set of equations, such as
least squares, rounding mistakes can
C. Engineering Features
significantly affect the results. It
Both statistical modeling and would help if you still
machine learning use feature rescaled/standardized your data
engineering as a first step before before using techniques invariant to
entering data into a prediction feature scaling (like Fisher LDA or
model. It cannot be emphasized how Naive Bayes), such as Decision
vital feature engineering is to Trees and Tree-based Ensemble
machine learning and data science Methods (RF, XGB). On the other
in general. The main objective of hand, XGBoost also uses a linear
feature engineering is to maximize boosting approach. Therefore,
algorithmic performance. Machine growing the company will be
learning feature engineering beneficial [19].
involves more than just selecting
IV.Hardware Implementation
and manipulating features. By
ensuring that the dataset is A cheap and energy-efficient
consistent with the algorithm, solution have been developed. The
feature engineering can enhance the first module manages data
performance of machine learning collecting, followed by a second
models [18]. module that manages the user
interface and data processing.
D. Feature Scaling
A. IoT-Based Prototype
A strategy for normalizing
features is feature scaling IoT devices using Raspberry Pi,
(Normalization). Here, the data are Wifi Sensors, Proximity Sensors,
normalized via "data preparation," Ultrasonic Sensors for Abnormal
often called "data normalization." Movements, and Environmental
K-NN and SVM are particularly Sensors for Healthy Environment
sensitive to feature changes because Detection have been demonstrated
they rely on distances or similarities in this study. The IoT-based mirror
(e.g., in the form of scalar products) model for home automation is
between data samples, which makes depicted in the Figure 3 below
them dependent on feature scaling.
• 3-5V
• 2.5mA is the maximum current.
• Temperatures between 40 and
80°C, with a 0.5°C precision. c)
Humidity ranges from 0% to
100%, with a precision of two to
five percent.
• The DHT22 sensor board has
four pins (VCC, DATA, NC, Fig.7. Ultrasonic sensor
Department of Information Systems
45
Volume 2 Issue 1, Spring 2022
Machine Learning Based…
4. Bluetooth
With the help of the HC-05
Bluetooth Module (shown in Figure
8), a Bluetooth SPP (Serial Port
Protocol) module, setting up a
wireless serial connection is made
simple. It uses serial transmission
for communication, which makes
connecting to a controller or a Fig. 8. HC-05 Bluetooth
personal computer straightforward.
It works between 2.45GHz and V. Experiments and Results
2.47GHz. The data transfer rate may A new methodology has been
cover 1Mbps to 10 meters. The created due to the Internet of Things
working voltage for the HC-05 (IoT). A smart mirror for home
module is between 4-6V. The baud automation has been suggested as
rate, for instance, can be changed to one such idea. A piece of theft-
any value between 9600 and 19200 detection electronic equipment may
[24]. be used by those alone at home. The
hardware is shown schematically in
the following in Figure 9..
𝑇𝑇𝑇𝑇 (1)
Accuracy =
𝑇𝑇𝑇𝑇 + 𝑇𝑇𝑇𝑇
𝑇𝑇𝑇𝑇 (2)
Precision =
𝑇𝑇𝑇𝑇 + 𝐹𝐹𝐹𝐹
C. Logistic Regression
𝑇𝑇𝑇𝑇 (3) Two accuracy estimates were
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 =
𝑇𝑇𝑇𝑇 + 𝐹𝐹𝐹𝐹 obtained: one from the training data
and the other from the test data. If
𝐹𝐹1 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 (4) the training set accuracy is much
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 higher than the test set accuracy,
= comparing the two may show
𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃
overfitting. The correctness of the
For ML purposes, IoT data
test set is particularly crucial when
collection is transformed into CSV
assessing the performance of
files. The machine learning model's
anonymous data since it is unbiased.
main objective was to validate the
The obtain ROC curve and
accuracy tests based on sensor data.
confusion matrix shown in Figures
The following observations were
10, 11 respectively.
discovered in datasets:
Demand-based Smart Mirror uses Pakistan for their support for this
IoT technologies (Internet of research. This research received no
Things). The Mirror may also specific grant from any funding
display reminders, voice-activated agency in the public, commercial, or
notifications, daily tasks, weather not-for-profit sectors.
updates, breaking news, and other
References
smartphone-sent information. Smart
Mirror and Raspberry Pi network are [1] E. Gwiaździński, D.
connected over Wi-Fi. Raspberry-Pi Kaczorowska-Spychalska & L.
mainboards paired with two-way M. Pinto, Is it a smart city a
mirrors or acrylic mirror sheets creative place?. Creativity
disguise the Mirror's rear end. This Studies, 13(2), 460-476, 2020.
accomplishes the goal. Modules can
be written in any language that [2] S. A. Butt, J. L. Diaz-Martinez,
supports C programming. When T. Jamal, A. Ali, E. De-La-Hoz-
Python is the primary programming Franco, & M. Shoaib, IoT Smart
language, software and hardware Health Security Threats.
restrictions must be accounted for.
This article describes how the Mirror Proceedings - 2019 19th
was conceptualized and built. International Conference on
Computational Science and Its
This approach is cheaper and
more predictable than DIY. Smart Applications, ICCSA 2019, 26–
mirrors can increase people's 31.
capacity to interact with and obtain https://doi.org/10.1109/ICCSA.
information. This strategy benefits 2019.000-8.
all ages, including individuals with
disabilities, elders, and toddlers. [3] P. V. P. Sit & P. V. P. Sit, An
Anyone can utilize this approach, Interactive Smart Mirror based
even if they are going about their
On IoT Platform. 5(5), 2017.
everyday business. They can live
independently and comfortably as a [4] S. Khale, A. Sathe, R. Salunke,
result. Future goals include user S. Nathan, & A. Maurya, Smart
authentication using a camera
module attached to a smart mirror mirror. International Journal of
and hand gesture control of the Recent Technology and
mirror. Engineering, 8(2 Special Issue
Acknowledgment 11), 925–929, 2019.
https://doi.org/10.35940/ijrte.B
The authors acknowledge
Concordia College Bahawalpur, 1152.0982S1119.
Department of Information Systems
51
Volume 2 Issue 1, Spring 2022
Machine Learning Based…