100% found this document useful (4 votes)
52 views

Full Download Bio-Inspired Algorithms For Data Streaming and Visualization, Big Data Management, and Fog Computing Simon James Fong PDF

James

Uploaded by

ntunahbevere
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
52 views

Full Download Bio-Inspired Algorithms For Data Streaming and Visualization, Big Data Management, and Fog Computing Simon James Fong PDF

James

Uploaded by

ntunahbevere
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Download the full version of the textbook now at textbookfull.

com

Bio-inspired Algorithms for Data Streaming


and Visualization, Big Data Management, and
Fog Computing Simon James Fong

https://textbookfull.com/product/bio-inspired-
algorithms-for-data-streaming-and-visualization-
big-data-management-and-fog-computing-simon-james-
fong/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/

textbookfull.com

Probabilistic data structures and algorithms for big data


applications Gakhov

https://textbookfull.com/product/probabilistic-data-structures-and-
algorithms-for-big-data-applications-gakhov/

textbookfull.com

Artificial Intelligence for Coronavirus Outbreak Simon


James Fong

https://textbookfull.com/product/artificial-intelligence-for-
coronavirus-outbreak-simon-james-fong/

textbookfull.com

The Making of a Modern Art World Institutionalisation and


Legitimisation of Guohua in Republican Shanghai Pedith Pui
Chan
https://textbookfull.com/product/the-making-of-a-modern-art-world-
institutionalisation-and-legitimisation-of-guohua-in-republican-
shanghai-pedith-pui-chan/
textbookfull.com
Word of mouth: Fama and its personifications in art and
literature from ancient Rome to the Middle Ages First
Edition Gianni Guastella
https://textbookfull.com/product/word-of-mouth-fama-and-its-
personifications-in-art-and-literature-from-ancient-rome-to-the-
middle-ages-first-edition-gianni-guastella/
textbookfull.com

The Complete Strength Training Guide Practical guidelines


for strength training Floril

https://textbookfull.com/product/the-complete-strength-training-guide-
practical-guidelines-for-strength-training-floril-2/

textbookfull.com

Textbook of Hernia 1st Edition William W. Hope

https://textbookfull.com/product/textbook-of-hernia-1st-edition-
william-w-hope/

textbookfull.com

Trends in Asian Water Environmental Science and Technology


1st Edition Futoshi Kurisu

https://textbookfull.com/product/trends-in-asian-water-environmental-
science-and-technology-1st-edition-futoshi-kurisu/

textbookfull.com

Curriculum development in nursing education Fourth Edition


Dolly Goldenberg

https://textbookfull.com/product/curriculum-development-in-nursing-
education-fourth-edition-dolly-goldenberg/

textbookfull.com
Forging Connections in Early Mathematics Teaching and
Learning 1st Edition Virginia Kinnear

https://textbookfull.com/product/forging-connections-in-early-
mathematics-teaching-and-learning-1st-edition-virginia-kinnear/

textbookfull.com
Springer Tracts in Nature-Inspired Computing

Simon James Fong


Richard C. Millham Editors

Bio-inspired
Algorithms for Data
Streaming and
Visualization, Big
Data Management,
and Fog Computing
Springer Tracts in Nature-Inspired Computing

Series Editors
Xin-She Yang, School of Science and Technology, Middlesex University, London,
UK
Nilanjan Dey, Department of Information Technology, Techno India College of
Technology, Kolkata, India
Simon Fong, Faculty of Science and Technology, University of Macau, Macau,
Macao
The book series is aimed at providing an exchange platform for researchers to
summarize the latest research and developments related to nature-inspired
computing in the most general sense. It includes analysis of nature-inspired
algorithms and techniques, inspiration from natural and biological systems,
computational mechanisms and models that imitate them in various fields, and
the applications to solve real-world problems in different disciplines. The book
series addresses the most recent innovations and developments in nature-inspired
computation, algorithms, models and methods, implementation, tools, architectures,
frameworks, structures, applications associated with bio-inspired methodologies
and other relevant areas.
The book series covers the topics and fields of Nature-Inspired Computing,
Bio-inspired Methods, Swarm Intelligence, Computational Intelligence,
Evolutionary Computation, Nature-Inspired Algorithms, Neural Computing, Data
Mining, Artificial Intelligence, Machine Learning, Theoretical Foundations and
Analysis, and Multi-Agent Systems. In addition, case studies, implementation of
methods and algorithms as well as applications in a diverse range of areas such as
Bioinformatics, Big Data, Computer Science, Signal and Image Processing,
Computer Vision, Biomedical and Health Science, Business Planning, Vehicle
Routing and others are also an important part of this book series.
The series publishes monographs, edited volumes and selected proceedings.

More information about this series at http://www.springer.com/series/16134


Simon James Fong Richard C. Millham

Editors

Bio-inspired Algorithms
for Data Streaming
and Visualization, Big Data
Management, and Fog
Computing

123
Editors
Simon James Fong Richard C. Millham
University of Macau Durban University of Technology
Taipa, China Durban, South Africa

ISSN 2524-552X ISSN 2524-5538 (electronic)


Springer Tracts in Nature-Inspired Computing
ISBN 978-981-15-6694-3 ISBN 978-981-15-6695-0 (eBook)
https://doi.org/10.1007/978-981-15-6695-0

© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Singapore Pte Ltd. 2021
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether
the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and
transmission or information storage and retrieval, electronic adaptation, computer software, or by similar
or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with respect to the material contained
herein or for any errors or omissions that may have been made. The publisher remains neutral with regard
to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721,
Singapore
Preface

The purpose of this book is to provide some insights into recently developed
bio-inspired algorithms within recent emerging trends of fog computing, sentiment
analysis, and data streaming as well as to provide a more comprehensive approach
to the big data management from pre-processing to analytics to visualisation phases.
Although the application domains of these new algorithms may be mentioned, these
algorithms are not confined to any particular application domain. Instead, these
algorithms provide an update into emerging research areas such as data streaming,
fog computing, and phases of big data management.
This book begins with the description of bio-inspired algorithms with a
description on how they are developed, along with an applied focus on how they
can be applied to missing value extrapolation (an area of big data pre-processing).
The book proceeds to chapters including identifying features through deep learning,
overview of data mining, recognising association rules, data streaming, data visu-
alisation, business intelligence and current big data tools.
One of the reasons for writing this book is that the bio-inspired approach does
not receive much attention although it continues to show considerable promise and
diversity in terms of approach of many issues in big data and streaming. This book
outlines the use of these algorithms to all phases of data management, not just a
specific phase such as data mining or business intelligence. Most chapters
demonstrate the effectiveness of a selected bio-inspired algorithm by experimental
evaluation of it against comparative algorithms. One chapter provides an overview
and evaluation of traditional algorithms, both sequential and parallel, for use in data
mining. This chapter is complemented by another chapter that uses a bio-inspired
algorithm for data mining in order to enable the reader to choose the most
appropriate choice of algorithms for data mining within a particular context. In all
chapters, references for further reading are provided, and in selected chapters, we
will also include ideas for future research.

Taipa, China Simon James Fong


Durban, South Africa Richard C. Millham

v
Contents

1 The Big Data Approach Using Bio-Inspired Algorithms: Data


Imputation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Richard Millham, Israel Edem Agbehadji, and Hongji Yang
2 Parameter Tuning onto Recurrent Neural Network and Long
Short-Term Memory (RNN-LSTM) Network for Feature
Selection in Classification of High-Dimensional
Bioinformatics Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Richard Millham, Israel Edem Agbehadji, and Hongji Yang
3 Data Stream Mining in Fog Computing Environment
with Feature Selection Using Ensemble of Swarm
Search Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Simon Fong, Tengyue Li, and Sabah Mohammed
4 Pattern Mining Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Richard Millham, Israel Edem Agbehadji, and Hongji Yang
5 Extracting Association Rules: Meta-Heuristic and Closeness
Preference Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Richard Millham, Israel Edem Agbehadji, and Hongji Yang
6 Lightweight Classifier-Based Outlier Detection Algorithms
from Multivariate Data Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Simon Fong, Tengyue Li, Dong Han, and Sabah Mohammed
7 Comparison of Contemporary Meta-Heuristic Algorithms
for Solving Economic Load Dispatch Problem . . . . . . . . . . . . . . . . 127
Simon Fong, Tengyue Li, and Zhiyan Qu
8 The Paradigm of Fog Computing with Bio-inspired Search
Methods and the “5Vs” of Big Data . . . . . . . . . . . . . . . . . . . . . . . . 145
Richard Millham, Israel Edem Agbehadji,
and Samuel Ofori Frimpong

vii
viii Contents

9 Approach to Sentiment Analysis and Business Communication


on Social Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Israel Edem Agbehadji and Abosede Ijabadeniyi
10 Data Visualization Techniques and Algorithms . . . . . . . . . . . . . . . . 195
Israel Edem Agbehadji and Hongji Yang
11 Business Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Richard Millham, Israel Edem Agbehadji, and Emmanuel Freeman
12 Big Data Tools for Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Richard Millham
About the Editors

Simon James Fong graduated from La Trobe University, Australia, with a


First-Class Honours B.E. Computer Systems degree and a Ph.D. Computer Science
degree in 1993 and 1998, respectively. Simon is now working as an Associate
Professor at the Computer and Information Science Department of the University of
Macau. He is a Co-Founder of the Data Analytics and Collaborative Computing
Research Group in the Faculty of Science and Technology. Prior to his academic
career, Simon took up various managerial and technical posts, such as Systems
Engineer, IT Consultant, and E-commerce Director in Australia and Asia. Dr. Fong
has published over 500 international conference and peer-reviewed journal papers,
mostly in the areas of data mining, data stream mining, big data analytics,
meta-heuristics optimization algorithms, and their applications. He serves on the
editorial boards of the Journal of Network and Computer Applications of Elsevier,
IEEE IT Professional Magazine, and various special issues of SCIE-indexed
journals. Currently, Simon is chairing a SIG, namely Blockchain for e-Health at
IEEE Communication Society.

Richard C. Millham a B.A. (Hons.) from the University of Saskatchewan in


Canada, M.Sc. from the University of Abertay in Dundee, Scotland, and a Ph.D.
from De Montfort University in Leicester, England. After working in industry in
diverse fields for 15 years, he joined academe and he has taught in Scotland, Ghana,
South Sudan, and the Bahamas before joining DUT. His research interests include
software and data evolution, cloud computing, big data, bio-inspired algorithms,
and aspects of IOT.

ix
Chapter 1
The Big Data Approach Using
Bio-Inspired Algorithms: Data
Imputation

Richard Millham, Israel Edem Agbehadji, and Hongji Yang

1 Introduction

In this chapter, the concept of big data is defined based on the five characteristics
namely velocity, volume, value, veracity, and variety. Once defined, the sequential
phases of big data are denoted, namely data cleansing, data mining, and visual-
ization. Each phase consists of several sub-phases or steps. These steps are briefly
described. In order to manipulate data, a number of methods may be employed.
In this chapter, we look at an approach for data imputation or the extrapolation of
missing values in data. The concept of genetic algorithms along with its off-shoot,
meta-heuristic algorithms, is presented. A specialized type of meta-heuristic algo-
rithm, bio-inspired algorithms, is introduced with several example algorithms. An
example, a bio-inspired algorithm, the kestrel, is introduced using the steps outlined
for the development of a bio-inspired algorithm (Zang et al. 2010). This kestrel algo-
rithm will be used as an approach for data imputation within the big data phases
framework.

R. Millham (B) · I. E. Agbehadji


ICT and Society Research Group, Durban University of Technology, Durban, South Africa
e-mail: [email protected]
I. E. Agbehadji
e-mail: [email protected]
H. Yang
Department of Informatics, University of Leicester, Leicester, England, UK
e-mail: [email protected]

© The Editor(s) (if applicable) and The Author(s), under exclusive license 1
to Springer Nature Singapore Pte Ltd. 2021
S. J. Fong and R. C. Millham (eds.), Bio-inspired Algorithms for Data
Streaming and Visualization, Big Data Management, and Fog Computing,
Springer Tracts in Nature-Inspired Computing,
https://doi.org/10.1007/978-981-15-6695-0_1
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
2 R. Millham et al.

2 Big Data Framework

The definition of big data varies from one author to another. A common definition
might be that it denotes huge volume and complicated data sets because it comes
from heterogeneous sources (Banupriya and Vijayadeepa 2015). Because of the enor-
mous variety in definitions, big data is often known by its characteristics of velocity,
volume, value, veracity, and variety which constitutes the framework of big data.
Velocity relates to how quickly incoming data needs to be evaluated with results
produced Longbottom and Bamforth (2013). Volume relates to the amount of data to
be processed. Veracity relates to the accuracy of results emerging from the big data
processes. Value is the degree of worth that the user will obtain from the big data
analysis.

3 Evolutionary and Bio-Inspired Methods

Genetic algorithms (GA) inherited the principles of “Darwin’s Evolutionary Theory”.


Genetic algorithms provide solutions to a search problem by using biological evolu-
tion principles. Nature breeds a large number of optimized solutions which have been
discovered and deployed to solve problems (Zang et al. 2010). Genetic algorithm
adopts some common genetic expressions such as
(1) Chromosome: where the solution to an optimization problem is encoded (Cha
and Tappert 2009).
(2) Selection: a phase where individual chromosomes are evaluated and the best
are chosen to raise the next generation.
(3) “Crossover” and “mutation” are genetic methods for pairing parents to change
their genetic makeup through the process of breeding.
The first phase of a genetic algorithm produces initial population which represents
randomly generated individuals. This individual forms a range of potential solutions
in which the population size is determined by the nature of the problem. The initial
population represents the search space and the algorithm begins with an initial esti-
mate. Then the operators of crossover and mutation are applied to the population in
order to try to improve the estimate through evolution (Agbehadji 2011). The next
phase assesses the individual of a given population to determine their fitness values
through a fitness function. The higher the fitness value of individuals, the greater the
probability that the individual will be selected for the next generation. This process of
mutation, selection via the fitness function, and generation/iteration continues until
a termination criteria, or final optimal value or solution, is met.
Because of its adaptive and iterative nature, genetic algorithm may be used to
discover multiple types of optimal solutions from a set of initial random potential
solutions. Given the continuous updating of the population through the application
of genetic operators and the culling-off weak generation via a fitness function, the
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 3

gradual improvement of the population to a termination condition, or optimal solu-


tion, is made. One such solution that may be determined via genetic algorithm is
discovering an optimal path (Dorigo et al. 2006). A practical application of a genetic
algorithm is extrapolating missing values in a dataset (Abdella and Marwala 2006).
Meta-heuristic search or bio-inspired search or nature-inspired search methods
are mostly used interchangeably to refer to search algorithms developed from the
behaviour of living creatures in their natural habitat. Conceptually, living creatures
are adapted to make random decisions that can steer them either towards hunt or away
from its enemy. Meta-heuristic search methods can be combined to develop a more
robust search algorithm for any complex problems. The advantage of meta-heuristic
search method is the ability to ignore a search that is not promising. Generally, meta-
heuristic search algorithm begin with random set of individuals where each represents
a possible solution. In each generation, instead of mutation, there is a random Levy
walk (which corresponds to the random movements of animals/random searches for
an optimal solution). At the end of each generation, the fitness of each individual of
that generation is evaluated via a specified fitness function. Only those individuals
that meet a prescribed threshold of fitness, as determined by a fitness function, are
allowed to continue as parents for the next generation. The succession of generation
continues until some pre-defined stopping criteria is reached; ideally, this stopping
criteria is when a near-optimal solution has been found (Fong 2016).

3.1 Development Process for Bio-Inspired Algorithms

These are the stages in developing a bio-inspired algorithms:


(a) Firstly: identify the unique behaviour of a creature in nature,
(b) Secondly: formulate basic expressions on their behaviour.
(c) Thirdly, transform the basic expression into mathematical equation, identify
some underlying assumptions, and setup initial parameters,
(d) Fourthly, write a pseudo-code to represent the basic expression,
(e) Fifth: test the code on actual data and refine the initial parameter for better
performance of the algorithm.
Usually, animal behaviour constitutes actions relative to its environment and
context; thus, a particular animal behaviour should be modelled in conjunction with
other animal behaviours, other in terms of a team of individuals or another species,
in order to achieve better results. Therefore, the nature-inspired algorithms can be
combined with other algorithms for an efficient result and more robust algorithm
(Zang et al. 2010).

3.1.1 Examples of Bio-Inspired Algorithms

Bio-inspired algorithms can focus on the collective behaviour of multiple simple


individuals (as in particle swarm) (Selvaraj et al. 2014), the co-operative behaviour
4 R. Millham et al.

of more complex individuals (as in wolf search algorithm) (Tang et al. 2012), or the
single behaviour of an individual (Agbehadji et al. 2016b). Within these categories,
such as particle swarm, there are many types (such as artificial bee colony), and
within these types, there are many applications of the same algorithm for such things
as image processing, route optimization, etc. (Selvaraj et al. 2014).
A major category of bio-inspired algorithms are particle swarm algorithms.
Particle swarm algorithms is a bio-inspired technique that mimics the swarm
behaviour of animals such as fish schools or bird flocks (Kennedy and Eberhart
1995). The behaviour of the swarm is determined by how particles adapt and make
decisions in changing their position within a space relative to the positions of neigh-
bouring particles. The advantage of swarm behaviour is that as particles make a
decision, it leads to local interaction among particles which in turn, lead it to an
emergent behaviour (Krause et al. 2013). Particle swarm algorithm that focuses on
finding the near-optimal solution includes the firefly algorithm, bats (Yang and Deb
2009) and cuckoo birds (Yang and Deb 2009).

3.1.2 Firefly Algorithm

The basis of the firefly algorithm’s behaviour is the short and rhythmic flashes it
produces. This flashing light of fireflies is used as an instrument to attract possible
prey, attract mating partners, and to act as a warning signal. The firefly signalling
system consists of rhythmic flash, frequency of flashing light and time period of
flashing. This signalling system is controlled by simplified basic rules underlining
the behaviour of firefly that can be summarized as, one firefly can be connected with
another; hence, this connection which refers to attractiveness is proportional to the
level of brightness between each firefly and brightness is affected by landscape (Yang
2010a, b, c). The attraction formulation is based on the following assumptions:
(a) Each firefly attracts another fireflies that has a weak flash light
(b) This attraction depends on the level of brightness of the flash which is reversely
proportional to their proximity to each other
(c) The firefly with the brightest flash is not attracted to any other firefly and their
flight is random (Yang 2010a, b, c).
The signal of this flashing light instrument is governed by a simplified basic rule
which forms the basis of firefly behaviour. In comparison with a genetic algorithm, it
uses what is referred to as operators that are mutation, crossover, and selection. The
firefly uses attractiveness and brightness of its flashing light. The similarity between
the firefly algorithm and the genetic algorithm is that both algorithms generate an
initial population which is updated continuously at each iteration, via fitness function.
In terms of firefly behaviour, the brighter fireflies attract those fireflies nearest to them
and those fireflies whose brightness fall below a defined threshold are removed from
subsequent population. The brightest fireflies, whose brightness have exceeded a
specified threshold, constitute the next generation and this generation continues until
either a termination criteria (best possible solution) is met or the highest number of
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 5

iterations is achieved. The use of brightness in firefly algorithm is to help attract the
weaker firefly which mimics the extrapolation of missing values in a dataset where
the fireflies represent known values and those with the brightest light (indicating
closeness to the missing values as well as nearness to the set of data including the
missing value) are selected as suitable to replace the missing value entries.

3.1.3 Bat Search Algorithms

The bat search algorithm is another bio-inspired search technique that is grounded
on the behaviour of micro-bats within their natural environment (Yang 2010a, b, c).
Bat is known to have a very unique behaviour called echolocation. This characteristic
assists bats to orient themselves and find prey within their habitat. The search strategy
of a bat, whether to navigate or to capture prey, is governed by the pulse rate and
loudness of their cry. This pulse rate governs the enhancement of the best possible
solution, its loudness affects the acceptance of the best possible solution (Fister
et al. 2014). Similar to genetic search algorithm, the bat search algorithm begins
with random initialization, evaluation of the newly generated population, and after
multiple iterations, the best possible solution is outputted. In contrast to the wolf
search algorithm that uses attractiveness, the bat search algorithm uses its pulse rate
and loudness to steer its search for a near-optimal solution. The bat search algorithm,
with its behaviour, has been applied to several optimization problems to find the best
possible solution.

3.1.4 Wolf Search Algorithm

The wolf search algorithm (WSA) is a nature-inspired algorithm that focuses on


a wolf’s preying behaviour (Tang et al. 2012). This preying behaviour, as derived
from wolves’ behaviour, demonstrates that wolves are able to hunt independently by
recalling their own trait; have the ability to join with a fellow wolf only when the
other wolf is in a better position; and have the ability to randomly escape when a
hunter appears. This expressed wolf behaviour allows them to adapt to their habitat
when hunting for prey. Because wolves have the ability to join a fellow wolf in a
better position, it implies that wolves have some trust in each other and they avoid
preying upon each other. In addition, wolves prefer to only move into territory mark
by other wolves which indicates that the territory is safe for other wolves to live in.
Moreover, if this new location is better, the motivation is stronger especially if this
new location is within territory already occupied by a fellow wolf. This wolf search
algorithm can be defined as a search procedure which begins with setting the initial
population, evaluating the candidate population and updating the current population
via fitness test, and continuous until stopping criteria is met. Particle swarm algo-
rithms, like firefly, attract its prey by using the characteristics of attractiveness and
brightness while wolf uses the characteristic of attractiveness of prey within its visual
range. Wolves also have both individual search capability and independent flocking
6 R. Millham et al.

movement. In WSA, consequently, the swarming behaviour of wolves, unlike other


nature-inspired algorithms, is delegated to individual wolf instead of a single leader,
as is the case in the particle swarm and firefly algorithms. In practice, WSA works as
if there are “multiple leaders swarming from multiple directions” to the best possible
solution instead of a “single flock” that searches for the best possible solution in one
direction at a time (Tang et al. 2012). Similar to the firefly and bat, the WSA char-
acteristic and behaviour towards attraction can be used to extrapolate the estimated
value that is near to known values in any missing data imputation method.
Nature-inspired or bio-inspired search algorithms are characterized by random-
ization, efficient local search and finding of global best results (Yang 2010a, b, c).
With the newly developed kestrel search algorithm, the random circling of a kestrel
is examined to see how it may be used to achieve a best possible solution (estimates
closest to missing values). The advantage of the random encircling method of the
kestrel, unlike other bio-inspired algorithms, is that it maximizes the local search
space, and in so doing, it creates a wider range of possible solutions, based on a
hovering position, in order to assess and obtain the best possible solution.

3.1.5 Kestrel Behaviour

In keeping with Zang et al. (2010)’s prescribed method of developing a bio-inspired


search algorithm, in this case that of a kestrel bird, the behaviour is observed and
briefly summarized to depict its behaviour in a natural environment. This search
algorithm of a kestrel bird is based on its hunting characteristics that are either
hovering or perched hunt. Kestrels are highly territorial and hunt individually (Shrubb
1982; Varland 1991). One researcher, Varland (1991), recognized that during hunts,
kestrels tend to be imitative rather than co-operative. In other words, kestrels choose
“not to communicate with each other” instead they “imitate the behaviour of other
kestrels with better hunting techniques”. With mimicking better techniques comes the
improvement of their own technique. The hunt technique, however, can be dependent
on such factors such as the type of prey, current weather conditions, and energy
requirements (for gliding or diving) (Vlachos et al. 2003).
During their hunt, kestrels use their “eyesight to view small and agile prey” within
its coverage area, as defined by its visual circling radius. Prey availability is indicated
either through a “trail of urine and faeces” from ground-based prey or through the
minute air disturbance from airborne-based prey. Once the prey availability is identi-
fied, the “kestrel positions itself to hunt”. Kestrels can “hover in changing airstream,
maintain fixed forward” looking position with its eye on a potential prey, and use
“random bobbing” of its head to find the minimum distance between its “position
and the position of prey”. Because kestrels can view ultraviolet light, they are able
to discover trails of urine and faeces left by prey such as voles (Honkavaara et al.
2002).
While hovering, kestrels can perform a broader search (e.g. global exploration)
across different territories within its “visual circling radius”, are able to “maintain
a motionless position with their forward-looking eyes fixed on prey, detect tiny
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 7

air disturbances from flying prey (especially flying insects) as indicators of prey”,
and can move “with precision through a changing airstream”. Kestrels have the
ability to flap their winds and adjust their long tails in order to stay in a place
(denoted as a still position) in a “changing airstream”. While in perch mode (often
perching from high fixed structures such as poles or trees), kestrels change their
perch position every few minutes before performing a thorough search (which is
denoted as “local exploitation” based on its individual hunt behaviour) of its local
territory which requires “less energy than a hovering hunt”. While in perch mode, the
kestrel uses its ultraviolet detection capacity to discover potential prey such as voles
nearer to its perch area. This behaviour suggests that while in perch stance, kestrel
uses this position to conserve some energy and to focus their ultraviolet detection
capabilities for spotting slow moving prey on the ground. Regardless of perch or
hovering mode, skill development also plays a role. Individual kestrels with better
“perch and hovering skills” that are utilized in a larger search area possess a better
chance to swoop down faster on their prey or flee from its enemies than “individual
kestrels that develop hunting skills in local territories” (Varland 1991). Consequently,
it is important to combine hunting skills from both hovering and perch modes in order
to accomplish a successful hunt.
In order to better characterize the kestrel, certain traits are given as their defining
behaviour:
(1) Soaring: it provides a wider search space (global exploration) within their visual
coverage area

(a) Still (motionless) location with eyesight set on prey


(i) Encircles prey underneath it using its keen eyesight

(2) Perching: this enables thorough search or local exploitation within a visual
coverage radius

(a) Behaviour involves “frequent bobbing of head” to find the best position of
attack
(b) Using a trail, identify potential prey and then the kestrel glides to capture
prey

These behavioural characteristics are based on the following assumptions:


(a) The still position of the kestrel bird provides a near perfect circle. Consequently,
frequent changes in circle direction depend on the position of prey shifting the
centre of this circling direction
(b) The frequent bobbing of the kestrel’s head provides a “degree of magnified
or binocular vision” that assists in judging the distance from the kestrel to a
potential prey and calculating a striking move with the required speed
(c) “Attractiveness is proportional to light reflection”. Consequently, “the higher or
longer a distance from the trail to the kestrel, the less bright of a trail”. This
distance parameter applies to both the hovering height and the distance away
from the perch.
8 R. Millham et al.

(d) “New trails are more attractive than old trails”. Thus, the trail decay, as the trail
evaporates, depends on “the half-life of the trail”.

Mathematical Model of Kestrel’s Behaviour

Following the steps of Zang et al. (2010), a model that represents the kestrel behaviour
is expressed mathematically. The following sets of kestrel characteristics, with their
mathematical equivalents, are provided below:
• Encircling behaviour

This encircling behaviour occurs when the “kestrel randomly shifts (or changes)” its
“centre of circling direction” in response to detecting the current position of prey.
When the prey changes from its present position, the kestrel randomly shifts, or
changes, the “centre of circling direction” in order to recognize the present position
of prey. With the change of position of prey, the kestrel correspondingly alters its
encircling behaviour to encircle its prey. The movement of prey results in the kestrel
adopting the best possible position to strike. This encircling behaviour
D (Kumar 2015) is denoted in Eq. 1 as:
→ 
 = −
D C ∗−
→ 
x p (t) − x(t) (1)

 denoted in equation 2as:


Cis

C = 2 ∗ −

r1 (2)

where C is the “coefficient vector”, −



x p (t) is the position vector of the prey, and x(t)
represents the position of a kestrel, r1 and r2 are random values between 0 and 1
indicating random movements.
• Current position

The present best position of the kestrel is denoted in Eq. 3 as follows:

x(t + 1) = −

x p (t) − A ∗ D
 (3)

Consequently, the coefficient A is denoted in Eq. 4 as follows:

A = 2 ∗ z ∗ −

r2 − z (4)

where A also represents coefficient vector, D  is the encircling value acquired, −



x p (t)
is the prey’s position vector, x(t + 1) signifies present best position of kestrels. z
decreases linearly from 2 to 0 and this value is also used to “control the randomness”
at each iterations. The z is denoted in Eq. 5 as follows:
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 9

itr
z = z hi − (z hi − z low ) (5)
Max_ itr

where itr is the current iteration, Max_itr represents maximum number of iterations
that stop the search, zhi denotes the higher bound of 2, zlow denotes the lower bound
of 0. Any other kestrels included in this search for prey will update their position
based on the best position of the leading kestrel. In addition, the change in position in
the airstream for kestrels is dependent on the “frequency of bobbing”, how it attracts
prey and “trail evaporation”. These dependent variables are denoted as follows:
(a) Frequency of bobbing

The bobbing frequency is used to determine sight distance measurement within the
search space. This is denoted in Eq. 6 as follows:
 
k
f t+1 = f min + f max − f min ∗ α (6)

where α ∈ [0, 1] indicates a random number to govern the “frequency of bobbing


within a visual range”. The maximum frequency f max is set at 1 while the minimum
frequency f min is set at 0.
(b) Attractiveness

Attractiveness β denotes the light reflection from trails, which is expressed in Eq. (7)
as follows:

β(r ) = βo e−γ r
2
(7)

where βo equals lo and constitutes the initial attractiveness, γ denotes variation of


light intensity between [0, 1]. r denotes the sight distance s(xi , xc ) measurement
which is calculated using “Minkowski distance” expression in Eq. (8) as:


n
|xi,k − xc,k |λ ) λ
1
s(xi , xc ) = ( (8)
k=1

Consequently, Eq. 9 expresses the visual range as follows:

V ≤ s(xi , xc ) (9)

where x i denotes the current sight measurement, x c indicates all possible adjacent
sight measurement near x i , n is the total number of adjacent sights and λ is the order
(values of 1 or 2) and V is the visual range.
(c) Trail evaporation

A trail may be defined as way to form and maintain a line (Dorigo and Gambardella
1997). In meta-heuristic algorithms, trails are used by ants to track the path from their
10 R. Millham et al.

home to a food source while avoiding getting mired to just one food source. Thus,
these trails enable multiple food sources to be used within a search space. (Agbehadji
2011) While ants search continuously, trails are developed with elements attached to
these trails. These elements assist ants in communicating with each other regarding
the position of food sources. Consequently, other ants constantly follow this path
while depositing elements for the trail to remain fresh. In the same manner that ants
use trails, “kestrels use trails to search for food sources”. These trails, unlike those
of ants, are created by prey which, thus, provide an indication to kestrels on the
obtainability of food sources. The assumption with the kestrel is that the elements
left by these prey (urine, faeces, etc.) are similar to those elements left on an ant
trail. In addition, when the food source indicated by the trail is exhausted, kestrels
no longer pursue this path as the trail elements begin to reduce with “time at an
exponential rate”. With the reduction of trails’ elements, the trail turns old. This
reduction indicates the unstable essence of trail elements which is expressed as if
there are N “unstable substances” with an “exponential decay rate” of γ, then the
equation to detail how N element reduces in time t is expressed as follows (Spencer
2002):

dN
= −γ N (10)
dt
Because these elements are unstable, there is “randomness in the decay process”.
Consequently, the rate of decay (γ ) with respect to time (t) can be re-defined as
follows:

γt = γo e−λt (11)

where γo is a “random initial value” of trail elements that is reduced at each iteration.
t is the number of iterations/generations/time steps, where t ∈ [0, Max_itr] with
Max_itr being the maximum number of iterations.

⎨ γt > 1, trail is new
if γt → (12)

0, otherwise

Once more, the decay constant λ is denoted by:

φmax − φmin
λ= (13)
t 21

where λ is “the decay constant”, φmax is the maximum number elements in trail,
φmin is the minimum number of elements in trail and t 21 is the “half-life period of
a trail which indicates that a trail” has become “old and unattractive” for pursuing
prey.
Lastly, the Kestrel will updates its location using the following equation:
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 11

2 
k
xt+1 = xtk + βo e−γ r x j − xi + f tk (14)

k
where xt+1 signifies the present optimal location of kestrels. xtk is the preceding
location.
• Fitness function

In order to evaluation how well an algorithm achieves in terms of some criteria (such
as the quality of estimation for missing value), a fitness function is applied. In the
case of missing value estimation, the measurement of this achievement is in terms
of “minimizing the deviation of data points from the estimated value”. A number of
performance measurement tools may be used such as mean absolute error (MAE),
root mean square (RMSE), and mean square error (MSE).
In this chapter, the fitness function for the kestrel search algorithm uses the mean
absolute error (MAE) as its performance measurement tool in order to determine
the quality of estimation of missing values. MAE was selected for use in the fitness
function because it allows the modelled behaviour of the kestrel to fine tune and
improve on its much more precise estimation of values concern for negative values.
The MAE is expressed in Eq. (15) as follows:

1
n
MAE = |oi − xi | (15)
n i=1

where xi indicates the estimated value at the ith position in the dataset, oi denotes
the observed data point at ith position “in the sampled dataset, and n is the number
of data points in the sampled dataset”.
• Velocity

The velocity of kestrel as it moves from its current optimal location in a “changing
airstream” is expressed as:

vt+1
k
= vtk + xtk (16)

Any variation in velocity is governed by the inertia weight ω (which is also denoted
as the convergent parameter). This “inertia weight has a linearly” diminishing value.
Thus, velocity is denoted in Eq. 17 as follows:

vt+1
k
= ωvtk + xtk (17)

where ω is the “convergence parameter”, vtk is the “initial velocity”, xtk is best loca-
tion of the kestrel and the vt+1
k
is the present best velocity of the kestrel. Kestrels
explore through the search space to discover optimal solution and in so doing, they
constantly update the velocity, random encircling, and location towards the best
estimated solution.
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
12 R. Millham et al.

Table 1 Kestrel algorithm


• Set parameters
• Initialize population of n Kestrels using equation (3) and evaluate fitness of
population using equation (18)
• Start iteration (loop until termination criteria is met)
Compute Half-life of trail using equation (11)
Compute frequency of bobbing using equation (6)
Evaluate position for each Kestrel as in equation using equation (14)
If f (xi ) < f( xj ) then
Move Kestrel i towards j
End if
• Update position f(xi ) for all i=1 to n as in equation (17)
• Find the current best value
• End loop

Kestrel-Based Search Algorithm

Following Zang (2010) steps to develop a new bio-inspired algorithm, after certain
aspects of behaviour of the selected animal is mathematically modelled, the pseudo-
code or algorithm that incorporates parts of this mathematical model is developed
both to simulate animal behaviour and to discover the best possible solution to a
given problem.
The algorithm for kestrel is given as follows (Table 1).

Implementation of Kestrel-Based Algorithm

After the algorithm for the newly developed bio-inspired algorithm has been deter-
mined, the next step, according to Zang et al. (2010) is to test the algorithm experi-
mentally. Although kestrel behaviour, due to its encircling behaviour and adaptability
to different hunting contexts [either high above as in hovering or near the ground as
in perching] (Agbehadji et al. 2016a), is capable of being used in a variety of steps
and phases of big data mining, the step of estimating missing values within the data
cleansing phase was chosen.
Following Zang’s et al. (2010) prescription to develop a bio-inspired algorithm,
the parameters of the bio-inspired algorithm are set. The initial parameters for the
KSA algorithm were set as βo = 1 with visual range = 1. As per Eq. 5, the parameters
for the lower and higher bound, zmin = 0.2 and zmax = 0.9, respectively, were set
accordingly. A maximum number of 500 iterations/generations were set in order to
allow the algorithm to have a better opportunity of further refining the best estimated
values in each iteration.
Further to Zang’s et al. (2010) rule, the algorithm is tested against appropriate
data. This algorithm was tested using a representative dataset matrix of 46 rows and
9 columns with multiple values missing in each row of the matrix. This matrix was
designed to allow for a thorough testing of estimation of missing values by the KSA
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 13

4 Maximum Likelihood (ML) Method of estimation


-10
ML

Maximum Likelihood values

5
-10

6
-10
2 3 4 5 6 7 8 9 10
Iterations

Fig. 1 Maximum likelihood

algorithm. This testing produced the following Fig. 1: A “sample set of data (46 by 9
matrix) with multiple missing values in the row matrix was used in order to provide
a thorough test of missing values in each row of a matrix”. The test revealed the
following figure represented as Fig. 2:
Figure 2 shows a single graph of the fitness function value of the KSA algorithm
during “500 iterations”. As can be seen in this graph, the “curve ascends and descends
steeply during the beginning iterations and then gradually converges at the best
possible solution at the end of 500 iterations/generations”. The steps within the
curve symbolize looking for a best solution within a particular search space, using
a random method, until one is found and then another space is explored. The curve
characteristics indicate that at the starting iterations, the KSA algorithm “quickly
maximizes the search space and then gradually minimizes” until it converges to the
best possible optimal value.

4 Conventional Data Imputation Methods

Conventional approaches to estimate missing data values include ignoring missing


attributes or fill in missing values with a global constant (Quinlan 1989), with the
real possibility of detracting from the quality of pattern(s) discovered based on these
values. Based on the historical trend model, missing data may be extrapolated, in
terms of their approximate value, using trends (Narang 2013). This procedure is
14 R. Millham et al.

Comparative results of fitness function


3

Fitness value using MAE 2.5

1.5

0.5

0
0 50 100 150 200 250 300 350 400 450 500
Iterations

Fig. 2 KSA fitness

common in the domain of real-time stock trading with missing data values. In real-
time trading, each stock value is marked in conjunction with a timestamp. In order to
extrapolate the correct timestamp from missing incorrect/missing timestamps, every
data entry point is checked against the internal system clock to estimate the likely
missing timestamp (Narang 2013). However, this timestamp extrapolation method
has disadvantages in its high computation cost and slower system response time for
huge volumes of data.
There are other ways to handle missing data. Conventional approaches include
ignoring missing attributes or fill in missing values with a global constant (Quinlan
1989), with the real possibility of detracting from the quality of pattern(s) discovered
based on these values. Another approach was by Grzymala-Busse et al. (2005), that is
the closest fit method, where the same attributes from similar cases are used to extrap-
olate the missing attributes. Other approaches of extrapolation include maximum
likelihood, genetic programming, Expectation-Maximization (EM), Expectation-
Maximization (EM), and “machine learning approach (such as autoencoder neural
network)” (Lakshminarayan et al. 1999).
• Closest fit Method

This method determines the closest value of the missing data attribute through the
closest fit algorithm based on the same attributes from similar cases. Using the
closest fit algorithm, the distance between cases (such as case x and y) are based on
the Manhattan distance formula that is given below:
1 The Big Data Approach Using Bio-Inspired Algorithms: Data … 15


n
distance(x, y) = distance(xi , yi )
i=1

where:

⎨0 if x = y
distance(x, y) = 1 if x and y are symbolic and x = y, or x =? or y =?
⎩ |x−y|
r
if x and y are numbers and x = y

where r denotes the differences between the maximum and minimum of the unknown
values of missing numeric values (Grzymala-Busse et al. 2005).
• Maximum likelihood:

Maximum likelihood is a statistical method to approximate a missing value based


on the probability of independent observations. The beginning point for this approx-
imation is the development of a likelihood function that determines the probability
of data as a function of data and its missing value. Allison (2012), the estimation
commences with the expression of likelihood function to present the probability of
data, as a function of data and its missing value. This function’s parameters must
maximize the likelihood of the observed value as in the following formulation:

 
L(θ |Yobserved ) = f Yobserved , Ymissing |θ dYmissing

where Yobserved denotes the observed data, Ymissing is the missing data, and º is
the parameter of interest to be predicted (Little and Rubin 1987). Subsequently,
likelihood function is expressed by:
n
L(θ ) = f (yi |θ )
i=1

where f(y|8) is the probability density function of the observations y whilst θ is the set
of parameters that has to be predicted provided n number of independent observation
(Allison 2012). The value of θ must be first determined before a maximum likelihood
prediction can be calculated which serves to maximize the likelihood function.
Suppose that there are n independent observation on k variables (y1 , y2 , …, yk )
“with no missing data, the likelihood function “is denoted as:
n
L= f (yi1 , yi2 , . . . , yik ; θ )
i=1

However, suppose that data is missing for individual observation i for y1 and y2.
Then, the likelihood of the individual missing data is dependent on the likelihood
16 R. Millham et al.

of observing other remaining variables such as y3 , …, yk . Assuming that y1 and y2


are discrete values, then the joint likelihood is the summation of all possible values
of the two variables which have the missing values in the dataset. Consequently, the
joint likelihood is denoted as:

f i∗ (yi3 , . . . , yik ; θ ) = f i (yi1 , . . . , yik ; θ )
y1 y2

As the missing variable are continuous, the joint likelihood is the integral of all
potential values of the two variable that contain the missing values in the dataset.
Thus, the joint likelihood is expressed as:

f i∗ (yi3 , . . . , yik ; θ ) = f i (yi1 , yi2 , . . . , yik )dy2 dy1


y1 y2

Because each observation adds to the determination of the likelihood function,


then the summation (integral) is calculated over the missing values in the dataset.
The overall probability is denoted as the product of all observations. An example, if
there are x observations with complete data and n-x observations with data missing
on y1 and y2 , the probability function for the full dataset is expressed as:
x n
L= f (yi1 , yi2 , . . . , yik ; θ ) f i∗ (yi3 , . . . , yik ; θ )
i=1 x+1

The advantages of using the maximum likelihood method to extrapolate missing


values are that this method produces approximations that are consistent (in that it
produces the same or almost the same unbiased results for a selected large dataset);
it is asymptotically efficient (in that there is minimal sample inconsistency which
denotes a high level of efficiency in the missing value dataset); and it is asymptotically
normal (Allison 2012).
In Fig. 1, the maximum likelihood algorithm, with known variance parameter of
sigma, is tested using several small but representative sets of missing value matrices
with some rows containing no missing values, other containing one missing value,
and still others containing several missing values.

5 Conclusion

The chapter introduced the concept of big data with its characteristics namely
velocity, volume, and variety. It introduces the phases of big data management,
which includes data cleansing and mining. Techniques that are used during some of
these phases are presented. A new category of algorithm, bio-inspired algorithms,
Random documents with unrelated
content Scribd suggests to you:
Dear mother, how happy I am to learn all this. I already feel more
love and reverence for God, the cause of all these wonders, than I had
before. If I grew ever so tall, I should not think myself a man, till I
knew something of the works of God.—Can a man be wise who sees
him not in every surrounding object? Charles and I intend to make
all the enquiries we possibly can—we will try to be good and wise.

WILLIAM.
LETTER XVII.
William to his Mother.

We were this morning, mama, at half past two, in the fields, to see
the beautiful scene of the sun rising. Edward would not go with us,
he rather chose to sleep. He is very lazy, and ignorant of course, Dr.
Bartlett says. Yet, though he plays much more than we do, he is not
so happy; he often seems not to know what to do with himself,
idleness making the hours so heavy. He wishes for his meals long
before the time, and torments insects and animals wantonly to
shorten the tedious interval. I heard Sir Charles say, the other day, he
feared he would never be a man in understanding. That instead of
rising gradually to a man, he was sinking into a brute. But I must
relate our conversation. The stars were yet visible when we went out.
CHARLES.
My father has promised me some excellent books, Sir.
DR. BARTLETT.
The books of wise writers, are useful to make us more easily
understand what we see and experience; but our own eyes may teach
us a great deal. The Book of Nature, the heavens, with all the stars
and planets; this earth on which we are, with all its productions and
creatures, is the best book; but others will serve as guides.
CHARLES.
See, Sir, I think it is lighter.
DR. BARTLETT.
Observe now, how the stars begin to grow dim, before the
approaching light of the sun.
WILLIAM.
I thought always that the stars went away, when it was day light.
DR. BARTLETT.
There are some which have their appointed revolutions; and
others which are stationary; these we call the fixed stars.
CHARLES.
Are there stars then by day as well as by night?
DR. BARTLETT.
Certainly. But the stronger light of the sun, makes the fainter light
of the stars invisible.
CHARLES.
How beautiful the trees and fields begin to appear.
DR. BARTLETT.
Yes. What just now appeared a scene of confusion, is changed into
a charming country. The fields, which were before not to be
distinguished, now seem green, and decked with a thousand flowers.
The light gives all again their colours.
CHARLES.
What you say is remarkable. I begin to imagine that the light gives
the colours.
DR. BARTLETT.
Without light, would not all be black? But this is a subject you
cannot understand, till you have read and considered things more
maturely. See there, the sun begins to appear. What think you of that
sight?
CHARLES.
Can it be, that most men spend this hour in sleep?
DR. BARTLETT.
Such men make themselves unworthy the favours of their Maker.
The glorious sun, which is sent to make us joyful, to warm us, and to
nourish us, well deserves that we should sometimes rise to bid it
welcome.
CHARLES.
Pray let us often behold the rising of the sun. We sometimes spend
money to see a fine scene; and this scene, which we can have for
nothing, beyond measure surpasses what can be done by the art of
man.

Dr. Bartlett then was moving homewards; but we requested him to


prolong his walk, as the morning was fine, and we knew they would
not wait breakfast for us. But this letter is already too long, and I
must attend my drawing-master; you shall hear the rest soon.
WILLIAM.
LETTER XVIII.
William to his Mother.

I have not forgotten what I promised you, dear mother. No, you
have told me we should always remember what we promise.
CHARLES.
How beautifully green the fields are.
DR. BARTLETT.
Yes, that green enlivens the prospect, and does not require much
cultivation: a common blessing we often overlook, though our
gratitude on that very account should be excited.
CHARLES.
The garden gives us more flowers, and a greater variety.
DR. BARTLETT.
You are mistaken; the field flowers are innumerable. Look round
about you, and you will see that I have reason to say so.
WILLIAM.
But then the fruits which the garden produces.
DR. BARTLETT.
These fruits are the gift of our Creator, for which you ought to be
thankful; but believe me, these blades on which we tread are of yet
greater value. They support the cattle who yield us such delicate
food, milk, butter, and cheese. The useful horse here renews his
strength; and the sheep, whose wool answers so many purposes,
which keeps us warm both day and night, nip the short grass every
where spread. And all this happens without our labour, or any great
care; while the fruits and the flowers in the garden, require perpetual
attention. Certainly we find here a much greater proof of God’s
goodness than in our flower garden. This grass is necessary, my
friends, but the flowers and the fruits we could live without.
CHARLES.
These wild flowers are very pretty; why do we set so little value on
them?
DR. BARTLETT.
Because we accustom ourselves to consider things in a wrong point
of view; and to imagine those of little value which we obtain without
art or labour. Come, my young friends, let us correct this mistake; let
us not undervalue even the grass; let us always acknowledge it to be
the liberal gift of heaven, intended to support both man and beast.
WILLIAM.
Look what a quantity of fish, that rivulet contains.
CHARLES.
They are beautiful creatures; how can they live in the water? Most
other animals would die.
DR. BARTLETT.
God has given the fish another kind of body; because they were
designed for the water, to inhabit the great deep. They have fins to
move themselves from place to place; and besides that, the tail is of
great use to them in swimming; and the fins, which they have on
their backs and bellies, enable them to keep themselves upright.
CHARLES.
But how can they breathe; have they any air in the water?
DR. BARTLETT.
You must have observed, that they first draw the water in, and
then immediately spurt it out again: they obtain by this continual
motion, the air which is necessary.
CHARLES.
You have well said, my dear Sir, that in every thing the great
wisdom of God is displayed: for this is truly wonderful.
DR. BARTLETT.
There are yet greater wonders to be seen in the world of waters.—
Would you think, that in a single drop of water, there are thousands
of living creatures, which you cannot see with your naked eye?
WILLIAM.
In a single drop of water?
DR. BARTLETT.
Yes. And to convince yourself of this, you have only to use your
microscope, and you will plainly see an innumerable quantity of
creatures sporting in the comparatively small space.
CHARLES.
You fill me with astonishment. Pray let us go home directly, I long
to view this new world of creatures.
Dr. Bartlett commended his curiosity. We returned home; and
after we had swallowed a hasty breakfast, carried a glass of the river
water into our play-room. We soon saw that what Dr. Bartlett said
was true. Certainly, my dear mother, that glass of water was a sea full
of all sorts of creatures, of wonderful forms. I never thought that
there were such small living creatures. How admirable is the wisdom
of God! for you recollect that so small a body must have members
and bowels, as perfect for the purposes of life as the largest animal.
We have discovered all this through the assistance of the microscope;
but my letter would be too long, if I was to relate all that we have
discovered. Bless your son, my mother. Adieu.

WILLIAM.
LETTER XIX.
William to his Mother.

Sir Charles and Lady Grandison have been for some days from
home; but Dr. Bartlett is with us. The house-keeper, and all the
servants, consult Emilia, and she, in the most modest manner, tells
them what she knows her mother wishes them to do. She is not
allowed to command any of them; the house-keeper in particular, a
respectable woman, Lady Grandison said, ought not to receive orders
from a child; but she behaves with such propriety, they are all eager
to oblige her; indeed she follows her brother’s example. Edward, on
the contrary, does nothing but romp and wrestle, and afterwards
quarrel with them. He hates all employment; I should imagine, those
who do not learn when they are young, must appear very foolish
when they are old. You shall hear what Charles said to him yesterday.
Charles, Emilia, and I sat on one side of the room, drawing; while
Edward tied a thread to a beetle—and often he would jump, as if by
accident, against our chairs, to disturb us and make us leave our
employment. Charles spoke to him.
CHARLES.
Ah, Edward, what pleasure can you find in torturing a poor insect?
It turns me sick to see you; pray let it go!
EDWARD.
And what do you do, when you and William set the butterflies on a
needle to look at them through your fine microscope? That pleases
you, and this pleases me.
CHARLES.
If William and I set the butterflies on a needle, only for our
amusement, it would be wrong; but we do it to instruct ourselves—
yet, though we seek instruction, I could not bear to torture them; the
sight of their agonies would engross my whole attention. Dr. Bartlett
has taught me to kill them expeditiously without injuring their
appearance. I then gratify my curiosity without hardening my heart,
for that tender-hearted man, our dear tutor, often says, that even the
attainment of knowledge cannot compensate for a quick emotion of
benevolence, banished by a habit of thoughtless cruelty. He wishes to
make me wise; but still more ardently to incite me to practise
goodness, to shew kindness to the insects who crawl under my feet;
and to let my love mount up from them to the beings, who, while
they enjoy the blessings of heaven, can recognize the hand which
bestows them.
EDWARD.
Well, if you will come with me into the garden, I will let it go.
CHARLES.
That is to say, that if I refuse to go with you, you will continue to
torment the poor insect. It is not it’s fault if I do not go with you—
surely this is not right; but I will accompany you.
EMILIA.
It begins to rain.
CHARLES.
Shall I read to you? I have got a very entertaining book.
EDWARD.
You know I do not love reading.
CHARLES.
So you do not desire to converse with men.
EDWARD.
Well, yes.—What then?
CHARLES.
Books speak; and make us wiser, while we are amused.
EDWARD.
I do not desire to be learned; but to be an officer.
EMILIA.
A fine officer, who will not know how to read or write intelligibly!
EDWARD.
Now, Charles, preach, as you did the other day about cards.
CHARLES.
I reproved your too great fondness for cards. You are angry if you
lose; and those who cannot play with temper, in my opinion, ought
never to play at all. It is not amiss to know how to play, because that
cards are so much used in company, and it enables one to oblige
those who are fond of this amusement. I do not find any pleasure in
it; and I hope never, from a false pride, to be induced to play for
more than I can afford to lose.
EMILIA.
Poor Mr. Beverley, who died last week, and left his family in great
distress, my mama told me, first played to avoid being laughed at,
and called a mean-spirited man. He went on from one thing to
another, till he spent his whole fortune, and ruined his constitution.
His wife actually took in needlework to support him during his last
illness, though she had been educated to expect better things. He
died in an obscure lodging, a burden to the woman he ought to have
been a comfort to; and left his half-starved babes, to weep over the
lifeless body of their inconsiderate parent. I wept too—when I heard
of it.
The conversation was interrupted, but I must tell you Emilia had
tears in her eyes, when she told us about poor Mr. Beverley’s
children. I remember now I used to be vexed when young Dulis
laughed at me, and called me a coward, when I refused to do
mischief; and mean, when I saved my money, though I intended to
give it to a poor blind man; but he did not know that. I do not like to
tell any one but yourself that I give most part of my allowance to the
poor; it would look as if I wanted to be praised, and that the love of
praise was my motive; but indeed it is not, the pleasure I feel at the
moment, is a sufficient reward. Besides, I think I resemble my dear
mother, and I am happy.—I am sure you will love me, if I practise
virtue.

WILLIAM.
LETTER XX.
William to his Mother.

One of the servants has been very ill. You cannot think how
compassionately Emilia attended her. She rose very early this
morning to carry her some refreshment, and tried to amuse her. She
requested Dr. Bartlett to send for a physician; and she took as much
care of her as if the poor girl had been her own sister. Edward
reproached her. It well becomes you, said he, to be sure, to wait on
the maid. And why not, answered she; you play with the servant to
amuse yourself (and such a degree of familiarity is indeed improper)
and I take care of the maid, through pity. A servant is a human being;
we are differently educated, I cannot make them my companions, but
I will ever try to treat them humanely—and remember that they are
my fellow-creatures, when they are in distress. Edward was ashamed
and ran out of the room. My mother, I thought, always acted in the
same manner. I remember well, when our Hannah had the fever,
that you took care of her yourself. But it brings to my remembrance
something, which makes me sorrowful. How unfortunate you are!
Here are so many servants, and you, my poor mother, have only a
little girl to assist; you yourself are obliged to do many things—a
colonel’s widow should have servants to wait on her; it is mean to
work, and do not people despise you for being reduced to such a
condition? When I am a man, and have increased my fortune, you
shall have servants, and live as a gentlewoman ought to live.

WILLIAM.
LETTER XXI.
Mrs. D—— to William.

I admire Emilia, she is a good, and a pleasing girl; there is not a


more amiable virtue than compassion. It is much to be wished that
all young ladies would take her for their pattern; and, instead of
falling into the two shameful extremes, familiarity and haughtiness,
which are often to be observed in the same character, they would
treat their servants with humanity and decent kindness. You know
how frequently I have praised you for your affability to your
inferiors.—But, William, why are you grieved that I have but one
servant? A number of servants are not necessary; they serve more for
shew than use. Had I riches, I would try not to waste the precious
deposit; I would live according to my station. And while my own real
and artificial wants were supplied, I should think with pleasure, that
though so many servants were not necessary to wait on me, I enabled
some industrious fellow-creatures to earn an honest livelihood; and
by humane treatment made their labour pleasant. But since it has
not pleased heaven to give me riches, I am content, and thankful that
I can keep a girl to do the most laborious and menial part of my
household business, which I could not do without injuring my health,
and neglecting your sister’s education. I am not in absolute need of
any more assistance. And what now is that employment, which, you
say, is unbecoming the widow of a colonel? You wrote hastily, it is
not dishonourable to serve ourselves when we cannot afford to pay
for the services of others. It will be more satisfaction to you, to be
able to say, after my death, my mother provided her own dinner; her
clothes were the work of her hands; her economy made up for the
deficiencies of fortune; and her virtues made her respectable; than if
you heard your parent reproached, for living according to her rank,
and birth. She had a fine house, rich furniture, a number of servants;
but she has left nothing behind her; and what is still worse, has
injured several industrious people who trusted to her honour. What
would then be the son of a colonel? A despised youth, who, though
innocent, must blush for his mother’s want of thought and justice.
The son of a reputable tradesman, would scarcely acknowledge him
as an equal; but I have laid enough, I hope, to dissipate your false
pride and concern for me: you find I am satisfied with my station.
Again let me tell you, your letters are a comfort to me; was I much
poorer than I am, I should still esteem myself rich in the possession
of such a son.
Farewel, my dear William, regulate and follow the good
inclinations I have endeavoured to cultivate, then you will not only
be the comfort of your mother, but the protector of your sister.

D.
LETTER XXII.
Emilia Grandison to Lady Grandison.

We have been greatly alarmed, dear mother. Mr. Wilson’s house


was last night burned to the ground. Oh what frightful flames! The
air was as red as blood; my heart beat very strong, I trembled lest the
family should be destroyed in their beds.—It was dreadful to see such
devastation by fire; how careful we ought to be to avoid the sudden
horror of so terrible a calamity. If they had been careful, this
misfortune would not have happened; the two Miss Wilsons were the
occasion of it. They had in the evening, without its being observed,
lighted a fire in their play-room; and spread the coals on the hearth
to bake privately some cakes. The fire must certainly have caught the
boards; but they did not perceive it; as they were interrupted before
the cakes were half baked, and obliged to go to their mother, who
called for them. They swallowed hastily the unwholesome, and even
unpalatable cakes, and shut the door without thinking any more
about it. The flames did not burst out till the whole family had been
some time fast asleep. There is not any thing saved. All the furniture,
clothes, and the stock of the farm were reduced to ashes. The poor
girls escaped with only a single petticoat on; and Mrs. Wilson was
with difficulty rescued from the devouring flames, which consumed
all her substance.
What will now become of that pride, which made the Miss Wilsons
treat with such disdain the neighbouring farmers daughters, because
they were their inferiors in birth and fortune—and now they are
happy to find a shelter in the houses they despised. Indeed, mama, I
will obey you, and ever behave with kindness to my inferiors. But I
have something else to tell you, and I am sure you will not be angry
with me; I sent some of my clothes to the Miss Wilson, who is about
my size; I have more than I want—and surely, mama, if that was not
the case, I ought cheerfully to bear a trifling inconvenience to do a
fellow-creature an essential service. Wearing for the first time new
clothes, never gave me half the pleasure—no, it cannot be compared
with what I felt, when I gave away my old ones. I did not send my
best (though I would have parted with them without feeling any
reluctance) as I thought, common clothes would suit her better.
Farewel, dear mother.

EMILIA.
LETTER XXIII.
Young Grandison to his Father.

I am just returned, my dear father, from visiting poor Mr. Wilson.


Emilia has written my mother an account of the dreadful accident
which happened last night; and I wish, ardently wish, to alleviate the
distress I could scarcely behold without tears—indeed I believe I
should have wept, if I had not been full of a plan, which darted into
my head, when I heard the grey-headed old man lament the disaster,
which, in the course of one night, swept away the hard-earned fruits
of many toiling years. To be plunged into poverty, said he, when my
strength faileth me, and even the sweat of my brow will not procure
the necessaries of life—is sad. And so it is; now I will tell you what I
have thought of. You know my uncle left me five thousand pounds—I
think it a great fortune, and I can surely spare two hundred to help
Mr. Wilson out of his extreme distress; that sum would be sufficient
to stock another farm. I shall be rich enough, and the more so, as you
are so good as to let the interest accumulate. I beg, Sir, you will not
refuse my humble request—I shall have more satisfaction in relieving
this unfortunate man, than ever my two hundred pounds can give.
To rescue from poverty an industrious man and his family, what a
blessing! In this respect, let me be like my father, who is himself so
benevolent,—who has taught me to be compassionate. Were you but
here, I would throw myself at your feet, and—but it is enough, you
will judge if my request merits your attention; my duty is
submission, and I know I need not try to persuade you—you will at
once do what appears to you right.

CHARLES GRANDISON.
LETTER XXIV.
Sir Charles Grandison to his Son.

You have learned of me, you say, to be compassionate. It has ever


been my wish and endeavour, to make your heart feel the miseries of
your fellow-creatures; and I have laboured to inculcate the virtue,
which next to the love, the goodness of God ought to inspire, is the
noblest ornament of our nature. The request you make is a proof of
the warm generosity of your heart: and so praise worthy a desire
merits a reward. The fresh discovery I have made of your benevolent
disposition, is of more value, in my estimation, than the two hundred
pounds, which you will find enclosed. Go, my Charles, make glad
poor Wilson’s heart, and taste the delight, which flows from
benevolence. But let me tell you, the legacy must not be touched
before you are of age: it was entrusted to my care as a guardian, and
not as a father.

GRANDISON.
LETTER XXV.
Lady Grandison to Emilia.

You were right, my dear Emilia, when you imagined I could not be
angry with you for following the humane dictates of your heart. As a
proof of my approbation of your conduct, and to reward you for it, I
will give you another opportunity of experiencing the pleasure which
arises from benevolence. You will find in my drawers a piece of
calico; send for the mantua-maker, and desire her to make Mrs. and
Miss Wilson a dress immediately. I know this commission will afford
you more pleasure, than if I gave it you for yourself. But, my Emilia,
why did you mention their faults, when you related the
circumstances which made them truly objects to excite my
commiseration. You might silently have determined to behave
properly to your inferiors, without exhibiting the disagreeable
picture of their haughtiness, when it was receiving a severe
chastisement. Never, my child, add to the miseries of others, even
though the sufferers should be unworthy.—Be tender-hearted in
every sense of the word. I do not mean to chide you, when I point out
an error; you are a good girl.—You were judicious in not sending
your best clothes; you considered the wants of the person you wished
to assist, and your generosity had not that tincture of vanity which
very frequently degrades it. Always, my child, define rather to do
good, than to display your goodness: remember that the best of
Beings notes your secret thoughts; and that it is truly noble to have
sometimes his approbation singly in view.
Farewel, forget not the useful lesson you have given yourself, never
to be proud of clothes or furniture; an unforeseen casualty might
deprive you of them, and even the riches which procured them. “Lay
up then a treasure in heaven; where neither rust, nor moth can
corrupt; nor thieves break through and steal.”
HARRIOT GRANDISON.

You might also like