Professional Documents
Culture Documents
Edited by
Krishna Kant Singh
Professor, Faculty of Engineering & Technology,
Jain (Deemed-to-be University), Bengaluru, India
Mohamed Elhoseny
College of Computer Information Technology,
American University in the Emirates, Dubai, United Arab Emirates
Akansha Singh
Department of CSE, ASET,
Amity University Uttar Pradesh, Noida, India
Ahmed A. Elngar
Faculty of Computers and Artificial Intelligence,
Beni-Suef University, Beni Suef City, Egypt
Academic Press is an imprint of Elsevier
125 London Wall, London EC2Y 5AS, United Kingdom
525 B Street, Suite 1650, San Diego, CA 92101, United States
50 Hampshire Street, 5th Floor, Cambridge, MA 02139, United States
The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, United Kingdom
Copyright © 2021 Elsevier Inc. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or by any means, electronic
or mechanical, including photocopying, recording, or any information storage and retrieval system,
without permission in writing from the publisher. Details on how to seek permission, further
information about the Publisher’s permissions policies and our arrangements with organizations such
as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website:
www.elsevier.com/permissions.
This book and the individual contributions contained in it are protected under copyright by the
Publisher (other than as may be noted herein).
Notices
Knowledge and best practice in this field are constantly changing. As new research and experience
broaden our understanding, changes in research methods, professional practices, or medical
treatment may become necessary.
Practitioners and researchers must always rely on their own experience and knowledge in evaluating
and using any information, methods, compounds, or experiments described herein. In using such
information or methods they should be mindful of their own safety and the safety of others, including
parties for whom they have a professional responsibility.
To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume
any liability for any injury and/or damage to persons or property as a matter of products liability,
negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas
contained in the material herein.
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library
Library of Congress Cataloging-in-Publication Data
A catalog record for this book is available from the Library of Congress
ISBN: 978-0-12-821229-5
v
vi Contents
Index ......................................................................................................................263
List of contributors
Gaurav Aggarwal
School of Computing and Information Technology, Manipal University Jaipur,
Jaipur, India
Ishpreet Aneja
Department of Data Science, Rochester Institute of Technology, Rochester, NY,
United States
Ashu Ashu
Department of Computer Science, Amity University, Noida, India
Pushpa Choudhary
Department of Information Technology, G. L. Bajaj Institute of Technology and
Management, Greater Noida, India
Subhadip Chowdhury
Durgapur Society of Management Science College, KNU, Asansol, India
Subhankar Das
Researcher and Lecturer, Honors Programme, Duy Tan University, Da Nang,
Vietnam
Ritam Dutta
Surendra Institute of Engineering and Management, MAKAUT, Kolkata, India
Lata Gadhavi
IT Department, Government Polytechnic Gandhinagar, Gandhinagar, India
G. S. Pradeep Ghantasala
Department of Computer Science and Engineering, Chitkara University
Institute of Engineering & Technology, Chandigarh, India
Sarada Prasad Gochhayat
Virginia Modeling, Analysis and Simulation Centre, Simulation and Visualization
Engineering, Old Dominion University, Suffolk, VA, United States
Nalli Vinaya Kumari
Department of Computer Science and Engineering, Malla Reddy Institute of
Technology and Science, Hyderabad, India
Subhra Rani Mondal
Researcher and Lecturer, Honors Programme, Duy Tan University, Da Nang,
Vietnam
Anand Nayyar
Faculty of Information Technology, Graduate School, Duy Tan University,
Da Nang, Vietnam
Rizwan Patan
Department of Computer Science and Engineering, Velagapudi Ramakrishna
Siddhartha Engineering College, Vijayawada, India
xiii
xiv List of contributors
Vandana Patel
Department of Instrumentation and Control Engineering, Lalbhai Dalpatbhai
College of Engineering, Ahmedabad, India
Anju S. Pillai
Department of Electrical and Electronics Engineering, Amrita School of
Engineering, Amrita Vishwa Vidyapeetham, Coimbatore, India
Vijayalakshmi Saravanan
Faculty in Department of Software Engineering, Rochester Institute of
Technology, Rochester, NY, United States
Ankit K. Shah
Department of Instrumentation and Control Engineering, Lalbhai Dalpatbhai
College of Engineering, Ahmedabad, India
Shilpi Sharma
Department of Computer Science, Amity University, Noida, India
Akansha Singh
Department of CSE, ASET, Amity University Uttar Pradesh, Noida, India
Arun Kumar Singh
Department of Information Technology, G. L. Bajaj Institute of Technology and
Management, Greater Noida, India
Krishna Kant Singh
Faculty of Engineering & Technology, Jain (Deemed-to-be University),
Bengaluru, India
Latika Singh
Ansal University, Gurugram, India
Narendra Singh
Department of Management Studies, G. L. Bajaj Institute of Management and
Research, Greater Noida, India
Pushpa Singh
Department of Computer Science and Engineering, Delhi Technical Campus,
Greater Noida, India
Ashish Tripathi
Department of Information Technology, G. L. Bajaj Institute of Technology and
Management, Greater Noida, India
Prem Chand Vashist
Department of Information Technology, G. L. Bajaj Institute of Technology and
Management, Greater Noida, India
Hong Yang
Department of Data Science, Rochester Institute of Technology, Rochester, NY,
United States
Noor Zaman
School of Computer Science and Engineering SCE, Taylor’s University, Subang,
Jaya, Malaysia
CHAPTER
Machine learning
architecture and framework
Ashish Tripathi1, Arun Kumar Singh1, Krishna Kant Singh2, Pushpa Choudhary1
1
and Prem Chand Vashist1
1
Department of Information Technology, G. L. Bajaj Institute of Technology and Management,
Greater Noida, India
2
Faculty of Engineering & Technology, Jain (Deemed-to-be University), Bengaluru, India
1.1 Introduction
In 1959, Arthur Samuel proposed the term Machine Learning (ML). He was the
master of artificial intelligence and computer gaming. He stated that machine
learning gives a learning ability to computers without being explicitly
programmed.
In 1997 a relational and mathematical-based definition of machine learning
was given by Tom Mitchell in that a computer program uses experience “e” to
learn from some task “t.” It applies “p” as a performance measure on “t” that
automatically improves with “e.”
In recent years, machine learning has been appearing as the most significant
technology around the globe to solve many real-life problems. So, it is emerging
as a very popular technology among the researchers and industry people for prob-
lem solving.
Machine learning is a subdomain of artificial intelligence (AI) that helps
machines to automatically learn from experience and improve their ability to take
decisions to solve any problem without taking any explicit instructions. The focus
of ML is to develop and apply computer programs that are able to learn from the
problem domain and make better decisions [1].
The learning process in ML starts with observing and analyzing the data
through different techniques, such as using examples, experiences, relying on pat-
tern matching in data, etc., that allows machines to take decisions without any
assistance from humans or any other intervention [2].
Machine-learning algorithms take a sample data set as an input, which is also
known as the training data set, to build and train a mathematical model (ML sys-
tem). Input data may include text, numerics, audio, multimedia, or visual things
and can be taken from various sources such as sensors, applications, devices,
networks, and appliances.
Machine Learning and the Internet of Medical Things in Healthcare. DOI: https://doi.org/10.1016/B978-0-12-821229-5.00005-7
Copyright © 2021 Elsevier Inc. All rights reserved.
1
2 CHAPTER 1 Machine learning architecture and framework
The mathematical model is used to extract knowledge from the input data
through analyzing itself without any explicit programming intervention.
After processing the data, it gives some response as an output. The output
may be in the form of an integer value or a floating-point value [3]. Fig. 1.1
shows the learning of a ML system from data with explicit programming support.
Unlike conventional algorithms, ML algorithms are applicable in different
applications, such as computer vision, filtering of emails, ecommerce, health care
systems, and many more, to provide effective solutions with high accuracy.
FIGURE 1.1
Learning of a ML system from different data sources.
1.1 Introduction 3
FIGURE 1.2
Phases of machine learning architecture.
The architecture of machine learning has been divided into five stages, such
as data acquisition, data processing, data modeling, execution, and deployment.
These stages are shown in Fig. 1.2.
The details are as follows:
FIGURE 1.3
Data acquisition.
Processing of data also depends on the learning techniques which have been
used to solve the problem [28]. For example, in the case of supervised learning,
data segregation is performed which creates sample data in several steps. The
sample data is further applied to train the system and thus the created sample data
is generally called the training data [29].
In unsupervised learning, the unlabeled data is mainly used for analysis pur-
poses. Thus this learning technique mainly deals with unpredictable data that are
more complicated and require complex processing as compared to other existing
learning techniques [29].
In this case data are grouped into clusters and each cluster belongs to a spe-
cific group. Each cluster is formed based on the granularity of the data.
The kind of processing is another factor of data processing which is based
on the features and action taken on the continuous data. Also, it may process
upon discrete data. Processing on discrete data may need memory bound proces-
sing [30].
So, the objective of this stage is to provide a clean and structured data set.
Sometimes, this stage is also known as the preprocessing stage. Some major steps
come under this phase of ML architecture, which are as follows:
It becomes very easy to retrieve the required information, which is necessary for
the visualization and analysis purposes of the data.
FIGURE 1.4
Data processing: data preprocessing.
8 CHAPTER 1 Machine learning architecture and framework
can be used further for data analysis. This is the significant step of data
transformation, where the quality and amount of data decide the accuracy of
the data analysis. There are various applications where data aggregation can
be used, which may include the finance sector, marketing plans, production-
related decisions, and product pricing.
4. Feature engineering: this is a significant task in ML architecture in which the
required features are selected and extracted from the data, which is relevant to
the task or model to be developed, as shown in Fig. 1.5. The relevant features
of data are further used to enhance the predictive efficiency ML algorithms.
Therefore feature engineering should be done correctly, otherwise it will
affect the overall development of the ML model. Feature engineering involves
four subtasks: (1) feature selection: it deals with selecting the most useful and
relevant features from the data; (2) feature extraction: selected features are
extracted from the data for data modeling; (3) feature addition: existing
features are added with new features selected and extracted from newly
gathered data; and (4) feature filtering: irrelevant features are filtered out to
make ML model more efficient and easy to handle.
The second subset of data is known as test data. The test data is used to test
the predictive hypothesis of the model which is created during the training. The
overall objective of the data modeling is to develop such a model, which is able
to do the predictive analysis of future data with high accuracy.
1.2.5 Deployment
Deployment is the crucial stage which decides how the model will be deployed
into the system for decision-making. At this stage the model actually is applied in
a real scenario and also undergoes further processing. Further the output of the
working model is applied as an instruction into the system for decision-making
activities [35].
The output of the ML operations is directly applied to the business production
where it plays a significant role in enabling the machine to take output-based
expert decisions without dependency on other factors. The deployment of ML
model is shown in Fig. 1.8.
1.3.2.1 TensorFlow
TenserFlow is an open source library specially designed to support and execute
programs for dataflow and also covers a wide range of operations.
For the internal use of Google especially in the research and development
activities, the Google Brain team developed this framework on November 9, 2015
under the open source license of Apache 2.0 [38,39].
Various machine-learning algorithms and tasks, such as classification, regres-
sion, and neural networks can be easily handled by TensorFlow. Both graphic
processing units (GPUs) and central processing units (CPUs) support the running
of this framework without any extra effort. Also, it can run on other platforms
such as desktops, servers, and mobile devices [38,39].
This framework is very flexible and easily adaptable by the system and sup-
ports various versions and models as well. Due to these capabilities, it is very
easy to migrate from nonautomatic to newer versions.
1.3.2.3 Scikit-learn
In 2007 David Cournapeau introduced the Scikit-Learn which was a part of sum-
mer code project of Google [42].
It is a powerful and open-source python library to code machine-learning
models. Libraries like Pandas, Numpy, IPython, SciPy, Matplotlib, and Sumpy
are the building blocks of Scikit-Learn.
It also provides various functionalities such as regression, classification, clus-
tering, preprocessing, and statistical modeling to solve real-world problems [29].
Scikit-Learn also offers some other functions which are very advanced and
rarely supported by other libraries, such as ensemble, feature manipulation, outlier
detection, and selection and validation of models [43].
Data mining and other various practical tasks can be easily handled by this
framework. This framework also provides the required ease and speed to handle
difficult tasks.
THE most of my story is now before the reader. Whatever of good or ill
the future may have in store for me, the past at least is secure. As I
review the last decade up to the present writing, I am impressed with a
sense of completeness; a sort of rounding up of the arch to the point
where the key stone may be inserted, the scaffolding removed, and the
work, with all its perfections or faults, left to speak for itself. This
decade, from 1871 to 1881, has been crowded, if time is capable of
being thus described, with incidents and events which may well
enough be accounted remarkable. To me they certainly appear
strange, if not wonderful. My early life not only gave no visible promise,
but no hint of such experience. On the contrary, that life seemed to
render it, in part at least, impossible. In addition to what is narrated in
the foregoing chapter, I have to speak of my mission to Santo
Domingo, my appointment as a member of the council for the
government of the District of Columbia; my election as elector at large
for the State of New York; my invitation to speak at the monument of
the unknown loyal dead, at Arlington, on Decoration day; my address
on the unveiling of Lincoln monument, at Lincoln Park, Washington; my
appointment to bring the electoral vote from New York to the National
Capital; my invitation to speak near the statue of Abraham Lincoln,
Madison Square, New York; my accompanying the body of Vice-
President Wilson from Washington to Boston; my conversations with
Senator Sumner and President Grant; my welcome to the receptions of
Secretary Hamilton Fish; my appointment by President R. B. Hayes to
the office of Marshal of the District of Columbia; my visit to Thomas
Auld, the man who claimed me as his slave, and from whom I was
purchased by my English friends; and my visit to Lloyd’s plantation, the
home of my childhood, after an absence of fifty-six years; my
appointment by President James A. Garfield to the office of Recorder
of Deeds of the District of Columbia, are some of the matters which
belong to this decade, and may come into the chapter I am now about
to write.
Those who knew of my more than friendly relations with Hon.
Charles Sumner, and of his determined opposition to the annexation of
Santo Domingo to the United States, were surprised to find me
earnestly taking sides with Gen. Grant upon that question. Some of my
white friends, and a few of those of my own color—who, unfortunately,
allow themselves to look at public questions more through the medium
of feeling than of reason, and who follow the line of what is grateful to
their friends rather than what is consistent with their own convictions—
thought my course was an ungrateful return for the eminent services of
the Massachusetts senator. I am free to say that, had I been guided
only by the promptings of my heart, I should in this controversy have
followed the lead of Charles Sumner. He was not only the most
clearsighted, brave, and uncompromising friend of my race who had
ever stood upon the floor of the Senate, but was to me a loved,
honored, and precious personal friend; a man possessing the exalted
and matured intellect of a statesman, with the pure and artless heart of
a child. Upon any issue, as between him and others, when the right
seemed in anywise doubtful, I should have followed his counsel and
advice. But the annexation of Santo Domingo, to my understanding,
did not seem to be any such question. The reasons in its favor were
many and obvious; and those against it, as I thought, were easily
answered. To Mr. Sumner, annexation was a measure to extinguish a
colored nation, and to do so by dishonorable means and for selfish
motives. To me it meant the alliance of a weak and defenceless
people, having few or none of the attributes of a nation, torn and rent
by internal feuds, unable to maintain order at home, or command
respect abroad, to a government which would give it peace, stability,
prosperity, and civilization, and make it helpful to both countries. To
favor annexation at the time when Santo Domingo asked for a place in
our union, was a very different thing from what it was when Cuba and
Central America were sought by fillibustering expeditions. When the
slave power bore rule, and a spirit of injustice and oppression
animated and controlled every part of our government, I was for
limiting our dominion to the smallest possible margin; but since liberty
and equality have become the law of our land, I am for extending our
dominion whenever and wherever such extension can peaceably and
honorably, and with the approval and desire of all the parties
concerned, be accomplished. Santo Domingo wanted to come under
our government upon the terms thus described; and for more reasons
than I can stop here to give, I then believed, and do now believe, it
would have been wise to have received her into our sisterhood of
States.
Charles Sumner
The idea that annexation meant degradation to a colored nation,
was altogether fanciful; there was no more dishonor to Santo Domingo
in making her a State of the American union, than in making Kansas,
Nebraska, or any other territory such a State. It was giving to a part the
strength of the whole, and lifting what must be despised for its isolation
into an organization and relationship which would compel
consideration and respect.
Though I differed from Mr. Sumner in respect of this measure, and
although I told him I thought he was unjust to President Grant, it never
disturbed our friendship. After his great speech against annexation,
which occupied six hours in its delivery, and in which he arraigned the
President in a most bitter and fierce manner, being at the White House
one day, I was asked by President Grant what I “now thought of my
friend Mr. Sumner”? I replied that I believed Mr. Sumner sincerely
thought, that in opposing annexation, he was defending the cause of
the colored race as he always had done, but that I thought he was
mistaken. I saw my reply was not very satisfactory, and said: “What do
you, Mr. President, think of Senator Sumner?” He answered, with
some feeling, “I think he is mad.”
The difference in opinion on this question between these two great
men was the cause of bitter personal estrangement, and one which I
intensely regretted. The truth is, that neither one was entirely just to
the other, because neither saw the other in his true character; and
having once fallen asunder, the occasion never came when they could
be brought together.
Variance between great men finds no healing influence in the
atmosphere of Washington. Interested parties are ever ready to fan the
flame of animosity and magnify the grounds of hostility in order to gain
the favor of one or the other. This is perhaps true in some degree in
every community; but it is especially so of the National Capital, and
this for the reason that there is ever a large class of people here
dependent upon the influence and favor of powerful public men for
their daily bread.
My selection to visit Santo Domingo with the commission sent
thither, was another point indicating the difference between the old
time and the new. It placed me on the deck of an American man-of-
war, manned by one hundred marines and five hundred men-of-wars-
men, under the national flag, which I could now call mine, in common
with other American citizens, and gave me a place not in the fore-
castle, among the hands, nor in the caboose with the cooks, but in the
captain’s saloon and in the society of gentlemen, scientists, and
statesmen. It would be a pleasing task to narrate the varied
experiences and the distinguished persons encountered in this Santo
Domingo tour, but the material is too boundless for the limits of these
pages. I can only say, it was highly interesting and instructive. The
conversations at the Captain’s table (at which I had the honor of a
seat) were usually led by Messrs. Wade, Howe, and White—the three
commissioners; and by Mr. Hurlburt of the New York World; the last-
named gentleman impressed me as one remarkable for knowledge
and refinement, in which he was no whit behind Messrs. Howe and
White. As for Hon. Benj. F. Wade, he was there, as everywhere,
abundant in knowledge and experience, fully able to take care of
himself in the discussion of any subject in which he chose to take a
part. In a circle so brilliant, it is no affectation of modesty to say I was
for the most part a listener and a learner. The commander of our good
ship on this voyage, Capt. Temple, now promoted to the position of
Commodore, was a very imposing man, and deported himself with
much dignity towards us all. For his treatment to me I am especially
grateful. A son of the United States navy as he was,—a department of
our service considerably distinguished for its aristocratic tendencies, I
expected to find something a little forbidding in his manner; but I am
bound to say that in this I was agreeably disappointed. Both the
commander and the officers under him bore themselves in a friendly
manner towards me during all the voyage, and this is saying a great
thing for them, for the spectacle presented by a colored man seated at
the captain’s table was not only unusual, but had never before
occurred in the history of the United States navy. If during this voyage
there was anything to complain of, it was not in the men in authority, or
in the conduct of the thirty gentlemen who went out as the honored
guests of the expedition, but in the colored waiters. My presence and
position seemed to trouble them for its incomprehensibility; and they
did not know exactly how to deport themselves towards me. Possibly
they may have detected in me something of the same sort in respect of
themselves; at any rate we seemed awkwardly related to each other
during several weeks of the voyage. In their eyes I was Fred. Douglass
suddenly, and possibly undeservedly, lifted above them. The fact that I
was colored and they were colored had so long made us equal, that
the contradiction now presented was too much for them. After all, I
have no blame for Sam and Garrett. They were trained in the school of
servility to believe that white men alone were entitled to be waited
upon by colored men; and the lesson taught by my presence on the
“Tennessee” was not to be learned upon the instant, without thought
and experience. I refer to the matter simply as an incident quite
commonly met with in the lives of colored men who, by their own
exertions or otherwise, have happened to occupy positions of
respectability and honor. While the rank and file of our race quote with
much vehemence the doctrine of human equality, they are often
among the first to deny and denounce it in practice. Of course this is
true only of the more ignorant. Intelligence is a great leveler here as
elsewhere. It sees plainly the real worth of men and things, and is not
easily imposed upon by the dressed up emptiness of human pride.
With a colored man on a sleeping car as its conductor, the last to
have his bed made up at night, and the last to have his boots blacked
in the morning, and the last to be served in any way, is the colored
passenger. This conduct is the homage which the black man pays to
the white man’s prejudice whose wishes, like a well-trained servant, he
is taught to anticipate and obey. Time, education, and circumstances
are rapidly destroying these mere color distinctions, and men will be
valued in this country as well as in others, for what they are, and for
what they can do.
My appointment at the hands of President Grant to a seat in the
council—by way of eminence sometimes called the upper house of the
territorial legislature of the District of Columbia—at the time it was
made, must be taken as a signal evidence of his high sense of justice,
fairness, and impartiality. The colored people of the district constituted
then as now about one-third of the whole population. They were given
by Gen. Grant, three members of this legislative council—a
representation more proportionate than any that has existed since the
government has passed into the hands of commissioners, for they
have all been white men.
Commissioners to Santo Domingo.
It has sometimes been asked why I am called “Honorable.” My
appointment to this council must explain this, as it explains the
impartiality of Gen. Grant, though I fear it will hardly sustain this
prodigious handle to my name, as well as it does the former part of this
proposition. The members of this district council were required to be
appointed by the President, with the advice and consent of the United
States Senate. This is the ground, and only ground that I know of,
upon which anybody has claimed this title for me. I do not pretend that