Recommender Systems A Multidisciplinary Approach
Monideepa Roy Pushpendu Kar Sujoy Datta download
https://ebookbell.com/product/recommender-systems-a-
multidisciplinary-approach-monideepa-roy-pushpendu-kar-sujoy-
datta-49581660
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Recommender Systems A Multidisciplinary Approach Monideepa Roy
https://ebookbell.com/product/recommender-systems-a-multidisciplinary-
approach-monideepa-roy-49587054
Handson Machine Learning Recommender Systems With Apache Spark Build A
Real Artificial Intelligence Solution With Real Data Ernesto Lee
https://ebookbell.com/product/handson-machine-learning-recommender-
systems-with-apache-spark-build-a-real-artificial-intelligence-
solution-with-real-data-ernesto-lee-36893922
Multimedia Services In Intelligent Environments Advances In
Recommender Systems 1st Edition George A Tsihrintzis
https://ebookbell.com/product/multimedia-services-in-intelligent-
environments-advances-in-recommender-systems-1st-edition-george-a-
tsihrintzis-4230656
Machine Learning Paradigms Applications In Recommender Systems 1st
Edition Aristomenis S Lampropoulos
https://ebookbell.com/product/machine-learning-paradigms-applications-
in-recommender-systems-1st-edition-aristomenis-s-lampropoulos-5141576
Smartparticipation A Fuzzybased Recommender System For Political
Communitybuilding 1st Edition Luis Fernando Tern Tamayo Auth
https://ebookbell.com/product/smartparticipation-a-fuzzybased-
recommender-system-for-political-communitybuilding-1st-edition-luis-
fernando-tern-tamayo-auth-4930912
Citizen Privacy Framework Case Of A Fuzzybased Recommender System For
Political Participation Aigul Kaskina
https://ebookbell.com/product/citizen-privacy-framework-case-of-a-
fuzzybased-recommender-system-for-political-participation-aigul-
kaskina-46171034
Recommender System With Machine Learning And Artificial Intelligence
Practical Tools And Applications In Medical Agricultural And Other
Industries 1st Edition Sachi Nandan Mohanty Editor
https://ebookbell.com/product/recommender-system-with-machine-
learning-and-artificial-intelligence-practical-tools-and-applications-
in-medical-agricultural-and-other-industries-1st-edition-sachi-nandan-
mohanty-editor-11290510
Recommender Systems In Fashion And Retail Proceedings Of The Fourth
Workshop At The Recommender Systems Conference 2022 Humberto Jess
Corona Pampn
https://ebookbell.com/product/recommender-systems-in-fashion-and-
retail-proceedings-of-the-fourth-workshop-at-the-recommender-systems-
conference-2022-humberto-jess-corona-pampn-49415878
Recommender Systems Legal And Ethical Issues 1st Edition Sergio
Genovesi
https://ebookbell.com/product/recommender-systems-legal-and-ethical-
issues-1st-edition-sergio-genovesi-51259018
Recommender Systems
Recommender Systems: A Multi-Disciplinary Approach presents a multi-disciplinary
approach for the development of recommender systems. It explains different types
of pertinent algorithms with their comparative analysis and their role for different
applications. This book explains the big data behind recommender systems, the
marketing benefts, how to make good decision support systems, the role of machine
learning and artifcial networks, and the statistical models with two case studies.
It shows how to design attack resistant and trust-centric recommender systems for
applications dealing with sensitive data.
Features of this book:
• Identifes and describes recommender systems for practical uses
• Describes how to design, train, and evaluate a recommendation algorithm
• Explains migration from a recommendation model to a live system with
users
• Describes utilization of the data collected from a recommender system to
understand the user preferences
• Addresses the security aspects and ways to deal with possible attacks to
build a robust system
This book is aimed at researchers and graduate students in computer science, electronics
and communication engineering, mathematical science, and data science.
Intelligent Systems
Series Editor: Prasant Kumar Pattnaik
This series provides a medium for publishing the results of recent research into the
applications, tools and techniques of Intelligent Systems, including a wide range of
relevant topics. The audience for the book series consists of advanced level students,
researchers, and industry professionals working at the forefront of their felds. It will
present books focused on the development of advanced intelligent environments,
Generic Intelligent Tools, Techniques and Algorithms, applications using Intelligent
Techniques, Multi Criteria Decision Making, Management, international business,
fnance, accounting, marketing, healthcare, military applications, production, net-
works, traffc management, crisis response, human interfaces, Brain Computing
Interface; healthcare; and education and learning.
Interoperability in IoT for Smart Systems
Edited by Monideepa Roy, Pushpendu Kar, and Sujoy Datta
Recommender Systems
A Multi-Disciplinary Approach
Edited by Monideepa Roy, Pushpendu Kar, and Sujoy Datta
For more information about this series, please visit: www.routledge.com/Intelligent-
Systems/book-series/IS
Recommender Systems
A Multi-Disciplinary Approach
Edited by
Monideepa Roy,
Pushpendu Kar,
and Sujoy Datta
Designed cover image: © Shutterstock
First edition published 2023
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
CRC Press is an imprint of Taylor & Francis Group, LLC
© 2023 selection and editorial matter, Monideepa Roy, Pushpendu Kar, and Sujoy Datta;
individual chapters, the contributors
Reasonable efforts have been made to publish reliable data and information, but the authors and
publisher cannot assume responsibility for the validity of all materials or the consequences of
their use. The authors and publishers have attempted to trace the copyright holders of all material
reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and
let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microflming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.
copyright.com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive,
Danvers, MA 01923, 978-750-8400. For works that are not available on CCC please contact
mpkbookspermissions@tandf.co.uk
Trademark notice: Product or corporate names may be trademarks or registered trademarks and
are used only for identifcation and explanation without intent to infringe.
ISBN: 978-1-032-33321-2 (hbk)
ISBN: 978-1-032-33322-9 (pbk)
ISBN: 978-1-003-31912-2 (ebk)
DOI: 10.1201/9781003319122
Typeset in Times
by Apex CoVantage, LLC
v
Contents
About the Editors.....................................................................................................vii
List of Contributors...................................................................................................ix
Foreword ...................................................................................................................xi
Maharaj Mukherjee
Preface......................................................................................................................xv
Chapter 1 Comparison of Different Machine Learning Algorithms to
Classify Whether or Not a Tweet Is about a Natural Disaster:
A Simulation-Based Approach.............................................................1
Subrata Dutta, Manish Kumar, Arindam Giri,
Ravi Bhushan Thakur, Sarmistha Neogy, and
Keshav Dahal
Chapter 2 An End-to-End Comparison among Contemporary
Content-Based Recommendation Methodologies .............................. 17
Debajyoty Banik and Mansheel Agarwal
Chapter 3 Neural Network-Based Collaborative Filtering for
Recommender Systems ......................................................................29
Ananya Singh and Debajyoty Banik
Chapter 4 Recommendation System and Big Data: Its Types
and Applications................................................................................. 51
Shweta Mongia, Tapas Kumar, and Supreet Kaur
Chapter 5 The Role of Machine Learning/AI in Recommender Systems.............. 69
N R Saturday, K T Igulu, T P Singh, and F E Onuodu
Chapter 6 A Recommender System Based on TensorFlow Framework............. 81
Hukam Singh Rana and T P Singh
Chapter 7 A Marketing Approach to Recommender Systems.......................... 105
K T Igulu, T P Singh, F E Onuodu, and N S Agbeb
vi Contents
Chapter 8 Applied Statistical Analysis in Recommendation Systems.................121
Bikram Pratim Bhuyan and T P Singh
Chapter 9 An IoT-Enabled Innovative Smart Parking Recommender
Approach .......................................................................................... 137
Ajanta Das and Soumya Sankar Basu
Chapter 10 Classifcation of Road Segments in Intelligent Traffc
Management System ........................................................................ 155
Md Ashifuddin Mondal and Zeenat Rehena
Chapter 11 Facial Gestures-Based Recommender System for Evaluating
Online Classes.................................................................................. 173
Anjali Agarwal and Ajanta Das
Chapter 12 Application of Swarm Intelligence in Recommender Systems..............191
Shriya Singh, Monideepa Roy, Sujoy Datta, and
Pushpendu Kar
Chapter 13 Application of Machine-Learning Techniques in the
Development of Neighbourhood-Based Robust
Recommender Systems ....................................................................203
Swarup Chattopadhyay, Anjan Chowdhury, and
Kuntal Ghosh
Chapter 14 Recommendation Systems for Choosing Online Learning
Resources: A Hands-On Approach..................................................235
Arkajit Saha, Shreya Dey, Monideepa Roy, Sujoy Datta,
and Pushpendu Kar
Index ......................................................................................................................259
vii
About the Editors
Dr. Monideepa Roy did her bachelors and masters in mathematics from IIT
Kharagpur and her PhD in CSE from Jadavpur University. For the last 11 years,
she is working as an associate professor at KIIT Deemed University, Bhubaneswar.
Her areas of interest include remote healthcare, mobile computing, cognitive WSNs,
remote sensing, recommender systems, sparse approximations, and artifcial neural
networks. At present she has seven research scholars working with her in these areas
and two more have successfully defended their theses under her guidance. She has
several publications in reputed conferences and journals. She has been the organiz-
ing chair of the frst two editions of the International Conference on Computational
Intelligence and Networks CINE 2015 and 2016 and ICMC 2019, and she has organ-
ised several workshops and seminars. She also has several book chapter publications
in various reputed publication houses as well as an edited book under Taylor and
Francis. She has also been an invited speaker for several workshops and conferences
in machine learning and recommendation systems. She is also a reviewer for several
international journals and conferences.
Dr. Pushpendu Kar is currently working as an Assistant Professor in the School
of Computer Science, University of Nottingham (China campus). Before this, he
was a Postdoctoral Research Fellow at the Norwegian University of Science and
Technology, the National University of Singapore, and Nanyang Technological
University. He also worked in different engineering colleges as a lecturer and in the
IT industry as a software professional. He has more than 12 years of teaching and
research experience as well as one and a half years of industrial experience at IBM.
He has completed his Ph.D. from the Indian Institute of Technology Kharagpur,
Master of Engineering (M.E) from Jadavpur University, and Bachelor of Technology
(B.Tech) from the University of Kalyani in Computer Science and Engineering. He
was awarded the prestigious Erasmus Mundus Postdoctoral Fellowship from the
European Commission, the ERCIM Alain Bensoussan Fellowship from the European
Union, and SERB OPD Fellowship from the Dept. of Science and Technology,
Government of India. He has received the 2020 IEEE Systems Journal Best Paper
Award. He has received four research grants for conducting research-based projects,
three of them as a Principal Investigator (PI). He also received many travel grants to
attend conferences and doctoral colloquiums. He is the author of more than 50 schol-
arly research papers, which have been published in reputed journals and conferences,
and in IT magazines. He has also published two edited books. He is also an inventor
of fve patents. He has participated in several conference committees, worked as a
team member to organize short-term courses, and delivered a few invited talks as
well as Keynote Lectures at international conferences and institutions. He is a Senior
Member of IEEE and a Fellow of the Higher Education Academy (FHEA), UK. He has
been recognized as a High-Level Talent by Ningbo Municipal Government, China.
Dr. Kar mainly teaches Computer Networks and programming-related modules and
viii About the Editors
his research areas include Wireless Sensor Networks, Internet of Things, Content-
Centric Networking, Machine Learning, and Blockchain.
Sujoy Datta has done his MTech from IIT Kharagpur. For the last 11 years, he has
been working as an Assistant Professor in the School of Computer Engineering, at
KIIT Deemed University. His areas of research include wireless networks, computer
security, elliptic curve cryptography, neural networks, remote healthcare, and rec-
ommender systems. He has several publications in various reputed conferences and
journals. He has co-organised several workshops and international conferences in
the capacity of Organizing co- chair and Finance Chair, as well as several work-
shops and seminars. He has several upcoming book chapter publications as well as
an edited book by Taylor and Francis. He has also served in various committees in
the roles of examination observer and assistant controller for exams. He has guided
several undergraduate students in their fnal year projects and thesis. He has also
fled and has been granted several patents in his name. He loves to travel and discover
new and offbeat places.
ix
Contributors
Anjali Agarwal
Amity Institute of Information
Technology
Mansheel Agarwal
Amity University
Kolkata, India
N S Agbeb
Department of Electrical/Electronics
Engineering
Kenule Beeson Saro-Wiwa Polytechnic
Bori, Rivers State, Nigeria
Debajyoty Banik
Kalinga Institute of Industrial
Technology
Soumya Sankar Basu
Department of Computing, College
of Business Technology &
Engineering
Sheffeld Hallam University
Sheffeld, United Kingdom
Bikram Pratim Bhuyan
School of Computer Science
UPES
Dehradun, India
Swarup Chattopadhyay
Machine Intelligence Unit
Indian Statistical Institute
Kolkata, India
Anjan Chowdhury
Center for Soft Computing
Research
Indian Statistical Institute
Kolkata, India
Keshav Dahal
School of Engineering and
Computing
University of the West of Scotland
United Kingdom
Ajanta Das
Amity Institute of Information
Technology
Amity University Kolkata
Newtown, Kolkata, India
Sujoy Datta
School of Computer Engineering
Kalinga Institute of Industrial
Technology
India
Shreya Dey
School of Computer Engineering
Kalinga Institute of Industrial
Technology
India
Subrata Dutta
Dept of Computer Sc. &
Engineering
National Institute of Technology
Jamshedpur, Jharkhand, India
Kuntal Ghosh
Machine Intelligence Unit
Indian Statistical Institute
Kolkata, India
Arindam Giri
Dept of Computer Sc. &
Engineering
Haldia Institute of Technology
West Bengal
x Contributors
K T Igulu
Department of Computer Science
Kenule Beeson Saro-Wiwa
Polytechnic
Bori, Rivers State, Nigeria
Pushpendu Kar
School of Computer Engineering
The University of Nottingham
Ningbo, China
Supreet Kaur
Manav Rachna University
Faridabad, India
Manish Kumar
Manav Rachna University
Faridabad, India
Tapas Kumar
Manav Rachna University
Faridabad, India
Md Ashifuddin Mondal
Department of Computer Science and
Engineering
Narula Institute of Technology
Kolkata, India
Shweta Mongia
Manav Rachna University
Faridabad, India
Sarmistha Neogy
Dept. of Computer Sc. & Engineering
Jadavpur University
Kolkata, India
F E Onuodu
Department of Computer Science
University of Port Harcourt
Rivers State, Nigeria
Hukam Singh Rana
School of Computer Science
University of Petroleum and Energy
Studies, Bidholi campus
Dehradun, Uttarakhand, India
Zeenat Rehena
Department of Computer Science and
Engineering
Aliah University
Kolkata, India
Monideepa Roy
School of Computer Engineering
Kalinga Institute of Industrial Technology
India
Arkajit Saha
School of Computer Engineering
Kalinga Institute of Industrial
Technology
India
N R Saturday
Department of Computer Engineering
Rivers State University
Port Harcourti, Rivers State, Nigeria
Ananya Singh
School of Computer Engineering
KIIT, Deemed University
Bhubaneswar, India
Shriya Singh
School of Computer Engineering
KIIT, Deemed University
Bhubaneswar, India
T P Singh
School of Computer Science
UPES
Dehradun, India
Ravi Bhushan Thakur
Dept of Computer Sc. & Engineering
National Institute of Technology
Jamshedpur, Jharkhand, India
xi
Foreword
“If you build it, they will come.”
Ever since the fctional character of Ray Kinsella uttered that expression in the 1989
flm Field of Dreams, it has almost become a business mantra for many startups and
other new technology innovations. Given that there are many visionaries in the tech-
nology area who can design and build new technologies without any forethoughts on
whether their products will have customer acceptances or not, and even though many
new innovations eventually luck out on this, for the rest of us there is no option other
than following what Sam Walton had said, “There is only one boss. The customer.
And he can fre everybody in the company from the chairman on down, simply by
spending his money somewhere else.” But how do we know what a customer wants
without having a crystal ball? We can perhaps use the following quote from Bill
Gates for some guidance: “Your most unhappy customers are your greatest source of
learning.” One of the fundamental principles of recommendation engines is to learn
from the customer directly and make recommendations in the future so that we do
not have many “unhappy customers.”
The ultimate goal of a recommendation engine is to predict what the customer
may like or at least feel useful and make suggestions accordingly. Unfortunately, it is
not an easy task. More often than not, the recommendation engine has to make a rec-
ommendation with very little or no information whatsoever. If the recommendation
turns out to be wrong the customer may completely ignore any future recommenda-
tions or may even get irked or antagonized by the recommendations.
The information that is used by a recommendation engine is often stored in a
customer vs. product preference matrix called a utility matrix. Consider the utility
matrix for one of the major online retailers who might have over a quarter billion cus-
tomers worldwide and carry about quarter billion different products on their catalog.
The utility matrix for such a retailer would be in the order of 1016 entries. However,
most of the entries of such a huge table will be blank because most customers would
be using and may provide feedback for only a few hundred products. It is not nec-
essary to predict every blank entry in a utility matrix. Rather, it is only necessary
to discover some entries in each row that are likely to be of high relevance to the
customer.
In most applications, the recommendation system does not offer users a ranking
of all items but rather suggests a few that the user should value highly. It may not
even be necessary to fnd all items with the highest expected ratings, but only to fnd
a large subset of those with the highest ratings. Even for a simpler subset of problem
like that the recommendation engine needs to do it so effciently that even for such
a large matrix it can make these recommendations almost in real time and on the
fy, as when the customer is browsing and searching for a product online. Amazon
frst used the idea of the item-wise collaborative fltering approach along with the
traditional customer-wise collaborative fltering approach, which made unpacking
and retrieving information from large utility matrix over a very large and distributed
xii Foreword
data servers really feasible. The journal, IEEE Internet Computing, recognized the
2003 paper called “Amazon.com Recommendations: Item-to-Item Collaborative
Filtering,” by then Amazon researchers Greg Linden, Brent Smith, and Jeremy York
with the “Test of Time” honor during its 20th anniversary celebration in 2017.
Without a utility matrix, it is almost impossible to recommend items. However,
acquiring data from which to build a utility matrix is often diffcult. There are two
general approaches to discovering the value users place on items.
We can ask users to rate items. Movie ratings are generally obtained this way,
and some online stores try to obtain ratings from their purchasers. Sites provid-
ing content, such as some news sites or YouTube, also ask users to rate items. This
approach is limited in its effectiveness, since generally users are unwilling to provide
responses, and the information from those who do may be biased by the very fact that
it comes from people willing to provide ratings.
We can make inferences from users’ behavior. Most obviously, if a user buys
a product at Amazon, watches a movie on YouTube, or reads a news article, then
the user can be said to “like” this item. More generally, one can infer interest from
behavior other than purchasing. For example, if an Amazon customer views informa-
tion about an item, we can infer that they are interested in the item, even if they don’t
buy it. Some of the recent research works deal with this idea of “implicit feedback.”
Many recent research works deal with interpreting the “implicit feedback” from cus-
tomers using deep neural networks.
Development of recommender systems is a multi-disciplinary effort which
involves experts from various felds such as artifcial intelligence, human computer
interaction, information technology, data mining, statistics, adaptive user interfaces,
decision support systems, marketing, or consumer behavior.
The last items in the list, the consumer behavior, is the most important item for an
accurate prediction of effectiveness of a recommendation system—but often gets the
least amount of visibility in research literature. Many recommendation engines fail
to understand the consumer behavior and keeps on displaying the same items to the
customer even after the customer has either already purchased it elsewhere or has no
interest in it any longer.
The Netfix Prize is a good example to show that even one of the best algorithms
leave a lot of scope for improvements. The Netfix Prize was an open competition
for the best collaborative fltering algorithm to predict user ratings for flms, based
on previous ratings only, without any other information about the users or flms. The
competition was for the best algorithm that could improve upon Netfix’s own algo-
rithm by at least a specifed threshold. The competition started on October 2, 2006,
and by the middle of October a team called WXYZConsulting has already beaten the
native Netfix algorithm by the specifed threshold.
When it comes to recommendation engines, there is no “one size fts all” solu-
tion. One needs to keep the human aspects of it in the focus while trying to calibrate
other parts of the algorithm. The relationships between customers and product items
may be often context based, making the utility matrix more non-uniform and com-
plex than it may appear initially. A memory-based collaborative fltering is tradition-
ally used for computing the “similarity” between users and/or items. However, a
Foreword xiii
model-based collaborative fltering takes the solution a bit further by using different
models for different sub-groups within the utility matrix.
Often a hybrid approach with a machine learning model along with a knowledge
graph-based ontology might be the best solution when we have too little data or data
is not reliable enough. Knowledge graph-based approaches have been shown to be
particularly useful for a cold start for a new product or a new customer with no infor-
mation on either being available for the utility matrix. Even when customer feedback
might be available, sometimes they might be diffcult to rely upon. A hybrid approach
with knowledge graph and with both memory-based and model-based collaborative
fltering can often cover the full life cycle of a product from its inception to maturity
to when the product is no longer preferred anymore and can be discontinued.
In this anthology you will fnd several chapters covering different facets of the
problem of recommendation engines, such as how to get user feedback using mood
detection based on facial feature recognition to various frameworks for recommen-
dations engines using swarm intelligence and IOT-based systems, as well as different
methods related to content-based and collaborative fltering and their comparisons
for effcacy using deep neural network, TensorFlow and other techniques. I am sure
they will take you further down the road for choosing or building your own recom-
mender systems for your particular problem.
Maharaj Mukherjee, PhD
IBM Master Innovator for Life
Chair, IEEE Region 1 Central Area
Member, IEEE USA Awards Committee
Member, IEEE USA Region 1 Awards Committee
xv
Preface
A recommender system, or a recommendation system, is a subclass of information fl-
tering systems that predicts the “rating” or “preference” a user would give to an item.
They are primarily used for commercial applications. They are most commonly rec-
ognized as playlist generators for video and music services like Netfix, YouTube, and
Spotify; product recommenders for services such as Amazon; or content recommenders
for social media platforms such as Facebook and Twitter. These systems can operate
using a single input, like music, or multiple inputs within and across platforms like
news, books, and search queries. There are also popular recommender systems for spe-
cifc topics like restaurants and online dating. Recommender systems have also been
developed to explore research articles and experts, collaborators, and fnancial services.
There are many types of algorithms that have been used in building recommender
systems, and they each have their own unique set of features. When building a rec-
ommender system, a good knowledge of the working of the algorithms will help the
developer in choosing the correct type of algorithm for their application.
People use social networks to understand their health condition, so the health
recommender system is very important to derive outcomes such as recommending
diagnoses, health insurance, clinical pathway-based treatment methods, and alterna-
tive medicines based on the patient’s health profle. Recent research that targets the
utilization of large volumes of medical data while combining multimodal data from
disparate sources reduces the workload and cost in healthcare. In the healthcare sec-
tor, big data analytics using recommender systems have an important role in terms of
decision-making processes concerning a patient’s health.
The application of recommender systems can also be extended to more crucial
areas like healthcare and defense. The health recommender system (HRS) is becom-
ing an important platform for healthcare services. In this context, health intelligent
systems have become indispensable tools in decision-making processes in the health-
care sector. Their main objective is to ensure the availability of valuable information
at the right time by ensuring information quality, trustworthiness, authentication,
and privacy concerns. In the past few years, the machine learning and artifcial intel-
ligence communities have done signifcant work in using algorithms to identify pat-
terns within data. These patterns have then been applied to various problems, such
as predicting individuals’ future responses to actions and performing pattern-of-life
analyses on persons of interest. Some of these algorithms have widespread applica-
tion to Department of Defense (DoD) and intelligence community (IC) missions.
One machine learning and artifcial intelligence technique that has shown great
promise to DoD and IC missions is the recommender system. Here the recommender
systems can be used for generating prioritized lists for defense actions, detecting
insider threats, monitoring network security, and expediting other analyses. In addi-
tion, while designing such a system, it is important to know the security and safety
features that need to be addressed. This book brings together the research ideas and
experiences of academicians and industry experts in building robust and reliable
recommender systems for critics’ applications.
xvi Preface
Since developing recommender systems requires the efforts of various disciplines
and has a varieties of applications, by compiling the experiences of experts from
various domains, this book is aimed at being a comprehensive handbook for develop-
ing a recommender system from scratch and is suitable for readers from a wide cross-
section of specialization. Recommender systems are, at present, primarily used for
commercial applications; the main aim of this book is to provide students, research-
ers, and solution providers with the steps needed to design recommender systems for
critical and real-time applications like healthcare and surveillance. It also addresses
the security aspects and ways to deal with possible attacks to build a robust system.
It familiarizes the readers, who wish to design a recommender system from scratch,
with the steps to create such a system. It is expected to empower the readers to do
the following:
• Identify and describe a recommender system for practical uses
• Design, train, and evaluate a recommendation algorithm
• Understand how to migrate from a recommendation model to a live system
with users
• Utilize the data collected from a recommender system to understand user
preferences
• Apply the knowledge to new settings.
This book presents a multi-disciplinary approach to the development of recom-
mender systems. Different types of algorithms for recommender systems along with
their comparative analysis have been done. The book also presents the research fnd-
ings of experts in various felds of computer science in the role of building rec-
ommender systems for various types of applications. Some examples are handling
the big data behind recommender systems, using marketing benefts, making good
decision support systems, understanding the role of machine learning and artifcial
networks, using statistical models, etc. The book also presents two case studies of the
application of the recommender system in healthcare monitoring. The book shows
how to design attack-resistant and trust-centric recommender systems for applica-
tions dealing with sensitive data.
The book has presented an in-depth discussion in the following chapters, which
cover various aspects of recommender systems.
• Comparison of Different Machine Learning Algorithms to Classify
Whether or Not a Tweet is about a Natural Disaster—A Simulation-
Based Approach
This chapter discusses the use of various machine learning algorithms
to classify whether or not a tweet is about a natural disaster and compares
the results of classifcation algorithms in order to identify the best one for
analyzing Twitter data. This chapter also discusses the role of social media
(presently, Twitter) in a natural disaster or emergency situation along with
current research works as well as challenges faced by researchers in this
feld.
Preface xvii
• An End-to-End Comparison among Contemporary Content-Based
Recommendation Methodologies
This chapter reviews a substantial number of articles and gives a fnal
judgment on which algorithms should be adopted and tweaked in particular
ways in order to have a more trustworthy environment. It also discusses
some ideas for future development of this feld based on choices made by
users of any other evolving culture in whatever form it may take.
• Neural Network-Based Collaborative Filtering for Recommender Systems
This chapter analyses different algorithms developed and used in the
collaborative fltering (CF) based recommender systems and compares their
performances in selecting the best algorithm.
• Recommendation System and Big Data: Its Types and Applications
In this chapter, various recommendation systems are discussed and their
application in various sectors are compared.
• The Role of Machine Learning/AI in Recommender Systems
This chapter covers the machine learning algorithms that are associated
with recommender systems. It also highlights the hybridization of these
algorithms and how robust solutions are achieved from them.
• A Recommender System Based on TensorFlow Framework
This chapter aims to examine TensorFlow recommenders in implement-
ing a recommender system. This chapter discusses how to build a recom-
mender system based on deep learning.
• A Marketing Approach to Recommender Systems
This chapter examines recommender systems: their classes, their char-
acteristics, and how they can be used for marketing. It also discusses rec-
ommender systems that facilitate massive, detailed, and cost-effective data
acquisition; one-to-one marketing analysis; market basket analysis; more
informed, personalized, and adaptive recommendations; one-to-one mar-
keting analysis; personalization and adaptation; niche targeting analysis;
and improved merchandising and atmospherics.
• Applied Statistical Analysis in Recommendation Systems
This chapter provides a thorough literature overview of what is com-
monly regarded to be the most popular statistical approaches to recom-
mender systems. It lays attention on the statistical basis of the techniques
rather than their computing details. This chapter discusses in detail the
major statistical methods used in different recommender systems.
• An IoT-Enabled Innovative Smart Parking Recommender Approach
This chapter proposes an IoT enabled and network-based smart parking
recommender solution, RecoPark. The proposed system enables cars to fnd
a parking space automatically across cities and reserve them on the move.
Optimal usage of parking space is rewarded to encourage disciplined usage
of the system.
xviii Preface
• Classifcation of Road Segments in Intelligent Traffc Management
System
This chapter presents a framework for an intelligent traffc manage-
ment system and discusses the different components of it. It also presents
road segment classifcation techniques using different machine learning
approaches based on traffc density and average speed.
• Facial Gestures-Based Recommender System for Evaluating Online
Classes
This chapter discusses creating a model to track and recognize students’
postures and gestures throughout the class duration to measure student
engagement with the material and teaching techniques of their professors.
• Application of Swarm Intelligence in Recommender Systems
This chapter discusses the advantages of the applications of Particle
Swarm Optimization algorithms for developing more complex recommen-
dation systems using multi-agent frameworks.
• Application of Machine Learning Techniques in the Development of
Neighborhood-Based Robust Recommender Systems
This chapter evaluates and discusses the utility of traditional network
clustering techniques such as Louvain, Infomap, and label propagation algo-
rithms for the development of neighborhood-based robust recommender sys-
tems. It also looks into and incorporates a modality-based network clustering
method to make another neighborhood-based robust recommender systems.
• Recommendation Systems for Choosing Online Learning Resources—A
Hands-On Approach
This chapter is a hands-on approach which describes, step by step,
the process of developing a recommendation system for choosing online
resources.
We are thankful to all our authors for their excellent contributions, which led to
the compilation of such an excellent resource for anyone who is interested in develop-
ing their own recommendation systems. A special thanks to Dr. Maharaj Mukherjee
of IBM for kindly writing such a valuable foreword for us.
We also thank our series editor, Dr. Prasant Kumar Pattnaik, from the school of
computer engineering, KIIT DU, for his excellent support and suggestions through-
out our venture.
Finally we are thankful to Dr. Gagandeep Singh and Ms. Aditi Mittal from Taylor
and Francis for providing their timely inputs for the smooth execution of the entire
project.
(Editors)
Monideepa Roy
Pushpendu Kar
Sujoy Datta
1 Comparison of Different
Machine Learning
Algorithms to Classify
Whether or Not a Tweet Is
about a Natural Disaster
A Simulation-Based
Approach
Subrata Dutta, Manish Kumar, Arindam Giri,
Ravi Bhushan Thakur, Sarmistha Neogy, and
Keshav Dahal
CONTENTS
1.1 Introduction ...................................................................................................... 2
1.2 Related Work .................................................................................................... 2
1.3 Challenges......................................................................................................... 3
1.3.1 Data Collection..................................................................................... 3
1.3.2 Data Authentication.............................................................................. 3
1.4 The Dataset....................................................................................................... 4
1.4.1 Flesch Reading Ease............................................................................. 9
1.4.2 Flesch-Kincaid Grade Level................................................................. 9
1.5 Methodology....................................................................................................10
1.5.1 Model Learning/Training Section.......................................................10
1.5.1.1 Data Preprocessing ...............................................................10
1.5.1.2 Feature Extraction.................................................................10
1.5.1.3 Classifcation.........................................................................11
1.5.2 Evaluation/Testing Section..................................................................11
1.6 Results and Discussion ....................................................................................11
1.7 Conclusion and Future Work ...........................................................................14
References.................................................................................................................15
DOI: 10.1201/9781003319122-1 1
2 Recommender Systems
1.1 INTRODUCTION
In the growing feld of artifcial intelligence, researchers are mostly focusing on uti-
lization of the available data and the upcoming data in future. Social media has too
much data and, hence, it can be utilized in various felds to get the best out of it,
such as a) getting feedback of a newly launched product or movie, b) knowing public
opinion in an ongoing election, c) review of a restaurant using comments/feedback
posted by various user, etc. Analysis of user tweets/comments/feedback/reviews by
using machine learning and/or deep learning technique is called sentiment analysis.
[1-2] Basically, sentiment analysis is performed to know the concern of the public.
Similarly, when a natural disaster takes place or in any emergency situation, social
media produces too much information, and by performing sentiment analysis over
that information, some necessary action can be taken for the wellness of mankind.
Researchers are working so that information available over social media could be
utilized to its full capacity.
In any emergency situation, especially in the case of a natural disaster, it is very
diffcult to maintain communication because of disturbances due to the heavy impact
of that incident at a particular location.
In the past, most communications were done via televisions, radios, and newspa-
pers, which are affected during disaster period. It was also very diffcult to get timely
and accurate information because communication was one way. To get the actual
scenario of any incident, two-way communication plays an important role. This is
why social media outperforms other communication media.
Social media such as Facebook, Twitter, etc. allow their users, irrespective of
their location and role, to share text information, pictures, and videos related to
any news. At the same time, the data available over social media are real time
data and can be utilized to get the current status of a particular location regard-
ing an event. These data can be utilized by concerned authorities, which is an
important factor in reducing the impact of an incident by taking proper mitigat-
ing actions.[2-3] In this technological world, we get some news earlier from
social media than from traditional sources. The main objective of this chapter is
to analyze the sentiment of various tweets and check whether or not it is about
a natural disaster.
The remainder of the chapter is organized as follows. Section 1.2 includes
related works. In Section 1.3, we discuss various challenges faced by researchers
in this area. Section 1.4 discusses the dataset used in simulation. In Section 1.5, we
outline the methodology of data classifcation using machine learning. Section 1.6
provides results and discussions. Finally, Section 1.7 includes the conclusion and
future work.
1.2 RELATED WORK
The infuence of neighborhood equity on disaster situational awareness is investi-
gated in hurricane by Zhai et al. 2020.[4] In Zou et al. 2018, Twitter data is mined
and analyzed in disaster resilience.[5] The authors try to fnd common indexes
from Twitter data so as to manage emergency situations. Human mobility patterns
3
Different Machine Learning Algorithms to Classify a Tweet
during disasters are detected in Wang and Taylor 2014.[6] Potential use of social
media in hurricanes is mentioned in Guan and Chen 2014 and Kryvasheyeu et
al. 2016.[7-8] Research work in Wang et al. 2019 reveals that socially vulner-
able communities had more infuence than other factors in Hurricane Sandy.[9]
Bayesian networks classifers are used in sentiment analysis of Twitter data during
natural disaster in Ruz et al. 2020.[10] This research demands the superiority of
Bayesian classifer over support vector machine and random forest. The authors
in Yang et al. 2019 proposed a credibility framework of Twitter data in a disaster
scenario.[11] The framework is tested using a number of Twitter keywords. In
order to generate Twitter Situational Awareness (TwiSA), sentiment analysis and
topic modeling are used in Karami et al. 2020.[12] The TwiSA was used during
the 2015 South Carolina food to manage huge tweets and fnd people’s negative
concerns. A real-time disaster damage assessment model using social media is
proposed in Shan et al. 2019.[13] In order to provide credible information about
disasters, the Zahra et al. 2020 proposed an automatic identifcation of eyewit-
ness messages on Twitter.[14] Based on different sources of tweets, the authors
classify tweets and fnd associated characteristics. Analysis of Twitter data is
used during the 2015 Chennai food through random forests, naïve Bayes, and
decision tree. The research in Nair et al. 2017 reveals that random forests gives
best result.[15]
1.3 CHALLENGES
1.3.1 DATA COLLECTION
The importance of data can never be neglected in data analysis and data mining.
The more data, the more information can be gathered. In the present application,
we needed text data. As we worked on disaster tweets, we focused only on Twitter
data extraction. We could access Twitter data by purchasing from private vendors or
using Twitter application programming interface (API) to extract the data.[16] Most
researchers prefer APIs for data extraction. But data extraction is restricted through
this method. There is also restriction on the number of calls made for data extraction
using a particular account. Also, most of the social media data (including Twitter) are
unstructured, so it is very diffcult to extract data. Unstructured data does not follow
any particular pattern so that specifc keywords could be used to extract the relevant
data of any incident.
1.3.2 DATA AUTHENTICATION
As we analyze social media data, where every individual is allowed to share data,
there is no proper authentication or verifcation of data. So in a case of emergency,
incorrect data may lead to danger of human lives. Beyond emergency situations,
sometimes rumors also spread over social media, which indirectly become respon-
sible for violence in society. So detecting fake news or posts in social media is still a
very big challenge. Due to an increase in fake news, concerned authorities are work-
ing hard to deal with such situations.
4 Recommender Systems
1.4 THE DATASET
We took a dataset from a Kaggle competition,[17] in which 5329 samples were used as
training data and 2284 samples were used for model evaluation (i.e., out of 7613 samples,
70% were used as training data and 30% were used as test data). Some of the samples
were manually verifed to check the correctness of the sample dataset. The dataset con-
tains felds such as ID, keyword, location, text, and target. The ID is a unique identity; the
keyword (may be empty) is an important key from the tweet; text (most important feld
for our analysis) is the actual text of tweet; and the target is our dependent variable (i.e., 1
represents tweet is about a real disaster, 0 means tweet is not about a real disaster).
A sample dataset is shown in Figure 1.1. The number of tweets per class is shown
in Figure 1.2(a), and the percentage of each class is shown in Figure 1.2(b). The num-
ber of tweets for the top 10 locations is shown in Figure 1.3. The number of tweets
according to location in an entire dataset on a map is shown in Figure 1.4. The num-
ber of tweets for each class for top 10 locations is shown in Figure 1.5. Word clouds
for disaster tweets are shown in Figure 1.6. Word cloud for non-disaster tweets are
shown in Figure 1.7. Flesch-Kincaid readability test analysis [18] is shown in Figure
1.8 and Figure 1.9, and sample data after preprocessing is shown in Figure 1.10.
FIGURE 1.1 Sample dataset.
FIGURE 1.2A Number of tweets per class.
5
Different Machine Learning Algorithms to Classify a Tweet
FIGURE 1.2B Percentage of each class.
FIGURE 1.3 Number of tweets for 10 top locations.
FIGURE 1.4 Number of tweets according to location in the entire dataset on a map.
6 Recommender Systems
FIGURE 1.5 Number of tweets for each class for top 10 locations.
FIGURE 1.6 Word cloud for disaster tweets.
7
Different Machine Learning Algorithms to Classify a Tweet
FIGURE 1.7 Word cloud for non-disaster tweets.
FIGURE 1.8 Flesch-Kincaid readability test.
8 Recommender Systems
FIGURE 1.9 Flesch-Kincaid analysis of data.
FIGURE 1.10 Sample data after preprocessing.
9
Different Machine Learning Algorithms to Classify a Tweet
Two formulae for evaluating the readability of text—usually by counting syllables,
words, and sentences—are Flesch Reading Ease and Flesch-Kincaid Grade Level.
1.4.1 FLESCH READING EASE
In the Flesch Reading Ease test,[19] higher scores indicate material that is easier to
read; lower scores mark passages that are more diffcult to read. The formula for the
Flesch Reading Ease score (FRES) test is:
206.835-1.015*(total words/total sentences) – 84.6 (total syllables/total
words)
1.4.2 FLESCH-KINCAID GRADE LEVEL
These readability tests are used extensively in the feld of education. The Flesch–
Kincaid Grade Level Formula presents a score as a US grade level, which makes
it easier for teachers, parents, librarians, and others to judge the readability level of
various books and texts. It can also mean the number of years of education gener-
ally required to understand this text, which is relevant when the formula results in
a number greater than 10. The grade level is calculated with the following formula:
0.39*(total words/total sentences) + 11.8*(total syllables/total words) – 15.59
Scores can be interpreted as shown in Table 1.1.
TABLE 1.1
Flesch–Kincaid Readability Test Summary
Score School level Notes
100-90 5th grade Very easy to read. Easily understood by an average
11-year-old student.
90-80 6th grade Easy to read. Conversational English for consumers.
80-70 7th grade Fairly easy to read.
70-60 8th & 9th grade Plain English. Easily understood by 13- to
15-year-old students.
60-50 10th to 12th grade Fairly diffcult to read.
50-30 College Diffcult to read.
30-10 College graduate Very diffcult to read. Best understood by university
graduates.
10-0 Professional Extremely diffcult to read. Best understood by
university graduates.
10 Recommender Systems
1.5 METHODOLOGY
The methodology adopted while applying machine learning in analyzing Twitter data
is depicted in Figure 1.11. As stated earlier, we have taken dataset from a Kaggle com-
petition,[17] in which 5329 samples were used as training data, and 2284 samples were
used for model evaluation (i.e., out of 7613 samples, 70% used as training data and 30%
as test data). We divided our experiment into two sections: model learning and testing.
1.5.1 MODEL LEARNING/TRAINING SECTION
Model learning/training consists of data preprocessing, feature extraction, and exe-
cuting algorithm for classifcation [20].
1.5.1.1 Data Preprocessing
This is done on three columns (keyword, location, text). Then data cleaning was done by
expanding the contraction, removing accented character, converting text to lower case,
removing digits, splitting into tokens, and, fnally, lemmatization and stop word removal.
1.5.1.2 Feature Extraction
Term frequency-inverse document frequency (TF-IDF), a technique used to convert
text into word vectors, was used; fnally, we got the matrix with dimension m*n,
where m represents the number of samples in our dataset and n represents the number
FIGURE 1.11 Methodology adopted for applying machine learning for analyzing Twitter data.
11
Different Machine Learning Algorithms to Classify a Tweet
of features in the dataset.[21] We tuned some of the parameters of TF-IDF, such as
n_gram range and max_feature to get good feature vector.
1.5.1.3 Classifcation
With feature vector obtained in the last step as input, machine learning classifca-
tion algorithms were used, and we got a trained classifer/model as an output of this
step. Some algorithms used here were logistic regression, K-nearest neighbors, near-
est centroid, Gaussian naïve Bayes, Multinomial Naïve Bayes, linear support vector
machine (SVM), decision tree, and random forest.
1.5.2 EVALUATION/TESTING SECTION
This phase consisted of data preprocessing, feature extraction, and label prediction.
Data preprocessing and feature extraction were conducted in the same way as was
done in the training phase. Feature vector obtained was given as input to a trained
model/classifer (as obtained in the training phase), and a label for each sample was
predicted as an output.
The simulation set up used for classifying Twitter data is given in Table 1.2.
1.6 RESULTS AND DISCUSSION
After analyzing the results of different machine learning classifer algorithms obtai-
ned after the simulation process, we found that logistic regression gave good accu-
racy with TF-IDF word embedding technique. We have presented our score, which is
an average of fve executions. Obtained result are presented in Table 1.3.
We used the following eight algorithms in this experiment: logistic regres-
sion, K-nearest neighbor (KNN), nearest centroid, Gaussian naïve Bayes (GNB),
Multinomial Naïve Bayes (MNB), SVM, decision tree, and random forest.
For further analysis we split the training data (i.e., 70% of the original dataset)
into various subsets such as 25%, 50%, 75%, and 100%. These individual subsets
were used for training the algorithms and tested on the same test data (i.e., 30% of
the original dataset). The results are presented in Table 1.4.
TABLE 1.2
Simulation Parameters
Parameter Value
Programming language Python 3.0
Library used NumPy, pandas, Matplotlib, re, NLTK, sklearn, LIME, warnings,
Seaborn, Plotly, statistics, textstat, PyLab, spaCy, GeoPy, folium
IDE Jupyter Notebook
Processor Intel core i5 2.4GHz, 2.10GHz
Memory 8GB RAM
System type 64-bit OS, x64-based processor
12 Recommender Systems
TABLE 1.3
Result Obtained by Various Classifers
Algorithm Class Precision Recall F Score Accuracy
Logistic regression 0 78 88 83 79
1 81 67 73
KNN 0 69 92 79 72
1 81 47 59
Nearest centroid 0 80 80 80 77
1 74 73 74
GNB 0 70 90 79 72
1 79 50 61
MNB 0 76 91 83 78
1 84 61 71
SVM (Linear) 0 78 85 81 77
1 77 69 73
Decision tree 0 77 74 76 72
1 67 70 69
Random forest 0 75 89 81 76
1 80 61 69
TABLE 1.4
Accuracy Obtained by Varying Training Dataset Sizes
Algorithm 25% 50% 75% 100%
Logistic regression 73 75 78 79
KNN 70 70 71 72
Nearest centroid 73 75 76 77
GNB 70 70 71 72
MNB 73 76 77 78
SVM (Linear) 73 75 76 77
Decision tree 70 70 71 72
Random forest 71 74 75 76
We also experimented on a word embedding technique called count vector-
izer,[21] and the results are presented in Table 1.5. By making word clouds, we dug
deeper into the feature set and got to know the important keyword or tokens, which
play an important role in classifcation. Figure 1.12 shows a word cloud of important
features that we used in our experiment.
FurtherweusedatechniquecalledLocalInterpretableModel-AgnosticExplanations
(LIME), which was used to explain the predictions of any regression or classifer by
approximating it locally with an interpretable model.[17] Figure 1.13 explains predic-
tions of the chosen classifer (logistics regression) to determine if a document is about
a disaster or a non-disaster based on LIME. The bar chart in Figure 1.14 shows various
Different Machine Learning Algorithms to Classify a Tweet 13
TABLE 1.5
Results Obtained by Various Classifer Using Count Vectorizer
Algorithm Class Precision Recall F Score Accuracy
Logistic regression 0 79 86 83 79
1 79 70 74
KNN 0 68 91 78 71
1 78 44 56
Nearest centroid 0 76 86 81 76
1 77 63 70
GNB 0 70 91 79 73
1 80 49 61
MNB 0 77 89 83 79
1 81 66 73
SVM (Linear) 0 78 81 89 76
1 73 70 71
Decision tree 0 78 78 78 75
1 70 71 71
Random forest 0 76 86 81 77
1 77 65 70
FIGURE 1.12 Word cloud of important features used in the experiment.
14 Recommender Systems
FIGURE 1.13 Predictions of the chosen classifer.
FIGURE 1.14 Bar chart of various positive and negative keywords for the disaster class.
positive and negative keywords for the disaster class obtained; the model interpretation
for a particular example is in Figure 1.12. Color indicates which class the word contrib-
utes to (blue for disaster, yellow for non-disaster).
1.7 CONCLUSION AND FUTURE WORK
We analyzed the use of Twitter data and realized that Twitter is a community where
people post the status of the current situation of their surroundings. Social media
platform such as Twitter can be used for communication during any kind of natu-
ral disaster and emergencies. These Twitter data can be used in getting information
related to public opinion by using various machine learning techniques.[21] In this
chapter, we analyzed Twitter data related to natural disaster, and we found that logis-
tic regression is able to classify a tweet, whether or not it is about natural disaster,
15
Different Machine Learning Algorithms to Classify a Tweet
with an average accuracy of 79%. Twitter data can be used to build an application
that can be helpful in natural disasters or other emergencies. The biggest diffculty
we found is the authenticity of data available over Twitter or any other social media
platform. As future work, we will try to analyze all types of data (such as images,
videos, etc.) available over social media platform like Twitter and other platforms.
We would like to fnd the importance of the data in a particular scenario and action
that may be taken based on the data, if any. In addition, we will try to improve the
accuracy of current work.
REFERENCES
[1] J. Kersten and F. Klan, “What happens where during disasters? A Workfow for the
multifaceted characterization of crisis events based on Twitter data,” J. Contingencies
Cris. Manag., vol. 28, no. 3, pp. 262–280, 2020.
[2] N. Pourebrahim, S. Sultana, J. Edwards, A. Gochanour, and S. Mohanty, “Understanding
communication dynamics on Twitter during natural disasters: A case study of Hurricane
Sandy,” Int. J. Disaster Risk Reduct., vol. 37, p. 101176, 2019.
[3] B. Abedin and A. Babar, “Institutional vs. non-institutional use of social media during
emergency response: A case of Twitter in 2014 Australian bush fre,” Inf. Syst. Front.,
vol. 20, no. 4, pp. 729–740, 2018.
[4] W. Zhai, Z.-R. Peng, and F. Yuan, “Examine the effects of neighborhood equity on
disaster situational awareness: Harness machine learning and geotagged Twitter data,”
Int. J. Disaster Risk Reduct., vol. 48, p. 101611, 2020.
[5] L. Zou, N. S. N. Lam, H. Cai, and Y. Qiang, “Mining Twitter data for improved under-
standing of disaster resilience,” Ann. Am. Assoc. Geogr., vol. 108, no. 5, pp. 1422–1441,
2018.
[6] Q. Wang and J. E. Taylor, “Quantifying human mobility perturbation and resilience in
Hurricane Sandy,” PLoS One, vol. 9, no. 11, p. e112608, 2014.
[7] X. Guan and C. Chen, “Using social media data to understand and assess disasters,”
Nat. Hazards, vol. 74, no. 2, pp. 837–850, 2014.
[8] Y. Kryvasheyeu et al., “Rapid assessment of disaster damage using social media activ-
ity,” Sci. Adv., vol. 2, no. 3, p. e1500779, 2016.
[9] Z. Wang, N. S. N. Lam, N. Obradovich, and X. Ye, “Are vulnerable communities digi-
tally left behind in social responses to natural disasters? An evidence from Hurricane
Sandy with Twitter data,” Appl. Geogr., vol. 108, pp. 1–8, 2019.
[10] G. A. Ruz, P. A. Henríquez, and A. Mascareño, “Sentiment analysis of Twitter data dur-
ing critical events through Bayesian networks classifers,” Futur. Gener. Comput. Syst.,
vol. 106, pp. 92–104, 2020.
[11] J. Yang, M. Yu, H. Qin, M. Lu, and C. Yang, “A Twitter data credibility framework—
Hurricane harvey as a use case,” ISPRS Int. J. Geo-Information, vol. 8, no. 3, p. 111,
2019.
[12] A. Karami, V. Shah, R. Vaezi, and A. Bansal, “Twitter speaks: A case of national disas-
ter situational awareness,” J. Inf. Sci., vol. 46, no. 3, pp. 313–324, 2020.
[13] S. Shan, F. Zhao, Y. Wei, and M. Liu, “Disaster management 2.0: A real-time disaster
damage assessment model based on mobile social media data—A case study of Weibo
(Chinese Twitter),” Saf. Sci., vol. 115, pp. 393–413, 2019.
[14] K. Zahra, M. Imran, and F. O. Ostermann, “Automatic identifcation of eyewitness
messages on Twitter during disasters,” Inf. Process. Manag., vol. 57, no. 1, p. 102107,
2020.
16 Recommender Systems
[15] M. R. Nair, G. R. Ramya, and P. B. Sivakumar, “Usage and analysis of Twitter during
2015 Chennai food towards disaster management,” Procedia Comput. Sci., vol. 115,
pp. 350–358, 2017.
[16] M. Martinez-Rojas, M. del Carmen Pardo-Ferreira, and J. C. Rubio-Romero, “Twitter
as a tool for the management and analysis of emergency situations: A systematic litera-
ture review,” Int. J. Inf. Manage., vol. 43, pp. 196–208, 2018.
[17] M. T. Ribeiro, S. Singh, and C. Guestrin, “‘ Why should I trust you?’ Explaining the
predictions of any classifer,” in Proceedings of the 22nd ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining, 2016, pp. 1135–1144.
https://www.researchgate.net/publication/305342147_Why_Should_I_Trust_You_
Explaining_the_Predictions_of_Any_Classifer
[18] P. Misra, N. Agarwal, K. Kasabwala, D. R. Hansberry, M. Setzen, and J. A. Eloy,
“Readability analysis of healthcare-oriented education resources from the American
academy of facial plastic and reconstructive surgery,” The Laryngoscope, vol. 123, no.
1, pp. 90–96, 2012.
[19] P. Jacob and A. L. Uitdenbogerd, “Readability of Twitter Tweets for second language
learners,” in Proceedings of the 17th Annual Workshop of the Australasian Language
Technology Association, 2019, pp. 19–27. https://aclanthology.org/U19-1003
[20] S. Karmaniolos and G. Skinner, “A literature review on sentiment analysis and its foun-
dational technologies,” in 2019 IEEE 4th International Conference on Computer and
Communication Systems (ICCCS), 2019, pp. 91–95.
[21] K. S. Kalaivani, S. Uma, and C. S. Kanimozhiselvi, “A review on feature extraction
techniques for sentiment classifcation,” in 2020 Fourth International Conference on
Computing Methodologies and Communication (ICCMC), 2020, pp. 679–683.
An End-to-End
2 Comparison among
Contemporary Content-
Based Recommendation
Methodologies
Debajyoty Banik and Mansheel Agarwal
CONTENTS
2.1 Introduction .....................................................................................................17
2.1.1 Why Do We Need Recommender Systems?........................................18
2.2 A Very Basic Content-Based Model................................................................19
2.3 Data Representation.........................................................................................19
2.3.1 Structured Data................................................................................... 20
2.3.2 Unstructured Data............................................................................... 20
2.4 Content-Based Recommendation through User Ratings and Item
Analysis ...........................................................................................................21
2.4.1 Explicit Feedback ................................................................................21
2.4.2 Implicit Feedback ................................................................................21
2.5 Comparing and Analysing.............................................................................. 22
2.5.1 Improvement of the NLP Model......................................................... 22
2.5.2 Adjustment of Weights........................................................................ 22
2.5.3 The Cold Start Recommendation ....................................................... 23
2.5.4 Emotion Based.................................................................................... 24
2.5.5 Conversational Recommender............................................................ 25
2.6 Conclusion and Future Perspective................................................................. 26
References................................................................................................................ 26
2.1 INTRODUCTION
As we set our feet in this world of recommender systems, it’s really important for
us to understand why we need recommender systems. With the growth of technol-
ogy and an increase in the scale of artifcial intelligence (AI), machines are now
capable of providing us with a list of movies which seem exactly in sync with us.
Before we start comparing different recommender systems, we should, frst and
DOI: 10.1201/9781003319122-2 17
18 Recommender Systems
foremost, understand a very basic model of a content-based movie recommenda-
tion. Once we understand how it works, we will quickly dive into the technical
terms related to it, so that all my non-tech friends get to understand the various
algorithms with ease too.
2.1.1 WHY DO WE NEED RECOMMENDER SYSTEMS?
Living in such a beautiful a country as India, I will defnitely start out by giv-
ing an insight into a little apparel store in the area where I reside. My mother
would always go to a sari store, and the salesman there would try to “recom-
mend” saris to my mom, which surprisingly matched her taste. That was the very
primitive idea I had of recommender systems before I even started school. The
world evolved and so did the stores around us. What we had in a physical envi-
ronment started changing to what we now call a massive chain of multi-national
companies who will do anything to bind in their customers. A very loved feld
for tech-seekers, machine learning became the salesman in this platform readily
adapting to the booming e-commerce led by hotshots like Amazon, Walmart,
Myntra, Ajio and Wish.
A recommender system (Figure 2.1) is not just important to multi-media com-
panies but is also required to connect similar people and create a cohort in this
ever-increasing world of possibilities. I started out by giving a very general instance
of where a recommender system was in use before it was even introduced. I would
conclude by maintaining that it’s a really important factor in user engagement and
integrity and, therefore, inducing people to often switch careers and bring in more
ideas about how the algorithms can be made more robust and trustworthy.
FIGURE 2.1 Classifcation of the recommender system.
19
Comparison of Content-Based Recommendation Methodologies
2.2 A VERY BASIC CONTENT-BASED MODEL
A content-based recommendation system basically involves an inbuilt search engine in
itself that enables it to weigh certain items and predict the overall measurement of the
movie to be recommended based on the overall weight calculated.[1-2]
We will now understand the working of the system with the help of an example.
Suppose we have a super set A consisting of all the possible movies in the given
platform. Now we have another set, B, consisting of all the movies that a user has
watched and given us some information about, such that ∀B∈A and |B|<<|A|, which
makes sense as we’re taking a considerable amount of data for training our recom-
mendation model. We also introduce another set, C, consisting of the movies the user
has yet not rated, ∀C∈A and |C|<<|A| and a function f(x) that can also be referred to
an interest function of the user, which denotes a positive (1) or a negative (0) value
and helps us to derive another function g(x), which will estimate the value of f(x) for
every element of the set A to effectively recommend appropriate content to the user
based on his or her personal choice.
Now the whole game of recommendation depends upon classifcation and regres-
sion wherein we take into account the user’s ratings and the content of a limited num-
ber of training data sets to educate our estimation function and then try to match it
best to the user’s interest function before a movie is recommended to him or her. This
chapter discusses the recently used algorithms, extensively working in these two main
domains, and tries to incorporate the machine learning techniques to either make the
user’s ratings more trustworthy or to expand the whole data set of the information we
have about the movies set B from different resources to match the user’s interests better.
Before we move on to understanding how the recent methodologies have affected
the contemporary content-based recommendation system, we must know how we
prepare and present the data so as to feed into our user rating estimation or the item
analysis model.
2.3 DATA REPRESENTATION
Now that we know we need a robust and accurate data set so as to provide an appro-
priate estimation of the user’s ratings, we need to know how we source in and work
through this data. Usually, the data used in the feld of content-based recommender
systems is real time data like books, interviews, movies, authors, plays, etc., which
we cannot give our model directly. We must now move forward and dive into how
we manage and organise this data in an effcient manner as the more incorrect the
data sets we have, the lesser will be the chances of our estimation matching with the
interests of the users. We don’t want to waste our time deriving theoretical data that
will not be of any use to the practical circumstances.
The biggest question that we have in mind is if this data should be generated or
manually fed by some technician. Both have their own pros and cons; for example,
if we try to get really automated, we might not get a proper description of a par-
ticular item from a computer-generated data set. On the other hand, if we let the
20 Recommender Systems
human mind map put the data for us, it will be really subjective, which again will
not help us increase the percentage of integrity of the estimation function in any
form. Keeping this in mind, we have two different methods in which there will be
an unbiased approach to represent the data in a way that we get the advantages of
both the felds without trusting one blindly. They are discussed in the following
sections.
2.3.1 STRUCTURED DATA
When we talk about structured data, we mean the relational tables that we have in a
properly constructed data set. They have a known data model or, in other words, a
data schema. We have an attribute defned for every item and can also differentiate
among them using an identifcation trademark called the primary key.
2.3.2 UNSTRUCTURED DATA
Almost every data that does not follow a fxed database schema can fall into this cat-
egory. It includes all the lengthy unrestricted texts and multimedia, even if they have
an underlying structure, like a bit of grammar. In unstructured data, it is common to
represent multimedia data using textual descriptions.[3] Although in the usual case
this requires human intervention, this representation allows us to analyse multimedia
data which usually has a much greater size than its textual description and requires
complex and time-consuming analysing techniques. Furthermore, as noted before,
the modern techniques of pattern recognition from multimedia data are still in their
infancy and do not always produce satisfying results.
We also have another data set that we call a semi-structured data, which is almost
in the shape of a data schema and breaks the rules of regular data by containing some
multimedia data for some of its attributes. This representation is really important
for movies—the topic of our chapter—which doesn’t follow a strict data schema
and consists of mostly an amalgam of regular and multimedia values that we need
to break down in order to provide the data set to our recommendation model. In
information extraction and data mining, semi-structured data is usually partitioned
in structured and unstructured data and then treated using different techniques for
each kind of data.
The strict structure of structured data allows us to treat every item as a
n-dimensional vector, where n is the number of characteristics used to describe
an item. Then we can apply well known techniques from the felds of information
theory and information retrieval, such as cosine similarity and Pearson correla-
tion, in order to measure the similarity of items. Whereas, as for the unstructured
data, we cannot directly process them using simple natural language processing
methods as none of the algorithms have proved so right that it has been able to
crack into the complex multimedia data like graphics and pixels. So we frst con-
vert such unstructured data set to a structured form and then process it by using
information extraction and pattern recognition to comprehend the multimedia and
the restricted texts.
21
Comparison of Content-Based Recommendation Methodologies
2.4 CONTENT-BASED RECOMMENDATION THROUGH
USER RATINGS AND ITEM ANALYSIS
Now that we have explained how the sourcing of the data works, we must move to our
concept of how user ratings and his or her profle can add with the item factors to cal-
culate an estimated value g(x) for every movie in the set A. Now this user model can
be put to work to compare the estimates of the unrated movies with the rated ones to
correctly predict whether or not a user will like it. The many algorithms we’re about
to discuss in this chapter deal with how a proper user model is created and how it can
be used to relate this with the unrated data.
In the scenario of a movie recommender system,[4-6] what remains intact is the
fowchart, which starts from having a training data set that is used to familiarise our
function with the kind of movies the user likes. The number of movies we consider
basing our model on also contributes to its error percentage to a rather accountable
scale as the greater the data will be, the more accurate our estimation will be. For this
fact to become clear, we frst need to examine the different ways of rating the items
in the training data.
2.4.1 EXPLICIT FEEDBACK
To gather explicit feedback from the user, the device must ask customers to grant
their scores for items. After accumulating the feedback, the gadget is aware of
how applicable or comparable an object is to users’ preferences. Even though this
approves the recommender to examine the customers’ specifc opinions, because
it requires direct participation from the user, frequently, it is not effortless to col-
lect. That is why there are one-of-a-kind approaches to gather feedback from users.
Implementing a like/dislike performance into a net site offers customers the ability
to consider the content material easily. Alternatively, the device can ask customers
to insert their ratings where a discrete numeric scale represents how the consumer
liked/disliked the content. Netfix frequently asks clients to rate flms. Another way
to acquire explicit feedback is to ask customers to insert their remarks as text. While
this is a fantastic way to analyse consumer opinion, it is normally no longer handy to
acquire and evaluate.
2.4.2 IMPLICIT FEEDBACK
In contrast to the explicit feedback, there is no consumer participation required to
collect implicit feedback. The device mechanically tracks users’ preferences by way
of monitoring the carried out actions, such as which object they visited, the place
they clicked, which gadgets they purchased, or how long they stayed on a web page.
One ought to locate the right movements to track primarily based on the area that the
recommender device operates on. Another gain of implicit remarks is that it reduces
the cold start troubles that take place till an object is rated ample enough to be served
as a recommendation.
22 Recommender Systems
2.5 COMPARING AND ANALYSING
Several technical laureates came forward with different ways of improving this
basic architecture so as to improve our experience of a developed and sometimes
integrated system. We basically divide our genres into these broad classifcations
wherein we state the comparison among different techniques under these subtopics
and, therefore, state the advantages and disadvantages of each.
2.5.1 IMPROVEMENT OF THE NLP MODEL
The term frequency-inverse document frequency (TF-IDF) model has been in existence
since the time it has been discovered.[7] The bag-of-words model used to exist before
that which failed in the proper positioning of related vectors and, hence, the accuracy
of the estimation wasn’t up to the mark. On the contrary, we have articles suggest-
ing how the bag-of-words model of user tags is more suitable to a movie recommender
system than an TF-IDF model. This involves splitting the available user and movie tags
(author, writer, director, actors, cast, crew etc.) into tokens and cleaning them. Once we
have a vectorized model, we pass the processed features into certain detailed media
sources such as the ones available in Wikipedia or IMDB and then go on to create fuzz-
ing recommendations based on how many tags appear in the resource for how many
times. Alternatively, the bag-of-words representations of tags can be used together with
an unsupervised dimensionality reduction algorithm, as latent semantic analysis (LSA),
to represent movies. Another signifcant change is the use of the power of word embed-
ding, which is used for transforming a word into a vector from a vector space with a
fxed dimensionality in a way that words occurring in similar contexts are represented
by similar vectors. Other than this, data can be further enriched by scraping some tags
off commercial movie websites and the big hotshots of the media industry so that we
can then use this information as an embedding into our model to provide more relat-
able recommendations as well. As aforesaid, we can even improve this whole thing by
generating a training data set and using the methods of classifcation along with some
deep learning algorithms such as recurrent neural networks (RNNs) and long short-term
memory (LSTM) to fnally predict a list of movies the user may fnd interesting.
The downside of the previously stated approaches is that we’re still using a bag-of-
words model, which isn’t suitable for new strings and would, at some point, enlarge
the length of the vectors to a state where it’ll become unmanageable. It will also
render many 0s this way, making it into a sparse matrix that we’re trying to avoid
from the very start. Additionally, word embedding, as of what we’ve been introduced
to date, integrates all the words that have multiple meanings into a single represen-
tation, after which it’s really diffcult to make out the exact meaning of the word in
a particular sentence. For example, the word “nursery” can mean the place where
plants are harboured or the place where primary children go to study.
2.5.2 ADJUSTMENT OF WEIGHTS
A content-based recommendation system makes use of weights that are given to
the factors in accordance of their importance as per the user. We, intentionally or
23
Comparison of Content-Based Recommendation Methodologies
unintentionally, provide a lot of personalized data over the web in our daily lives,
and this is where the story of the weights begins. References have been made that
these weighted values be extracted from a linear regression obtained from our data
on social media platforms through which a similarity graph can be generated of
whether or not the user would like a particular factor. Feature weighing system make
it possible to incorporate different factors of an item and draw a similarity chart by
calculating the weight in the following fashion:
S(Oi, Oj) = ω1f(A1i, A1j) + ω2f(A2i, A2j) + ··· + ωnf(Ani, Anj)
Where:
S(Oi, Oj): similarity function
An: the factors of item in consideration
ωf(Ani, Anj): the weights of the similarity values calculated by the function f(i,j)
Hence, feature weighting is found to be really useful as it shows a considerable
improvement in the recall value and serves as a more personalized system than
a pure content-based recommender. Using this takes into account the human
behaviour of giving more importance to a particular factor than laying all their
importance on some fxed factors incorporating both practicality and machine
independence. However, if we go on assigning weights to every particular fea-
ture, the output model of our algorithm might mislead consumers to negative and
rapid conclusions. The recommendation process is more heuristic, which doesn’t
justify the item preference for some other user. This was also improved in another
research where they cited [1] the permutations and combinations technique to dou-
ble check the data to improve the recommendation list created by the tradition
feature weighting technique.
2.5.3 THE COLD START RECOMMENDATION
The algorithms that we’ve seen until now deal with a training data set that has to be
of a considerable size to make better predictions. This leads us to a major problem,
which is a cold start. Cold start [8-9] refers to the initial period of recommendation
where the machine doesn’t have much information about the user and just has a very
little set to choose from. The challenge of still giving out a trustworthy list of recom-
mendations were undertaken by many such professionals, which gave us an overview
about how machine learning and its concepts can be used in a way to make the tradi-
tional algorithm work effciently in such cases.
To avoid the cold start problem, some platforms recommend the popular movies
and videos to people after which they can choose and provide ratings to increase the
size of the training data set. But, even by using deep learning, we still cannot solve
the cold start problem for users who don’t rate many movies. Hence, a meta-learning
system was introduced to solve the problem by taking only a small data set and opti-
mising it with the help of the user search history, which will give us more personal-
ized information about the user and will help us to recommend better movies to the
new users promoting platform binding (Figure 2.2).
24 Recommender Systems
FIGURE 2.2 Diagram of the optimisation-based meta-learning algorithm.
Even though meta learning opens up a whole new world for machine learning, it comes
at its own cost, quite literally. Meta learning requires a lot of simpler instructions for its
training, thus it burns a hole in your pocket. Also, although it doesn’t require as large a
data set, it works on the historical data of a user, which is more diffcult to comprehend
and complex to mitigate. The existing model can show fast and effcient learning ability
on simple new tasks such as moving and sorting targets, but the learning ability shown
on some complex new tasks such as action cohesion is very unsatisfactory. Finally, the
current algorithms are basically learning single metaknowledge, and metaknowledge is
diverse, so the generalisation of the model may be affected to a certain extent.
2.5.4 EMOTION BASED
Till now, we have seen how we can recommend user-based choices to them through a
third person perspective. But what we failed to understand is that even though we apply
millions of algorithms to make our output as friendly as possible, we might never be
able to break into a person’s current mental state. A moody person, in this way, may
never have a proper set of movie recommendations and would thus not prefer to stick to
a particular platform. To solve this problem, researchers proposed a system based on the
emotional and mental situation of each individual, which is bound to be strikingly dif-
ferent from any other consumer on the website.[10] Hence, a graph-based movie recom-
mender system promised to integrate the user’s emotions as well as his or her emotions on
a single graph. Using Bidirectional Encoder Representations from Transformers (BERT)
as a state-of-the-art model improved the language processing and helped our system
understand the semantics of the user’s activities much more deeply than any other natural
language processing (NLP) algorithm, which proved to be much more effective than any
other conventional systems we’ve talked about. Using multiple BERTs and then passing
them all fnally through our good old inductive graph-based matrix completion (IGMC)
model, we get the fnal amalgamation function of emotions and ratings.
Other articles mean to take into considerations the product reviews as well as
the history of purchase to demonstrate an overall outlook on the user’s emotions to
25
Comparison of Content-Based Recommendation Methodologies
predict their current mood. Extracting data from Wordnet and various other psy-
chological resources and then merging them to obtain a fuzzy emotions data, we
can then introduced it to the classifcation model which will hand over the absolute
recommendations based on our emotions.
However, the drawback of this system is that they require a lot of psychological
data that are generally really personal and would thus be susceptible to copyright
issues. Even if we get a safe set of data, it’s really diffcult to pay attention to each
emotion and break it down into such a preliminary level as to comprehend it’s mean-
ing in a very high rate of accuracy.
2.5.5 CONVERSATIONAL RECOMMENDER
Last but not least, we consider the conversation factor [11-13] in our recommenda-
tion system. All our previous architectures provided us just a one-way conversation
between the user (giving ratings) and the system (maintaining recommendations);
now it was time to up the game and step into the feld of a one-to-one conversation
with the customer to dynamically refer movies at a point of time. Certain chatbots
were introduced in the market along with some robust NLP algorithms to semanti-
cally understand a person’s criteria.
As shown in Figure 2.3, the system worked on four major aspects: Recommend,
Request, Explain and Respond. The user would frst interact with an NLP model
after it requests him or her, and then the processing will be done to respond and rec-
ommend to the user solving the purpose.[14-15]
The downside of this approach was that it provided a totally dynamic and unique
output for every model, which made it complex for the researchers to analyse if it had
an appreciative rate of success. Also, there is no such current NLP project, which
can take under its responsibility and read the minds of every user in a particular way.
After all, machines can never mimic our minds fully.[6,16]
FIGURE 2.3 Simple block representation of a conversational recommender.
26 Recommender Systems
2.6 CONCLUSION AND FUTURE PERSPECTIVE
In this chapter, we discussed the various methods of content-based recommendation
systems and did a survey over several new algorithms that have recently come into
action, which provided us a clear idea about why we should or should not go for such
methods before designing our very own model. It is high time we focus on more
relatable recommendations if we want our lives to be easier. We still stick to the fact
that no machine can read a person’s mental state completely, but we can still strive
to achieve as much closeness to the human mind as possible. All of the earlier men-
tioned algorithms show a clear indication of how far we’ve reached in comprehend-
ing people’s choices, but it all depends on the purpose for which a recommendation
system has to be created.
Personally, we can understand that recommendation systems are made for an indi-
vidual rather than for a cohort; the sole purpose of mentioning emotional and conver-
sational recommendation approaches at the end of the chapter was to convey an idea
to the outside world of merging these two technical algorithms to create a hybrid one.
The emotional intelligence calculator of the former can be used to integrate vectors
in the graph of the NLP model the latter created, which then can be used to fgure out
recommendations more wisely and accurately. The main purpose of selecting these
two algorithms was that they are some of the most integrity-based models and would
thus be useful in making the matters simpler rather than more complicated.[17-18]
REFERENCES
1. Debnath, Souvik, Niloy Ganguly, and Pabitra Mitra. “Feature weighting in content
based recommendation system using social network analysis.” Proceedings of the 17th
International Conference on World Wide Web, 2008. https://doi.org/10.1145/1367497.
1367646
2. Son, Jieun, and Seoung Bum Kim. “Content-based fltering for recommendation sys-
tems using multiattribute networks.” Expert Systems with Applications 89 (2017):
404–412.
3. Alharthi, Haifa, and Diana Inkpen. “Study of linguistic features incorporated in a liter-
ary book recommender system.” Proceedings of the 34th ACM/SIGAPP Symposium on
Applied Computing, 2019. https://doi.org/10.1145/3297280.3297382
4. Pazzani, Michael J., and Daniel Billsus. “Content-based recommendation systems.” The
Adaptive Web. Springer, Berlin, Heidelberg, 2007: 325–341.
5. Son, Jieun, and Seoung Bum Kim. “Content-based fltering for recommendation sys-
tems using multiattribute networks.” Expert Systems with Applications 89 (2017):
404–412.
6. Pan, Weike, et al. “Mixed factorization for collaborative recommendation with hetero-
geneous explicit feedbacks.” Information Sciences 332 (2016): 84–93.
7. Hospedales, Timothy, et al. “Meta-learning in neural networks: A survey.” arXiv pre-
print arXiv:2004.05439 (2020).
8. Saraswat, Mala, Shampa Chakraverty, and Atreya Kala. “Analyzing emotion based
movie recommender system using fuzzy emotion features.” International Journal of
Information Technology 12.2 (2020): 467–472.
9. Lee, Hoyeop, et al. “Melu: Meta-learned user preference estimator for cold-start rec-
ommendation.” Proceedings of the 25th ACM SIGKDD International Conference on
Knowledge Discovery & Data Mining, 2019. https://doi.org/10.1145/3292500.3330859
27
Comparison of Content-Based Recommendation Methodologies
10. Dhelim, Sahraoui, et al. “A survey on personality-aware recommendation systems.”
Artifcial Intelligence Review (2021): 1–46.
11. Jannach, Dietmar, et al. “A survey on conversational recommender systems.” ACM
Computing Surveys (CSUR) 54.5 (2021): 1–36.
12. Habib, Javeria, Shuo Zhang, and Krisztian Balog. “Iai MovieBot: A conversational
movierecommendersystem.” Proceedingsofthe29thACMInternationalConferenceon
Information & Knowledge Management, 2020. https://doi.org/10.1145/3340531.3417433
13. Sun, Yueming, and Yi Zhang. “Conversational recommender system.” The 41st
International ACM Sigir Conference on Research & Development in Information
Retrieval, 2018. https://doi.org/10.1145/3209978.3210002
14. Pecune, Florian, Lucile Callebert, and Stacy Marsella. “A socially-aware conversa-
tional recommender system for personalized recipe recommendations.” Proceedings
of the 8th International Conference on Human-Agent Interaction, 2020. https://doi.
org/10.1145/3406499.3415079
15. Mori, Hayato, et al. “Dialog-based interactive movie recommendation: Comparison
of dialog strategies.” International Conference on Intelligent Information Hiding and
Multimedia Signal Processing. Springer, Cham, 2017.
16. Berbatova, Melania. “Overview on NLP techniques for content-based recommender
systems for books.” Proceedings of the Student Research Workshop Associated with
RANLP 2019, 2019. DOI: 10.26615/issn.2603-2821.2019_009
17. Gawinecki, Maciej, et al. “What makes a good movie recommendation? Feature selec-
tion for content-based fltering.” International Conference on Similarity Search and
Applications. Springer, Cham, 2021.
18. Leng, Hongkun, et al. “Finding similar movies: Dataset, tools, and methods.” 2018.
DOI: 10.24132/CSRN.2018.2802.15
Neural Network-Based
3 Collaborative Filtering for
Recommender Systems
Ananya Singh and Debajyoty Banik
CONTENTS
3.1 Introduction .................................................................................................... 30
3.1.1 Role of AI/ML in Recommender Systems......................................... 30
3.1.2 Explicit and Implicit Feedback............................................................31
3.1.3 Ensemble v/s Joint Training.................................................................31
3.2 Algorithms for Collaborative Filtering............................................................31
3.2.1 Wide & Deep Learning Algorithm .....................................................31
3.2.1.1 The Wide Component...........................................................31
3.2.1.2 The Deep Component...........................................................32
3.2.1.3 Joint Training of Wide & Deep Model.................................32
3.2.2 Neural Graph Matching-Based Collaborative Filtering ......................33
3.2.2.1 Graph Neural Networks....................................................... 34
3.2.2.2 Graph Matching-Based Collaborative Filtering .................. 34
3.2.2.3 Graph Matching....................................................................35
3.2.3 Neural Factorization Machine.............................................................35
3.2.3.1 Factorization Machines.........................................................35
3.2.3.2 Deep Neural Network.......................................................... 36
3.2.3.3 Neural Factorization Machine ............................................. 36
3.2.4 Deep Factorization Machines..............................................................37
3.2.4.1 FM Component.....................................................................37
3.2.4.2 Deep Component ................................................................. 38
3.2.5 Neural Collaborative Filtering.............................................................39
3.2.5.1 Matrix Factorization .............................................................39
3.2.5.2 Generalized Matrix Factorization (GMF) ........................... 40
3.2.5.3 Multi-Layer Perceptron (MLP)............................................ 40
3.2.5.4 Fusion of GMF and MLP..................................................... 40
3.2.6 Feature Interaction Graph Neural Network........................................ 40
3.2.6.1 Embedding Layer..................................................................41
3.2.6.2 Multi-Head Self-Attention Layer ..........................................41
3.2.6.3 Feature Interaction Graph Neural Network..........................41
3.2.6.4 Attentional Scoring Layer.....................................................42
DOI: 10.1201/9781003319122-3 29
30 Recommender Systems
3.2.7 Automatic Feature Interaction Learning.............................................42
3.2.7.1 Input Layer............................................................................43
3.2.7.2 Embedding Layer..................................................................43
3.2.7.3 Interacting Layer...................................................................43
3.2.7.4 Output Layer ........................................................................ 44
3.2.8 L0-Statistical Interaction Graph Neural Network............................... 44
3.2.8.1 L0 Edge Prediction Model.................................................... 44
3.2.8.2 Statistical Interaction Graph Neural Network ..................... 44
3.2.9 Attentional Factorization Machines ....................................................45
3.2.9.1 Pair-Wise Interaction Layer ..................................................45
3.2.9.2 Attention-Based Pooling Layer.............................................45
3.3 Dataset ............................................................................................................ 46
3.3.1 MovieLens 1M.................................................................................... 46
3.4 Results............................................................................................................. 46
3.5 Conclusion .......................................................................................................47
References................................................................................................................ 48
3.1 INTRODUCTION
Recommender systems are the emerging technologies that are used in EdTech, fash-
ion, shopping, entertainment, and marketing industries. There are different types
of recommender systems that have evolved with time: collaborative fltering-based
recommender system, demographic-based recommender system, content-based rec-
ommender system, utility-based recommender system, hybrid recommender system,
and knowledge-based recommender system; however, collaborative fltering-based
recommender system is the most extensively implemented. This chapter compares
different algorithms for collaborative fltering.
Collaborative fltering is the process in which the algorithms flter data from user
ratings to generate personalized recommendations for those with similar likes. This
system calculates recommendations based on the user’s (let’s call him/her our target
user) previous interaction with different items. It then fnds users similar to our tar-
get user and suggests the items that the similar users have interacted with and liked
based on their ratings given to those items.
3.1.1 ROLE OF AI/ML IN RECOMMENDER SYSTEMS
Artifcial intelligence (AI)/machine learning (ML) is widely used in recommenda-
tion systems because AI can interpret a set of data and fnd unique patterns that
help the system recognize what the consumer wants, and hence, it can suggest the
products/services that they are highly susceptible to purchase. To be more specifc,
recommendation systems are a set of machine learning algorithms that offer highly
relevant subjects to the users. This gives the user a sense of credibility and rap-
port with the system. This is important because user retention is highly desirable
and, hence, is a must-have for every brand. Examples are Netfix, Amazon, and even
social media platforms like Instagram. These websites use AI/ML algorithms to sug-
gest better content, product, and services.
31
Neural Network Collaborative Filtering for Recommender Systems
3.1.2 EXPLICIT AND IMPLICIT FEEDBACK
Recommender systems can be categorized into two types based on the feedback
or data they gather, explicit feedback recommender systems, and implicit feedback
recommender systems. An explicit feedback recommender system refers to the type
of recommender system that gathers information directly from the user. This type of
system is considered to be the best because the feedback comes directly from the user
and, hence, is valuable.
On the other hand, an implicit feedback recommender system refers to the type
of recommender system that gathers data or information based on the behavior of
the user. This is usually speculation and pattern-based and varies with the algorithm
used.
3.1.3 ENSEMBLE V/S JOINT TRAINING
Individual models in ensemble learning are trained independently, unaware of the
other models present, and their outputs are integrated during inference but not during
training; whereas joint training optimizes all the factors simultaneously and takes
the deep and the wide parts of the model along with the weights of their total into
consideration at the time of training. To provide appropriate clarity for ensemble
learning to operate, every single model size must be big (since training for an ensem-
ble is discontinuous).
3.2 ALGORITHMS FOR COLLABORATIVE FILTERING
In this chapter, nine algorithms are compared on the dataset MovieLens 1M. In this
section, all the algorithms are explained elaborately.
3.2.1 WIDE & DEEP LEARNING ALGORITHM
There are two components to this algorithm: a wide part and a deep part.[1] For the
job of recommendation, in this method a linear model is blended with a deep neural
network. This method was introduced by Google to recommend mobile applications
to its users.
3.2.1.1 The Wide Component
It is regarded as a generalized linear algorithm. If one takes o as the output, i.e. the
prediction, i as the input, i.e. the vector of features, p as the parameters of the model,
and b as the bias, then the formula becomes:
o = pTi + b (3.1)
Cross product transformation is defned by:
cmn c
ⲫm(i) = ∏d
i=1in mn ∈ {0,1} (3.2)
Random documents with unrelated
content Scribd suggests to you:
CHAPTER X
THE LAW IN EGYPT
Penal code in Egypt of Mohammedan origin and derived from the
Koran—The law of talion—Price of blood—Blood feuds and blood
revenge—The courbash freely used to raise taxes—Old police in
Cairo—Extensive reforms—Oppressive governors—Tyrannical
rule of Ismail Pasha—Protection and security guaranteed to the
fellaheen by British occupation—Prison reform—Tourah near
Cairo—Labour at the quarries—Profitable workshops—Assiut
prison—Life at Tourah—Attempts to escape—Convicts employed
on the communication line in the Sudan campaign—Excellent
sanitation and good hospital arrangements.
The land of the Pharaohs has ever been governed by the practices
and influenced by the traditions of the East. From the time of the
Arab conquest, Mohammedan law has generally prevailed, and the
old penal code was derived directly from the Koran. Its provisions
were most severe, but followed the dictates of common sense and
were never outrageously cruel. The law of talion was generally
enforced, a life for a life, an eye for an eye, a tooth for a tooth.
Murder entailed the punishment of death, but a fine might be paid to
the family of the deceased if they would accept it; this was only
permitted when the homicide was attended by palliating
circumstances. The price of blood varied. It might be the value of a
hundred camels; or if the culprit was the possessor of gold, a sum
equal to £500 was demanded, but if he possessed silver only, the
price asked was a sum equal to £300. The accomplices and
accessories were also liable to death. Compensation in the form of a
fine is not now permitted. A man who killed another in self-defence
or to defend his property from a depredator was exempt from
punishment. Unintentional homicide might be expiated by a fine.
The price of blood was incumbent upon the whole tribe or family to
which the murderer belonged. A woman convicted of a capital crime
was generally drowned in the Nile.
Blood-revenge was a common practice among the Egyptian people.
The victim’s relations claimed the right to kill the perpetrator, and
relationship was widely extended, for the blood guiltiness included
the homicide, his father, grandfather, great-grandfather and great-
great-grandfather, and all these were liable to retaliation from any of
the relatives of the deceased, who in times past, killed with their
own hands rather than appeal to the government, and often did so
with disgusting cruelty, even mangling and insulting the corpse.
Animosity frequently survived even after retaliation had been
accomplished, and blood-revenge sometimes subsisted between
neighbouring villages for several years and through many
generations. Revengeful mutilation was allowed by the law in varying
degrees. Cutting off the nose was equivalent to the whole price of
blood, or of any two members,—two arms, two hands, or two legs;
the removal of one was valued at half the price of blood. The fine of
a man for maiming or wounding a woman was just half of that
inflicted for injuring a man, if free; if a slave the fine was fixed
according to the commercial value of the slave. The whole price of
blood was demanded if the victim had been deprived of any of his
five senses or when he had been grievously wounded or disfigured
for life.
The Koran prescribed that for a first offence of theft the thief’s right
hand should be cut off, and for a second, his left foot; for a third,
the left hand; and for a fourth, the right foot. Further offences of
this kind were punished by flogging, or beating with the courbash—a
whip of hippopotamus hide hammered into a cylindrical form—or a
stick upon the soles of the feet. The bastinado, in fact, was the
familiar punishment of the East. Religious offences, such as apostacy
and blasphemy, were very rigorously punished. In Cairo a person
accused of thefts, assaults and so forth used to be carried by a
soldier before the kadi, or chief magistrate of the metropolitan
police, and sent on trial before a court of judicature, or if he denied
his offence, or the evidence seemed insufficient for conviction,
although good grounds for suspicion existed, he was bastinadoed to
extort confession. He generally admitted his guilt with the common
formula in the case of theft, “the devil seduced me and I took it.”
The penalties inflicted less than death included hard labour on the
public works, digging canals and the removal of rubbish or
compulsory military service.
The modern traveller in Egypt will bear witness to the admirable
police system introduced under British rule, and to the security
afforded to life and property in town and country by a well
organised, well conducted force. In former days, under the Pashas,
the whole administration of justice was corrupt from the judge in his
court to the police armed with arbitrary powers of oppression. The
chief of police in Cairo was charged with the apprehension of thieves
and criminals and with his myrmidons made constant rounds nightly
through the city. He was accompanied by the public executioner and
a torch-bearer who carried a curious light that burned without flame
unless waved through the air, when it burst suddenly forth; the
burning end was sometimes hidden in a small pot or jar and when
exposed served the purpose of a dark lantern. The smell of the
burning torch often gave timely warning to thieves to make off. The
chief of the police arrogated to himself arbitrary powers, and often
put a criminal to death when caught, even for offences not
deserving capital punishment. A curious custom obtained in old
Cairo; it was the rule for the community of thieves to be controlled
by and to obey one of their number, who was constituted their sheik
and who was required by the authorities to hunt up offenders and
surrender them to justice.
In old times the administration of the country districts was in the
hands of governors appointed by the Pasha and charged by him with
the collection of taxes and the regulation of the corvee, or system of
enforced or unremunerated labour, at one time the universal rule in
Egypt. The prompt and excessive use of the stick or courbash was
the stimulus by which the contributions demanded were extorted,
and the sheik, or headman of a village, might be severely
bastinadoed when the sum demanded ran short. Everything was
taxed, particularly the land and its products, wholly or in part, or
they were sometimes seized outright and sold at a fixed price, but
impounded to make good the debts of the cultivators to the
government. Taxes were also levied in kind,—butter, honey, wax,
wood, baskets of palm leaves and grain. The government granaries
were kept full by the last named exaction and in this regard an
amazing story is told.
The governor of the district and town of Tanta, when visiting the
granary, saw two fellaheen resting who had just deposited their tale
of corn. One had brought in 130 ardebbs (equivalent to five English
bushels) from a village at a distance, the other only 60 ardebbs from
some land adjoining the town. The governor at once fell foul of the
defaulter, and utterly ignoring the townsman’s protest that his was a
daily and the countryman’s a weekly contribution, ordered the man
of Tanta to be forthwith hanged. The next day the governor paid a
second visit to the granary and saw a peasant delivering a large
quantity of corn. Being much pleased, he inquired who the man was
and heard that it was he who had been summarily executed the day
before and who now produced 160 ardebbs of grain. “What, has he
risen from the dead?” cried the governor, astounded. “No, Sir; I
hanged him so that his toes touched the ground; and when you
were gone, I untied the rope; you did not order me to kill him,”
replied his subordinate. “Aha,” answered the governor, “hanging and
killing are different things. Next time I will say kill.”
“To relate all the oppressions which the peasantry of Egypt endure,”
says Mr. E. W. Lane, the authority for the foregoing, “from the
dishonesty of the officials would require too much space in the
present work. It would be scarcely possible for them to suffer more
and live.” Yet a worse time was approaching, when the notorious
Ismail Pasha became practically supreme ruler and used his
unchecked power for the complete enslavement of Egypt. His
methods of misgovernment, his robbery, spoliation and cruel
oppression are now matters of history. This modern Sardanapalus,
as he has been aptly styled, lavishly wasted the wealth he wrung out
of his helpless subjects by the intolerable rapacity of his ferocious
tax gatherers. The fellaheen were stripped to the skin to fill his
coffers and feed the boundless extravagance of a vain and licentious
prince. His private property was enormous; his estates and factories
were valued at sixty millions sterling; he owned forty-three palaces
and was building more when, in a few short years, he had brought
Egypt to the brink of ruin, and the people starved at his door.
The people of Egypt not only paid taxes, but their possessions were
seized ruthlessly, their lands misappropriated, their cattle and goods
confiscated; they were mere slaves whose right to work on their
own account was forfeited; and the whole population was driven
forth from their villages with whips, hundreds of thousands of men,
women and children, under the iniquitous system of enforced labour,
to make roads through the Khedive’s estates, till the cotton fields
and build embankments to control the distribution of the life-giving
Nile. No escape from these hardships was possible, no relief from
this most grievous Egyptian bondage. The arbitrary despot backed
his demands by a savage system of punishments, and when the
courbash was ineffectual, he banished malcontents to the remote
provinces of central Africa, where, after a terrible journey, they
expiated their offences at Fazoglo or Fashoda. Sometimes the
highest officials were arrested and despatched in chains, without any
form of trial, and were detained for years in this tropical Siberia. To
speak of the Nemesis that eventually overtook Ismail and deprived
him with ignominy of a power he so shamefully misused is beyond
the scope of this work. But reference must be made in some detail
to the many merciful changes introduced into the administration of
justice under the British protectorate that has succeeded to Egyptian
rule.
In Egypt, at the present time, every son of the soil is safe from
arbitrary and illegal arrest; the imposition of taxes is regulated
strictly according to law; there is no enforced labour,—the corvee
has been absolutely swept out of existence. Every peaceably
disposed citizen may live sheltered and protected from outrage and
in the undisturbed enjoyment of his possessions, waxing rich by his
own exertion, safe from the attack or interference of evil-doers. It
was not always so, and the great boons of personal security and
humane, equitable treatment now guaranteed to every soul in the
land have been only slowly acquired. Until 1844 the Egyptian police
was ineffective, the law was often a dead letter, and the prisons
were a disgrace to humanity and civilisation. Before that date the
country was covered with zaptiehs, or small district prisons, in which
illegal punishment and every form of cruelty were constantly
practised. It was quite easy for anyone in authority to consign a
fellah to custody. One of the first of the many salutary reforms
introduced by the new prison department established under British
predominance was an exact registration of every individual received
at the prison gate, and the enforcement of the strict rule that no one
should be admitted without an order of committal duly signed by
some recognised judicial authority. To-day, of course, any such
outrage as illegal imprisonment is out of the question. Another form
of oppression in the old days was the unconscionable delay in
bringing the accused to trial. Hundreds were thus detained awaiting
gaol delivery for six or nine months, sometimes for one or two years.
At that time, too, there was no separation of classes; the innocent
were herded with the guilty, children with grown men; only the
females, as might be expected in a Mohammedan country, were kept
apart, but their number then and since has always been exceedingly
few.
The first step taken by the new régime was to concentrate prisoners
in a certain number of selected prisons, such as they were, but the
best that could be found. In these, twenty-one in number, strenuous
efforts were made to introduce order; cleanliness was insisted upon
and disinfectants were largely used, while medical men were
appointed at each place, who attended daily to give medicine and
move the sick into hospital. The health of the prisoners was so much
improved that they constituted one per cent. of the daily average of
prisoners, and this ratio has been maintained, so that in the cholera
epidemic in 1896 only a few convicts died.
A good prison system could only be introduced in improved prisons,
and the first created was the great convict establishment at Tourah,
a village about eight miles above Cairo on the banks of the Nile and
at the foot of the great limestone quarries that have supplied the
city with its building material from the earliest days. In 1885 the old
military hospital at Tourah was handed over to be converted into a
public works prison; a few of the wards were converted into cells,
and a draft of 250 convicts was brought from the arsenal at
Alexandria to occupy them. These proved skilful workmen, as the
fellaheen, whether captive or free, invariably are, and with the help
of a few paid stone-masons they restored the half-ruined upper story
of the ancient building and converted it into a satisfactory prison to
hold one hundred and fifty more inmates. The four hundred
steadfastly continued their labours and to such good purpose,
demolishing, removing, cleaning, and constructing new roads and
approaches, that in May, 1886, an entirely new prison for five
hundred convicts was completed and occupied. Many forms of
industry were carried on with excellent financial results, as will be
seen from the following details.
All the lime for buildings was burned in two lime kilns constructed for
the purpose; all the furniture and woodwork, the tables, beds and
doors were made by convict carpenters; all the ironwork, the bolts
and bars for safe custody, the very leg-irons, their own inalienable
livery under the old Egyptian prison code, were turned out by
convict blacksmiths; and hundreds of baskets for carrying earth and
stone have been manufactured. The industrial labour at Tourah is
now of many useful kinds. New prison clothing, new boots (although
these usually indispensable articles are only issued to a favoured few
prisoners in Egypt), the baking of bread and biscuit for home
consumption, or to be sent to out-stations, plate laying and engine
fitting, stone dressing for prison buildings, both at Tourah and
elsewhere,—all these are constantly in progress at the Tourah
prison. The money made in the prison provides funds for many
things necessary for further development, such as tram lines,
locomotives, improved tools and machinery of all kinds.
A visit to Tourah is both interesting and instructive. The chief
employment of the convicts is in the quarries, a couple of miles from
the prison, to which the gangs proceed every morning at daylight
and where they remain every day of the week but Friday, which is
their Sabbath, until four o’clock in the afternoon. There is no time
wasted in marching to and fro. The dinner, or midday meal, is
carried out to the quarries by the cooks, and after it is eaten the
convicts are allowed an hour’s rest in such shade as can be found in
the nearly blinding heat of the dazzling white quarries. As this
midday siesta is the common hour for trains to pass on to the
neighbouring health resort of Helouan, casual observers might think
that rest and refreshment formed a great part of the Egyptian
convict’s daily life. But that would be a grievous mistake. During the
hours of labour, ceaseless activity is the rule; all around the picks
resound upon the unyielding stone; some are busy with the levers
raising huge blocks, stimulated by the sing-song, monotonous chant,
without which Arabs, like sailors, cannot work with any effect. The
burden of the song varies, but it is generally an appeal for divine or
heavenly assistance, “Allahiteek!” “May God give it,” the phrase used
by the initiated to silence the otherwise too importunate beggar, or
“Halimenu,” “Hali Elisa,” ending in an abrupt “Hah!” or “Hop!” at the
moment of supreme effort.
A visitor of kindly disposition is not debarred from encouraging effort
by the gift of a few cigarettes to the convicts. Tobacco is not
forbidden in the prisons of Egypt. It is issued to convicts in the
works prisons in small rations as a reward, according to the
governor’s judgment. The unconvicted and civil prisoners undergoing
merely detention are at liberty to purchase it. I was the witness, the
cause indeed, of a curious and unwonted scene in the small prison
at Assiut when I inspected it in 1898. The sale of tobacco was in
progress in the prison yard, where all of the prisoners, a hundred
and more, were at exercise. An official stood behind a small table on
which lay the little screws of tobacco for disposal, each for a few
milliems, the smallest of Egyptian coins, the fractional part of a
farthing. The eagerness with which the poor prisoners eyed the
precious weed excited my generosity, and I bought up the whole
table load, then and there, for a couple of shillings. The prisoners
crowding around saw the deal and understood it. Hardly had I put
down the ten piastres when the whole body “rushed” the table,
overset it, threw the screws of tobacco upon the ground, and all
hands pounced down on the scattered weed in one great struggling,
scrambling, combatant medley. The tobacco was quite wasted, of
course, and I have no idea who got the money. The mêlée was so
unmanageable that it was necessary to call out the guard to drive
the prisoners back to their wards. I was aghast at my indiscretion
and ready to admit that I should have known better.
The daily unremitting toil of Tourah must be preferable to all but the
incurably idle. Yet the terror of “Tourah” is now universal up and
down Egypt. It is the great “bogey” of the daily life among the lower
classes, the threat held over the fractious child or the misconducted
donkey boy who claims an exorbitant “bakshish.” To accuse any
decent fellah of having been in Tourah is the worst sort of insult and
at once indignantly denied. When my own connection with the
English prisons became known, I was generally called the pasha of
the English Tourah, and my official position gained me very marked
respect among classes spoiled by many thousands of annual
tourists,—the greedy guides and donkey boys, the shameless
vendors of sham curiosities, the importunate beggars that infest
hotel entrances, swarm in the villages and make hideous the landing
stages up the Nile. An old hand will best silence a persistent cry for
alms or the wail of miski (poverty stricken), of “Halas! finish father,
finish mother” (the ornate expression for an orphan), by talking of
the caracol, “police station,” and a promise of “Tourah” to follow.
Life in Tourah must be hard. The monotonous routine from daylight
to sundown, the long nights of thirteen or fourteen hours, from early
evening to morning, caged up with forty or fifty others tainted with
every vice and crime, must be a heavy burden upon all but the
absolutely debased. The evils of association, of herding criminals
together, left to their own wicked devices, without supervision, were
present in the highest degree in Egyptian prisons. At last, however, a
move was made to provide separate cells for a certain number, and
a new prison of 1,200 cells was built by convict labour at Tourah
immediately opposite the new hospitals and at some distance from
the old prison. Much mischievous conspiracy of the worst kind is
prevented by keeping individuals apart during the idle hours of the
night, for it was then that those concerted escapes of large numbers
were planned, which have occurred more than once at Tourah, but
have been generally abortive, ending only in bloodshed; for the
black Sudanese, who form the convict guards, are expert marksmen
and surely account for a large part of the fugitives.
There must be something very tempting to the untutored mind—and
many of these Tourah convicts are half-wild creatures, Bedouins of
the desert or the lowest scum of the cities—in the seeming freedom
of their condition during so many hours of the day. Liberty seems
within easy reach. Not a mile from the quarries are great
overhanging cliffs, honey-combed with caves, deep, cavernous
recesses affording secure hiding places, and it is for these that the
rush is made. In August of 1896 there was a serious attempt of this
kind, and success was achieved by some of the runaways. The hour
chosen was that of the break-off from labour, when the gangs,
surrounded by their guards, converge on a central point, very much
as may be seen on any working-day at Portland or Dartmoor, and
thence march home in one compact body to the distant prison. It is
a curiously picturesque scene. The convicts, mostly fine, stalwart
men, their ragged, dirty white robes flying in the wind and their
chains rattling, swing past, two by two, in an almost endless
procession. Below, the mighty river, flowing between its belt of palm
and narrow fringe of green, shines like burnished silver under the
declining sun; beyond stretches the wide desert to the foot of the
Pyramids, those of Sakhara at one end of the landscape, those of
Cheops at the other,—colossal monuments of enforced labour very
similar to that now surviving at Tourah.
Such was the moment chosen for a general stampede. About sixty or
seventy convicts agreed to cut and run simultaneously, all toward
the shelter of the hills. A few were told off to try conclusions with
the armed guards, to wrest away the rifles and thus secure both
immunity from fire and the power to use the weapon in self-defence.
The attempt appears to have been fairly successful at first. A few
rifles were seized, and the fugitives, turning on their pursuers, made
some pretty practice, during which a few of the more fortunate got
away. But authority finally asserted itself. Many were shot down; the
rest were overtaken and immediately surrendered. The absence of
“grit,” so characteristic of the race, showed itself at once, and these
poor wretches, who had been bold enough to make the first rush
under a hail of bullets, now squatted down and with uplifted hands
implored for mercy or declared it was all a mistake. “Malesh, it does
not matter,” was their cry then. But they no doubt found that it
mattered a great deal when a few days later Nemesis overtook them
in the shape of corporal punishment; for the lash, a cat of six tails, is
used in the Egyptian prisons as a last resort in the maintenance of
discipline and good order. It is only inflicted, however, under proper
safeguards and by direct sentence of a high official. There is no
courbash now in the prisons, and no warder or guard is permitted to
raise his hand against a prisoner. Tyranny and ill-usage are strictly
forbidden.
Escapes have happened at other places. When military operations
were in progress on the frontier leading to the revindication of the
Sudan, an immense amount of good work was done by large
detachments of convicts at stations high up the river. There were
rough and ready “Tourahs” at Assuan, Wady Halfa, Korosko, Suakin,
El Teb, points of considerable importance in the service of the
campaign, where supplies were constantly being landed, stored or
sent forward to the front. The Egyptian prison authorities very wisely
and intelligently utilised the labour at their disposal to assist in
unloading boats and in reshipping stores and railway plant. Numbers
of convicts were employed to construct the railway ahead in the
direction of Abu Hamed by which the advance was presently made.
The Nile above Merawi flows through the most difficult country in its
whole course, the very “worst water,” and no navigation in that
length was possible by steamers, little or none by small boats except
at high Nile and then only by haulage. It was necessary, therefore,
to complete the railway to Abu Hamed, so that gunboats might be
sent up in sections over the line, to be put together above the
cataracts and then utilised in the final advance, for the river is more
or less open to Berber and on to Khartum, and the success of the
campaign was greatly facilitated thereby.
Egyptian convicts did much good work of a superior kind. Now and
again a trained handicraftsman was found who was willing to put
forward his best skill and there was always a smart man ready to act
as leader and foreman of the rest, as is very much the case, indeed,
with convicts all over the world. One man in particular at Wady Halfa
was well known as a most industrious and intelligent worker. He so
gained the good-will of the British officers that, not knowing his
antecedents, many of them strongly recommended him for release
as a reward for his usefulness. But the prison authorities were
unable to accede to this seemingly very justifiable request. This best
of prisoners (again following experience elsewhere) was the worst of
criminals. He had committed no fewer than eight murders, possibly
not with malicious motives, or he would hardly have escaped the
gallows. The death penalty is not, however, inflicted very frequently
in Egypt. In one case worth mentioning as illustrating the almost
comical side of Egyptian justice, a man sentenced to death was held
to serve a short term of imprisonment for some minor offence before
he was considered ripe for execution. When the short sentence was
completed, he was incontinently hanged.
At Assuan during war time hundreds of convicts were engaged all
day long under the windows of the hotel. Their rattling chains were
heard soon after dawn mixed with their unmelodious sing-song as
described above. They could be seen constantly and freely
approached, as they clustered around the great crane that raised the
heaviest weights, locomotives, tender, and boilers, from the boats
moored below, or as they passed along in single file backward and
forward between the beach and the railway station or storehouses
near-by. All were in picturesque rags, except the military prisoners,
dressed in a startling uniform of bright orange; all wore the
inevitable leg-irons riveted on their spare, shrunken brown ankles. It
was the custom once, as in the old French bagnes, to chain the
Egyptian convicts in couples, a long-term man newly arrived being
chained with one whose sentence had nearly expired.
This practice has now been discontinued, and each unfortunate
bears his burden alone. Much ingenuity is exercised to prevent the
basils or anklets from chafing the skin. The most effective method,
employed no doubt by the most affluent, was a leather pad inserted
within the iron ring; others without resources, owning not a single
milliem in the world, used any filthy rags or scraps of sacking they
could beg or steal. Pads of this kind have been worn from time
immemorial by all prisoners and captives; no doubt the galley slaves
chained to the oar in classical days invented them, and they were
known until quite lately in the French bagnes of Rochefort and
Toulon by the name of patarasses, which the old hands
manufactured and sold to the newcomers. Another old-fashioned
device among the Egyptian convicts is the short hook hanging from
a waistband, which catches up one link of the irons, a simple
necessity where the chain is of such length that it drags
inconveniently along the ground.
The general use of fetters is not now approved by civilised nations.
But in Egypt they appear to be nearly indispensable for safe custody.
The removal of the leg-irons from convicts has often encouraged
them to effect escape. Once sixteen of them at Assuan were astute
enough to sham illness. It was during the cholera epidemic, and
they knew enough of the symptoms to counterfeit some of them
cleverly. The medical officer in charge was compassionate and
thought it cruel that his patients should die in their chains, so he had
them struck off. Within a few hours the unshackled convicts gave
their guardians leg-bail, and escaped from the hospital into the
desert, and so down the river. These very men afterward formed the
nucleus of the band of harami, the robbers and brigands who
terrorised the lower province for some months and were only
disposed of at last by summary action. The story of the subsequent
burning of the brigands at Belianah became public property and was
made the occasion of one of those virulent attacks upon British rule
that often found voice under the unrestrained license of the Egyptian
press. These out-laws were pursued and overtaken at last by the
police in a house where they had barricaded themselves. It was
impossible to break in, and the assailants therefore set fire to the
thatched roof. The robbers used this as their private arsenal, and the
fire soon ignited their cartridges with a terrific explosion in which
most of the defenders lost their lives. This practice of concealing
explosives in the roof was not uncommon during the days of conflict
with the Mahdi. When the sheik of Derowi was arrested on a charge
of conveying contraband ammunition into the Sudan, he contrived to
send back a message to his wife to make away with all damaging
evidence. She thought the safest way to dispose of the gunpowder
stored in the house was by fire and at the same time she also
disposed, very effectually, of herself.
A striking feature at Tourah was the admirable prison hospital, which
would compare favourably with the best in the world. It is a two-
storied building with lofty, well-ventilated wards, beds and bedding,
all in the most approved style; a well-stocked dispensary and a fully
qualified medical man in daily attendance. The patients, unless too ill
to rise, sit up on their beds rather like poultry roosting, and suffer
from most of the ills to which humanity is heir. The complaints most
prevalent are eczema, tuberculosis (the great scourge of the black
prisoners from the south), ophthalmia, and dysentery. “Stone” is a
malady very prevalent and showing itself in the most aggravated
form, due no doubt to the constant drinking of lime-affected water. I
saw calculi of almost colossal size, the result of some recent
operations, extracted by the prison surgeons, whose skill is evidently
remarkable.
Too much praise can hardly be accorded the Egyptian prison
administration for its prompt and effective treatment of the cholera
epidemic when it appeared in Egypt in 1896. Although the mortality
was serious in the general population, the percentage of deaths was
relatively small in the prisons. Out of a total of 7,954 prison inmates
(this number did not include the convicts at the seat of war or on
the Red Sea) there were only one hundred and sixteen cases and
seventy deaths. In six of the prisons the disease did not appear; in
others, although situated in the heart of infected towns, and
prisoners were being constantly received from infected districts, the
cases were few. In Tourah, with a total population of thirteen
hundred and fifty, there were but twenty-two; at Assiut, a new
building with good sanitation, only two; the average was largest at
Keneh, Mansourah and Assuan. Not a single female prisoner was
attacked; an immunity attributed to the fact that the females in
custody receive regular prison diet, while the males, except at
Tourah and Ghizeh, are fed, often indifferently, by their friends
outside. These excellent results were undoubtedly due to the strict
isolation of the inmates of any prison in which the cholera had
appeared. Whenever a case showed, the introduction of food or
clothing from outside was strictly forbidden, and friends were not
admitted when cholera existed in the neighbourhood. Much credit
was due also to the unselfish devotion of the Egyptian medical staff,
who were unremitting in their care and of whom two died of the
disease at their posts.
It was officially stated in 1903 that such crimes as robbery with
violence, petty thefts and brigandage had increased materially since
1899. The reason given for this was the failure of the police
machinery to bring out the truth and the practice of bribes which
was everywhere prevalent. The corruption of magistrates and the
terrorism held over witnesses make it exceedingly difficult to bring a
man to justice or obtain satisfactory convictions. But we may well
conclude that the prison system as established in Egypt to-day is of
the most modern and satisfactory character.
PRISONS OF TURKEY
CHAPTER XI
TURKISH PRISONS
Old castles used as prisons—The Castle of Europe—The Seven
Towers and the “Well of Blood”—The Seraglio and the Bagnio—
The Zaptie—Lack of prison discipline—Midhat Pasha and the
Constitution—His disgrace and death—The Young Turk
movement—Horrible massacres at Adana—The provincial
prisons all bad—Fetters and other modes of torture—Little
improvement under new sultan.
There are few notable buildings in Turkey constructed primarily as
prisons. In fact there are few buildings of any sort constructed for
that purpose. But every palace had, and one may almost say, still
has its prison chambers; and every fortress has its dungeons, the
tragedies of which are chiefly a matter of conjecture. Few were
present at the tortures, and in a country where babbling is not
always safe, witnesses were likely to be discreet.
In and around Constantinople, if walls had only tongues, strange and
gruesome stories might be told. On the Asiatic side of the Bosporus
still stand the ruins of a castle built by Bayezid I, known as “the
Thunderbolt” when the Ottoman princes were the dread of Europe.
Sigismund, King of Hungary, had been defeated, and Constantinople
was the next object of attack, though not to fall for a half century.
This castle was named “the Beautiful,” but so many prisoners died
there of torture and ill-treatment that the name “Black Tower” took
its place in common speech.
Directly opposite, on the European side of the Bosporus, is Rumili
Hissar, or the Castle of Europe, which Muhammad II, “the
Conqueror,” built in 1452 when he finally reached out to transform
the headquarters of Eastern Christendom into the centre of Islam.
The castle was built upon the site of the state prison of the
Byzantine emperors, which was destroyed to make room for it. The
three towers of the castle, and the walls thirty feet thick, still stand.
In the Tower of Oblivion which now has as an incongruous
neighbour, the Protestant institution, Robert College, is a fiendish
reminder of days hardly yet gone. A smooth walled stone chute
reaches from the interior of the tower down into the Bosporus. Into
the mouth of this the hapless victim, bound and gagged perhaps,
with weights attached to his feet, was placed. Down he shot and
bubbles marked for a few seconds the grave beneath the waters.
The Conqueror built also the Yedi Kuleh, or the “Seven Towers,” at
the edge of the old city. This imperial castle, like the Bastile or the
Tower of London, was also a state prison, though its glory and its
shame have both departed. The Janissaries who guarded this castle
used to bring thither the sultans whom they had dethroned either to
allow them to linger impotently or to cause them to lose their heads.
A cavern where torture was inflicted and the rusty machines which
tore muscles and cracked joints, may still be seen. The dungeons in
which the prisoners lay are also shown. A small open court was the
place of execution and to this day it is called the “place of heads”
while a deep chasm into which the heads were thrown is the “well of
blood.”
Several sultans, (the exact number is uncertain) and innumerable
officers of high degree have suffered the extreme penalty here. It
was here too that foreign ambassadors were always imprisoned in
former days, when Turkey declared war against the states they
represented. The last confined here was the French representative in
1798.
Another interesting survival of early days is the Seraglio, the old
palace of the sultans, and its subsidiary buildings, scattered over a
considerable area. In the court of the treasury is the Kafess, or cage,
in which the imperial children were confined from the time of
Muhammad III, lest they should aspire to the throne. Sometimes
however the brothers and sons of the reigning sultan were confined,
each in a separate pavilion on the grounds. A retinue of women,
pages and eunuchs was assigned to each but the soldiers who
guarded them were warned to be strict. The present sultan was
confined by his brother Abdul Hamid within the grounds of the Yildiz
Kiosk, where he had many liberties but was a prisoner nevertheless.
Absolutism breeds distrust of all, no matter how closely connected
by ties of blood.
An interesting prison was the old Bagnio, once the principal prison of
Constantinople. The English economist, N. W. Senior, describes it as
it was sixty years ago, in his “Journal.” It was simply an open court
at one end of which was a two-story building. Each story was
composed of one long room divided into stalls by wooden partitions,
the whole, dark, unventilated and dirty beyond description. Some
turbulent prisoners were chained in their stalls which they were not
permitted to leave.
The chief interest lay in the court-yard, however, which was the
common meeting place. No rules as to cleanliness or regularity of
hours existed. No one was compelled to work and the great majority
preferred to lounge in the sun. In the court were coffee and tobacco
shops, while sellers of sweetmeats made their way through the
crowds. Though capital punishment was nominally inflicted, it was
never imposed unless there were eye witnesses of the crime, and
seldom then. So of the eight hundred inmates of the Bagnio, six
hundred were murderers, some of them professionals. Nearly all
wore chains, some of which were heavy, and as several prisoners
were attached to one chain occasionally conflicts arose as different
members of the group exhibited divergent desires.
Another visitor about the same time saw the picturesque side. He
mentions the robbers, chiefs from Smyrna, stalking about the
enclosure, the voluble Greeks and Armenians, the secretive Jews,
and an Irishman or two, mingling with the stolid Turks. Inmates
were sipping coffee, smoking, playing cards, disputing, fighting,
while a furtive pickpocket made his rounds. In a corner a fever
patient was stretched out oblivious to his surroundings, though the
clamour sometimes was deafening. He goes on to say:
“Yet physically the wretches were not ill-treated; they need not ever
work unless they like. The court is small and so is the two-storied
stable where they sleep upon the earth; but then these are men
who perhaps never got between sheets nor lay on a bed in their
lives. They may talk what they like, and when they like. They have a
Mosque, a Greek chapel and a Roman Catholic chapel. They can
have coffee and tobacco, and if they work they are supposed to be
paid for it. There is no treadmill, no crank, there are no solitary
cells.”
The same observer describes the Zaptie or House of Detention as it
then existed, and though the building as it exists to-day is improved,
conditions are not essentially different. Then there were two
communicating courts, where pickpockets, ordinary thieves,
participants in affrays, and even murderers were confined. At night
they were locked in rooms. One of these sleeping rooms, eleven by
seventeen feet, was occupied at night by twelve men. In such places
prisoners were kept an indefinite time awaiting trial, and perhaps
then discharged without trial and without explanation.
A large number of Turkish prisoners have been confined either for
conspiracy against the government, or for daring to exhibit a certain
amount of independence. An officer apparently high in favour to-day
might be degraded on the next without warning. An interesting case
of this kind is the case of Midhat Pasha, one of the best known men
in Turkey thirty or forty years ago.
He was one of the little group of Turks who adopted European ideas
after the Crimean war. He was a friend of England as opposed to
Russia and the influence of the latter state was thrown against him.
He was one of the ministers by whom the sultan, Abdul Aziz, was
dethroned. This prince soon afterward died, possibly by suicide,
though ugly rumours were heard. When Murad, the incompetent,
was also deposed Midhat had a hand in the affair. On the accession
of Abdul Hamid he was again made Grand Vizier, and secured the
promulgation of the famous Turkish constitution of 1876, against the
will of the sultan.
When Abdul Hamid felt himself firm in his seat in 1877, he banished
Midhat, but recalled him the next year, and made him governor-
general, first of Syria and then of Smyrna. The constitution was
practically abrogated by this time. Then without warning he was
arrested in May, 1881, charged with being concerned in the murder
of Abdul Aziz. He with others was quickly tried by a special court,
was found guilty and condemned to death.
The sentence was changed to imprisonment for life, and the place of
confinement was fixed at Taïf, in Arabia, a small place south of
Mecca. There he and his companions who had received similar
sentence, including a former Sheikh-ul-Islam, Hassan Haïroullah,
were at first allowed the freedom of the castle. Their servants
bought and cooked their food, and though the rude accommodations
were somewhat trying to the old men, conditions were endurable.
A change in treatment was foreshadowed by a change in gaolers.
The privilege of buying food was taken away, and they were
expected to eat the coarse fare of the common soldier. They were
forbidden to communicate with one another. For a time the faithful
servant was refused access to Midhat’s person, though this order
was afterward revoked. Poison was discovered in the milk, and in a
pot of food. The servant was offered large sums to poison him, but
the faithful attendant only redoubled his vigilance. Finally when
hardship, separation from family and friends, and dread of the
future, seemed unable to destroy his life more primitive measures
were taken. After enduring two years of such treatment he was
strangled one morning while still in bed, together with two of his
friends. Such was the dread inspired by the sultan, that no one
dared to inquire or to make public his fate. A letter from his friend,
the Sheikh-ul-Islam, to the family of Midhat was, however, published
a few years ago and then the whole truth became known.
The case of Midhat was not exceptional, except for his prominence
in European circles. The same fate has overtaken many others.
Fishermen in the Bosporus, every now and then, pulled up a sack in
which a body was sewn, and those who reasoned might remember
that it had been announced that a one time favourite at the Court
had set out on a journey to London or Paris, though somehow he
had mysteriously failed to arrive.
But though Midhat Pasha and others who struggled to introduce
Western institutions into the borders of the East died their work
lived. One by one, those suspected of having advanced ideas were
degraded. A man might be Grand Vizier for a month or a week, or
even for a day, and then without warning, be dismissed in disgrace.
The suspicious sultan trusted no one. He set brother to watch
brother, father to spy upon son, and then believed none of them,
though he always guarded himself lest they might be telling the
truth.
Paris received the larger number of those who fled from the clutches
of Abdul the Damned. In the life of the French capital, some gave
themselves up to the manifold dissipations which that city offers for
her visitors. Others loosely organised, worked and watched for that
better day, when the Turk should no longer be a byword among
civilised peoples. A newspaper edited by Ahmed Riza was published
and thousands of copies were smuggled into the dominions.
Hundreds of thousands of pamphlets somehow passed the Turkish
frontiers and found readers, though their possession if discovered
meant imprisonment and degradation, but the “Young Turks” were
undismayed.
Into the harems the new ideas crept. One read to the others during
the long days, and the forbidden books passed from hand to hand,
and from house to house. Women high in rank, the daughters of
court officials, carried messages. Where a man seemed
approachable on that side, some member of his harem was
converted, or else some woman was placed in his way, even sold to
him, perhaps. Dozens of women sold into the harems of prominent
men went as apostles of the new faith. Women deliberately
sacrificed their reputations, since free association with men, unless
supposedly lovers, would have aroused suspicion.
The army became infected, the officers first. During 1907, the third
army corps in Macedonia became thoroughly permeated. Of course
the cruel autocrat knew something of all this, for his spies were
everywhere, but he misjudged the extent. He had seen
dissatisfaction and unrest before, and he had crushed them by
sudden blows. Perhaps he was tired, and less acute than he had
been twenty years before. At any rate he waited too long before
taking vigorous action.
Early in 1908 he ordered the higher officers of the army to quiet the
unrest. A beloved officer raised the standard of revolt in Macedonia,
and the soldiers refused to fire upon the rebels. The Committee of
Union and Progress, as the “Young Turk” movement was called,
assumed charge of the revolt and demanded the restoration of the
constitution, which the sultan refused. Agents were sent to enforce
his commands, but they were forced to flee for their lives, and
officers not in sympathy with the movement were threatened.
Thoroughly alarmed by the defection of the army, the cowardly
sultan pretended to yield and on July 24, 1908, the constitution was
restored.
Too much perhaps was expected of the Parliament. The fanatical
Moslem leaders spread rumours of every sort, and the sultan’s
agents were everywhere active, distilling doubt and suspicion into
the soldiers and populace. In April, 1909, the garrison at
Constantinople rose, dispersed the Parliament, and the wily sultan
seemed again in control. The army in Macedonia was still loyal to the
new ideas, and was promptly mobilised. Within ten days
Constantinople was again in control of the Young Turks.
Abdul Hamid was evidently not to be trusted. The die was cast. His
deposition was voted by the reassembled Parliament, and his brother
who had long been a prisoner was placed on the throne, though the
Young Turks, warned by their mishap, kept an effective veto on
reaction in the form of the army.
But the wily Abdul not only plotted to gain back his authority in
Europe, but his agents fanned the flames of religious and racial
hatred in Asia Minor. The Armenians were once a great nation, and
though they have long been ground beneath the heel of the
oppressor, they still cherish the idea that another great Christian
nation will arise in Asia. They saw hope in the new régime and
began to speak more freely, to exhibit pictures of their old kings, and
to buy arms.
The fierce Turks, Kurds, Arabs and Circassians looked upon the
presumption of the “Christian dogs” with rage. Meanwhile agents of
the Mohammedan League were everywhere stirring passion to fever
heat, and on Tuesday, April 13, 1909, the conflict began in Adana,
though not until the next day was the fighting general. For three
days the contest raged, when soldiers appeared and a semblance of
order was restored. Similar scenes had taken place in Osmanieh,
Hamedieh, while at Tarsus the Armenians stood like sheep to be
slain.
On Sunday, April 25th, the slaughter again broke out at Adana. This
time it was a massacre pure and simple, for the few Armenians who
owned weapons had either fled, or else were almost without
ammunition. Men, women, children were indiscriminately killed,
houses were robbed and burned, until hardly a Christian home was
left standing. Over the whole country fire and sword made a waste
of what had been the home of a prosperous population. How many
were killed can only be estimated. Some say thirty thousand. No
estimate is less than half that number.
An investigation was set on foot by Parliament after the instigator of
the massacre had been sent with eight of his wives to live a prisoner
at Salonica. The commission reported that it had hanged fifteen
persons—fifteen persons for slaying fifteen thousand.
Though much reduced during later years, the Turkish empire still
stretches over three continents and the islands of the sea. Though
penal conditions around Constantinople are bad, where diverse races
and religions, far away from central control, must live together,
trouble constantly exists. The Turk has always been weak in
administration, and it is in these provincial prisons that the chief
horrors are seen.
For administrative purposes Turkey is divided into vilayets, which are
subdivided into sanjaks or livas, and these into kazas. Each division
has its prison. That of the last named corresponds roughly to the
county gaol of the United States. In it accused persons awaiting trial
and prisoners sentenced to short terms are confined. Graver crimes
are punished by confinement in the prison of the sanjak or the
vilayet. For special crimes and for certain kinds of political offences
prisoners may be sent to Rhodes, Sinope, Tripoli and other similar
points where old castles are usually the prisons.
There is no common form of prison. Generally they are old ugly
buildings, though in a few larger towns new and elegant structures
have taken their place. In only one particular are they alike—they
are all dirty, and are generally damp and unhealthful, because of
slovenly attention and overcrowding. The prisons are usually in
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

Recommender Systems A Multidisciplinary Approach Monideepa Roy Pushpendu Kar Sujoy Datta

  • 1.
    Recommender Systems AMultidisciplinary Approach Monideepa Roy Pushpendu Kar Sujoy Datta download https://ebookbell.com/product/recommender-systems-a- multidisciplinary-approach-monideepa-roy-pushpendu-kar-sujoy- datta-49581660 Explore and download more ebooks at ebookbell.com
  • 2.
    Here are somerecommended products that we believe you will be interested in. You can click the link to download. Recommender Systems A Multidisciplinary Approach Monideepa Roy https://ebookbell.com/product/recommender-systems-a-multidisciplinary- approach-monideepa-roy-49587054 Handson Machine Learning Recommender Systems With Apache Spark Build A Real Artificial Intelligence Solution With Real Data Ernesto Lee https://ebookbell.com/product/handson-machine-learning-recommender- systems-with-apache-spark-build-a-real-artificial-intelligence- solution-with-real-data-ernesto-lee-36893922 Multimedia Services In Intelligent Environments Advances In Recommender Systems 1st Edition George A Tsihrintzis https://ebookbell.com/product/multimedia-services-in-intelligent- environments-advances-in-recommender-systems-1st-edition-george-a- tsihrintzis-4230656 Machine Learning Paradigms Applications In Recommender Systems 1st Edition Aristomenis S Lampropoulos https://ebookbell.com/product/machine-learning-paradigms-applications- in-recommender-systems-1st-edition-aristomenis-s-lampropoulos-5141576
  • 3.
    Smartparticipation A FuzzybasedRecommender System For Political Communitybuilding 1st Edition Luis Fernando Tern Tamayo Auth https://ebookbell.com/product/smartparticipation-a-fuzzybased- recommender-system-for-political-communitybuilding-1st-edition-luis- fernando-tern-tamayo-auth-4930912 Citizen Privacy Framework Case Of A Fuzzybased Recommender System For Political Participation Aigul Kaskina https://ebookbell.com/product/citizen-privacy-framework-case-of-a- fuzzybased-recommender-system-for-political-participation-aigul- kaskina-46171034 Recommender System With Machine Learning And Artificial Intelligence Practical Tools And Applications In Medical Agricultural And Other Industries 1st Edition Sachi Nandan Mohanty Editor https://ebookbell.com/product/recommender-system-with-machine- learning-and-artificial-intelligence-practical-tools-and-applications- in-medical-agricultural-and-other-industries-1st-edition-sachi-nandan- mohanty-editor-11290510 Recommender Systems In Fashion And Retail Proceedings Of The Fourth Workshop At The Recommender Systems Conference 2022 Humberto Jess Corona Pampn https://ebookbell.com/product/recommender-systems-in-fashion-and- retail-proceedings-of-the-fourth-workshop-at-the-recommender-systems- conference-2022-humberto-jess-corona-pampn-49415878 Recommender Systems Legal And Ethical Issues 1st Edition Sergio Genovesi https://ebookbell.com/product/recommender-systems-legal-and-ethical- issues-1st-edition-sergio-genovesi-51259018
  • 6.
    Recommender Systems Recommender Systems:A Multi-Disciplinary Approach presents a multi-disciplinary approach for the development of recommender systems. It explains different types of pertinent algorithms with their comparative analysis and their role for different applications. This book explains the big data behind recommender systems, the marketing benefts, how to make good decision support systems, the role of machine learning and artifcial networks, and the statistical models with two case studies. It shows how to design attack resistant and trust-centric recommender systems for applications dealing with sensitive data. Features of this book: • Identifes and describes recommender systems for practical uses • Describes how to design, train, and evaluate a recommendation algorithm • Explains migration from a recommendation model to a live system with users • Describes utilization of the data collected from a recommender system to understand the user preferences • Addresses the security aspects and ways to deal with possible attacks to build a robust system This book is aimed at researchers and graduate students in computer science, electronics and communication engineering, mathematical science, and data science.
  • 7.
    Intelligent Systems Series Editor:Prasant Kumar Pattnaik This series provides a medium for publishing the results of recent research into the applications, tools and techniques of Intelligent Systems, including a wide range of relevant topics. The audience for the book series consists of advanced level students, researchers, and industry professionals working at the forefront of their felds. It will present books focused on the development of advanced intelligent environments, Generic Intelligent Tools, Techniques and Algorithms, applications using Intelligent Techniques, Multi Criteria Decision Making, Management, international business, fnance, accounting, marketing, healthcare, military applications, production, net- works, traffc management, crisis response, human interfaces, Brain Computing Interface; healthcare; and education and learning. Interoperability in IoT for Smart Systems Edited by Monideepa Roy, Pushpendu Kar, and Sujoy Datta Recommender Systems A Multi-Disciplinary Approach Edited by Monideepa Roy, Pushpendu Kar, and Sujoy Datta For more information about this series, please visit: www.routledge.com/Intelligent- Systems/book-series/IS
  • 8.
    Recommender Systems A Multi-DisciplinaryApproach Edited by Monideepa Roy, Pushpendu Kar, and Sujoy Datta
  • 9.
    Designed cover image:© Shutterstock First edition published 2023 by CRC Press 6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742 and by CRC Press 4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN CRC Press is an imprint of Taylor & Francis Group, LLC © 2023 selection and editorial matter, Monideepa Roy, Pushpendu Kar, and Sujoy Datta; individual chapters, the contributors Reasonable efforts have been made to publish reliable data and information, but the authors and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microflming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, access www. copyright.com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are not available on CCC please contact [email protected] Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for identifcation and explanation without intent to infringe. ISBN: 978-1-032-33321-2 (hbk) ISBN: 978-1-032-33322-9 (pbk) ISBN: 978-1-003-31912-2 (ebk) DOI: 10.1201/9781003319122 Typeset in Times by Apex CoVantage, LLC
  • 10.
    v Contents About the Editors.....................................................................................................vii Listof Contributors...................................................................................................ix Foreword ...................................................................................................................xi Maharaj Mukherjee Preface......................................................................................................................xv Chapter 1 Comparison of Different Machine Learning Algorithms to Classify Whether or Not a Tweet Is about a Natural Disaster: A Simulation-Based Approach.............................................................1 Subrata Dutta, Manish Kumar, Arindam Giri, Ravi Bhushan Thakur, Sarmistha Neogy, and Keshav Dahal Chapter 2 An End-to-End Comparison among Contemporary Content-Based Recommendation Methodologies .............................. 17 Debajyoty Banik and Mansheel Agarwal Chapter 3 Neural Network-Based Collaborative Filtering for Recommender Systems ......................................................................29 Ananya Singh and Debajyoty Banik Chapter 4 Recommendation System and Big Data: Its Types and Applications................................................................................. 51 Shweta Mongia, Tapas Kumar, and Supreet Kaur Chapter 5 The Role of Machine Learning/AI in Recommender Systems.............. 69 N R Saturday, K T Igulu, T P Singh, and F E Onuodu Chapter 6 A Recommender System Based on TensorFlow Framework............. 81 Hukam Singh Rana and T P Singh Chapter 7 A Marketing Approach to Recommender Systems.......................... 105 K T Igulu, T P Singh, F E Onuodu, and N S Agbeb
  • 11.
    vi Contents Chapter 8Applied Statistical Analysis in Recommendation Systems.................121 Bikram Pratim Bhuyan and T P Singh Chapter 9 An IoT-Enabled Innovative Smart Parking Recommender Approach .......................................................................................... 137 Ajanta Das and Soumya Sankar Basu Chapter 10 Classifcation of Road Segments in Intelligent Traffc Management System ........................................................................ 155 Md Ashifuddin Mondal and Zeenat Rehena Chapter 11 Facial Gestures-Based Recommender System for Evaluating Online Classes.................................................................................. 173 Anjali Agarwal and Ajanta Das Chapter 12 Application of Swarm Intelligence in Recommender Systems..............191 Shriya Singh, Monideepa Roy, Sujoy Datta, and Pushpendu Kar Chapter 13 Application of Machine-Learning Techniques in the Development of Neighbourhood-Based Robust Recommender Systems ....................................................................203 Swarup Chattopadhyay, Anjan Chowdhury, and Kuntal Ghosh Chapter 14 Recommendation Systems for Choosing Online Learning Resources: A Hands-On Approach..................................................235 Arkajit Saha, Shreya Dey, Monideepa Roy, Sujoy Datta, and Pushpendu Kar Index ......................................................................................................................259
  • 12.
    vii About the Editors Dr.Monideepa Roy did her bachelors and masters in mathematics from IIT Kharagpur and her PhD in CSE from Jadavpur University. For the last 11 years, she is working as an associate professor at KIIT Deemed University, Bhubaneswar. Her areas of interest include remote healthcare, mobile computing, cognitive WSNs, remote sensing, recommender systems, sparse approximations, and artifcial neural networks. At present she has seven research scholars working with her in these areas and two more have successfully defended their theses under her guidance. She has several publications in reputed conferences and journals. She has been the organiz- ing chair of the frst two editions of the International Conference on Computational Intelligence and Networks CINE 2015 and 2016 and ICMC 2019, and she has organ- ised several workshops and seminars. She also has several book chapter publications in various reputed publication houses as well as an edited book under Taylor and Francis. She has also been an invited speaker for several workshops and conferences in machine learning and recommendation systems. She is also a reviewer for several international journals and conferences. Dr. Pushpendu Kar is currently working as an Assistant Professor in the School of Computer Science, University of Nottingham (China campus). Before this, he was a Postdoctoral Research Fellow at the Norwegian University of Science and Technology, the National University of Singapore, and Nanyang Technological University. He also worked in different engineering colleges as a lecturer and in the IT industry as a software professional. He has more than 12 years of teaching and research experience as well as one and a half years of industrial experience at IBM. He has completed his Ph.D. from the Indian Institute of Technology Kharagpur, Master of Engineering (M.E) from Jadavpur University, and Bachelor of Technology (B.Tech) from the University of Kalyani in Computer Science and Engineering. He was awarded the prestigious Erasmus Mundus Postdoctoral Fellowship from the European Commission, the ERCIM Alain Bensoussan Fellowship from the European Union, and SERB OPD Fellowship from the Dept. of Science and Technology, Government of India. He has received the 2020 IEEE Systems Journal Best Paper Award. He has received four research grants for conducting research-based projects, three of them as a Principal Investigator (PI). He also received many travel grants to attend conferences and doctoral colloquiums. He is the author of more than 50 schol- arly research papers, which have been published in reputed journals and conferences, and in IT magazines. He has also published two edited books. He is also an inventor of fve patents. He has participated in several conference committees, worked as a team member to organize short-term courses, and delivered a few invited talks as well as Keynote Lectures at international conferences and institutions. He is a Senior Member of IEEE and a Fellow of the Higher Education Academy (FHEA), UK. He has been recognized as a High-Level Talent by Ningbo Municipal Government, China. Dr. Kar mainly teaches Computer Networks and programming-related modules and
  • 13.
    viii About theEditors his research areas include Wireless Sensor Networks, Internet of Things, Content- Centric Networking, Machine Learning, and Blockchain. Sujoy Datta has done his MTech from IIT Kharagpur. For the last 11 years, he has been working as an Assistant Professor in the School of Computer Engineering, at KIIT Deemed University. His areas of research include wireless networks, computer security, elliptic curve cryptography, neural networks, remote healthcare, and rec- ommender systems. He has several publications in various reputed conferences and journals. He has co-organised several workshops and international conferences in the capacity of Organizing co- chair and Finance Chair, as well as several work- shops and seminars. He has several upcoming book chapter publications as well as an edited book by Taylor and Francis. He has also served in various committees in the roles of examination observer and assistant controller for exams. He has guided several undergraduate students in their fnal year projects and thesis. He has also fled and has been granted several patents in his name. He loves to travel and discover new and offbeat places.
  • 14.
    ix Contributors Anjali Agarwal Amity Instituteof Information Technology Mansheel Agarwal Amity University Kolkata, India N S Agbeb Department of Electrical/Electronics Engineering Kenule Beeson Saro-Wiwa Polytechnic Bori, Rivers State, Nigeria Debajyoty Banik Kalinga Institute of Industrial Technology Soumya Sankar Basu Department of Computing, College of Business Technology & Engineering Sheffeld Hallam University Sheffeld, United Kingdom Bikram Pratim Bhuyan School of Computer Science UPES Dehradun, India Swarup Chattopadhyay Machine Intelligence Unit Indian Statistical Institute Kolkata, India Anjan Chowdhury Center for Soft Computing Research Indian Statistical Institute Kolkata, India Keshav Dahal School of Engineering and Computing University of the West of Scotland United Kingdom Ajanta Das Amity Institute of Information Technology Amity University Kolkata Newtown, Kolkata, India Sujoy Datta School of Computer Engineering Kalinga Institute of Industrial Technology India Shreya Dey School of Computer Engineering Kalinga Institute of Industrial Technology India Subrata Dutta Dept of Computer Sc. & Engineering National Institute of Technology Jamshedpur, Jharkhand, India Kuntal Ghosh Machine Intelligence Unit Indian Statistical Institute Kolkata, India Arindam Giri Dept of Computer Sc. & Engineering Haldia Institute of Technology West Bengal
  • 15.
    x Contributors K TIgulu Department of Computer Science Kenule Beeson Saro-Wiwa Polytechnic Bori, Rivers State, Nigeria Pushpendu Kar School of Computer Engineering The University of Nottingham Ningbo, China Supreet Kaur Manav Rachna University Faridabad, India Manish Kumar Manav Rachna University Faridabad, India Tapas Kumar Manav Rachna University Faridabad, India Md Ashifuddin Mondal Department of Computer Science and Engineering Narula Institute of Technology Kolkata, India Shweta Mongia Manav Rachna University Faridabad, India Sarmistha Neogy Dept. of Computer Sc. & Engineering Jadavpur University Kolkata, India F E Onuodu Department of Computer Science University of Port Harcourt Rivers State, Nigeria Hukam Singh Rana School of Computer Science University of Petroleum and Energy Studies, Bidholi campus Dehradun, Uttarakhand, India Zeenat Rehena Department of Computer Science and Engineering Aliah University Kolkata, India Monideepa Roy School of Computer Engineering Kalinga Institute of Industrial Technology India Arkajit Saha School of Computer Engineering Kalinga Institute of Industrial Technology India N R Saturday Department of Computer Engineering Rivers State University Port Harcourti, Rivers State, Nigeria Ananya Singh School of Computer Engineering KIIT, Deemed University Bhubaneswar, India Shriya Singh School of Computer Engineering KIIT, Deemed University Bhubaneswar, India T P Singh School of Computer Science UPES Dehradun, India Ravi Bhushan Thakur Dept of Computer Sc. & Engineering National Institute of Technology Jamshedpur, Jharkhand, India
  • 16.
    xi Foreword “If you buildit, they will come.” Ever since the fctional character of Ray Kinsella uttered that expression in the 1989 flm Field of Dreams, it has almost become a business mantra for many startups and other new technology innovations. Given that there are many visionaries in the tech- nology area who can design and build new technologies without any forethoughts on whether their products will have customer acceptances or not, and even though many new innovations eventually luck out on this, for the rest of us there is no option other than following what Sam Walton had said, “There is only one boss. The customer. And he can fre everybody in the company from the chairman on down, simply by spending his money somewhere else.” But how do we know what a customer wants without having a crystal ball? We can perhaps use the following quote from Bill Gates for some guidance: “Your most unhappy customers are your greatest source of learning.” One of the fundamental principles of recommendation engines is to learn from the customer directly and make recommendations in the future so that we do not have many “unhappy customers.” The ultimate goal of a recommendation engine is to predict what the customer may like or at least feel useful and make suggestions accordingly. Unfortunately, it is not an easy task. More often than not, the recommendation engine has to make a rec- ommendation with very little or no information whatsoever. If the recommendation turns out to be wrong the customer may completely ignore any future recommenda- tions or may even get irked or antagonized by the recommendations. The information that is used by a recommendation engine is often stored in a customer vs. product preference matrix called a utility matrix. Consider the utility matrix for one of the major online retailers who might have over a quarter billion cus- tomers worldwide and carry about quarter billion different products on their catalog. The utility matrix for such a retailer would be in the order of 1016 entries. However, most of the entries of such a huge table will be blank because most customers would be using and may provide feedback for only a few hundred products. It is not nec- essary to predict every blank entry in a utility matrix. Rather, it is only necessary to discover some entries in each row that are likely to be of high relevance to the customer. In most applications, the recommendation system does not offer users a ranking of all items but rather suggests a few that the user should value highly. It may not even be necessary to fnd all items with the highest expected ratings, but only to fnd a large subset of those with the highest ratings. Even for a simpler subset of problem like that the recommendation engine needs to do it so effciently that even for such a large matrix it can make these recommendations almost in real time and on the fy, as when the customer is browsing and searching for a product online. Amazon frst used the idea of the item-wise collaborative fltering approach along with the traditional customer-wise collaborative fltering approach, which made unpacking and retrieving information from large utility matrix over a very large and distributed
  • 17.
    xii Foreword data serversreally feasible. The journal, IEEE Internet Computing, recognized the 2003 paper called “Amazon.com Recommendations: Item-to-Item Collaborative Filtering,” by then Amazon researchers Greg Linden, Brent Smith, and Jeremy York with the “Test of Time” honor during its 20th anniversary celebration in 2017. Without a utility matrix, it is almost impossible to recommend items. However, acquiring data from which to build a utility matrix is often diffcult. There are two general approaches to discovering the value users place on items. We can ask users to rate items. Movie ratings are generally obtained this way, and some online stores try to obtain ratings from their purchasers. Sites provid- ing content, such as some news sites or YouTube, also ask users to rate items. This approach is limited in its effectiveness, since generally users are unwilling to provide responses, and the information from those who do may be biased by the very fact that it comes from people willing to provide ratings. We can make inferences from users’ behavior. Most obviously, if a user buys a product at Amazon, watches a movie on YouTube, or reads a news article, then the user can be said to “like” this item. More generally, one can infer interest from behavior other than purchasing. For example, if an Amazon customer views informa- tion about an item, we can infer that they are interested in the item, even if they don’t buy it. Some of the recent research works deal with this idea of “implicit feedback.” Many recent research works deal with interpreting the “implicit feedback” from cus- tomers using deep neural networks. Development of recommender systems is a multi-disciplinary effort which involves experts from various felds such as artifcial intelligence, human computer interaction, information technology, data mining, statistics, adaptive user interfaces, decision support systems, marketing, or consumer behavior. The last items in the list, the consumer behavior, is the most important item for an accurate prediction of effectiveness of a recommendation system—but often gets the least amount of visibility in research literature. Many recommendation engines fail to understand the consumer behavior and keeps on displaying the same items to the customer even after the customer has either already purchased it elsewhere or has no interest in it any longer. The Netfix Prize is a good example to show that even one of the best algorithms leave a lot of scope for improvements. The Netfix Prize was an open competition for the best collaborative fltering algorithm to predict user ratings for flms, based on previous ratings only, without any other information about the users or flms. The competition was for the best algorithm that could improve upon Netfix’s own algo- rithm by at least a specifed threshold. The competition started on October 2, 2006, and by the middle of October a team called WXYZConsulting has already beaten the native Netfix algorithm by the specifed threshold. When it comes to recommendation engines, there is no “one size fts all” solu- tion. One needs to keep the human aspects of it in the focus while trying to calibrate other parts of the algorithm. The relationships between customers and product items may be often context based, making the utility matrix more non-uniform and com- plex than it may appear initially. A memory-based collaborative fltering is tradition- ally used for computing the “similarity” between users and/or items. However, a
  • 18.
    Foreword xiii model-based collaborativefltering takes the solution a bit further by using different models for different sub-groups within the utility matrix. Often a hybrid approach with a machine learning model along with a knowledge graph-based ontology might be the best solution when we have too little data or data is not reliable enough. Knowledge graph-based approaches have been shown to be particularly useful for a cold start for a new product or a new customer with no infor- mation on either being available for the utility matrix. Even when customer feedback might be available, sometimes they might be diffcult to rely upon. A hybrid approach with knowledge graph and with both memory-based and model-based collaborative fltering can often cover the full life cycle of a product from its inception to maturity to when the product is no longer preferred anymore and can be discontinued. In this anthology you will fnd several chapters covering different facets of the problem of recommendation engines, such as how to get user feedback using mood detection based on facial feature recognition to various frameworks for recommen- dations engines using swarm intelligence and IOT-based systems, as well as different methods related to content-based and collaborative fltering and their comparisons for effcacy using deep neural network, TensorFlow and other techniques. I am sure they will take you further down the road for choosing or building your own recom- mender systems for your particular problem. Maharaj Mukherjee, PhD IBM Master Innovator for Life Chair, IEEE Region 1 Central Area Member, IEEE USA Awards Committee Member, IEEE USA Region 1 Awards Committee
  • 20.
    xv Preface A recommender system,or a recommendation system, is a subclass of information fl- tering systems that predicts the “rating” or “preference” a user would give to an item. They are primarily used for commercial applications. They are most commonly rec- ognized as playlist generators for video and music services like Netfix, YouTube, and Spotify; product recommenders for services such as Amazon; or content recommenders for social media platforms such as Facebook and Twitter. These systems can operate using a single input, like music, or multiple inputs within and across platforms like news, books, and search queries. There are also popular recommender systems for spe- cifc topics like restaurants and online dating. Recommender systems have also been developed to explore research articles and experts, collaborators, and fnancial services. There are many types of algorithms that have been used in building recommender systems, and they each have their own unique set of features. When building a rec- ommender system, a good knowledge of the working of the algorithms will help the developer in choosing the correct type of algorithm for their application. People use social networks to understand their health condition, so the health recommender system is very important to derive outcomes such as recommending diagnoses, health insurance, clinical pathway-based treatment methods, and alterna- tive medicines based on the patient’s health profle. Recent research that targets the utilization of large volumes of medical data while combining multimodal data from disparate sources reduces the workload and cost in healthcare. In the healthcare sec- tor, big data analytics using recommender systems have an important role in terms of decision-making processes concerning a patient’s health. The application of recommender systems can also be extended to more crucial areas like healthcare and defense. The health recommender system (HRS) is becom- ing an important platform for healthcare services. In this context, health intelligent systems have become indispensable tools in decision-making processes in the health- care sector. Their main objective is to ensure the availability of valuable information at the right time by ensuring information quality, trustworthiness, authentication, and privacy concerns. In the past few years, the machine learning and artifcial intel- ligence communities have done signifcant work in using algorithms to identify pat- terns within data. These patterns have then been applied to various problems, such as predicting individuals’ future responses to actions and performing pattern-of-life analyses on persons of interest. Some of these algorithms have widespread applica- tion to Department of Defense (DoD) and intelligence community (IC) missions. One machine learning and artifcial intelligence technique that has shown great promise to DoD and IC missions is the recommender system. Here the recommender systems can be used for generating prioritized lists for defense actions, detecting insider threats, monitoring network security, and expediting other analyses. In addi- tion, while designing such a system, it is important to know the security and safety features that need to be addressed. This book brings together the research ideas and experiences of academicians and industry experts in building robust and reliable recommender systems for critics’ applications.
  • 21.
    xvi Preface Since developingrecommender systems requires the efforts of various disciplines and has a varieties of applications, by compiling the experiences of experts from various domains, this book is aimed at being a comprehensive handbook for develop- ing a recommender system from scratch and is suitable for readers from a wide cross- section of specialization. Recommender systems are, at present, primarily used for commercial applications; the main aim of this book is to provide students, research- ers, and solution providers with the steps needed to design recommender systems for critical and real-time applications like healthcare and surveillance. It also addresses the security aspects and ways to deal with possible attacks to build a robust system. It familiarizes the readers, who wish to design a recommender system from scratch, with the steps to create such a system. It is expected to empower the readers to do the following: • Identify and describe a recommender system for practical uses • Design, train, and evaluate a recommendation algorithm • Understand how to migrate from a recommendation model to a live system with users • Utilize the data collected from a recommender system to understand user preferences • Apply the knowledge to new settings. This book presents a multi-disciplinary approach to the development of recom- mender systems. Different types of algorithms for recommender systems along with their comparative analysis have been done. The book also presents the research fnd- ings of experts in various felds of computer science in the role of building rec- ommender systems for various types of applications. Some examples are handling the big data behind recommender systems, using marketing benefts, making good decision support systems, understanding the role of machine learning and artifcial networks, using statistical models, etc. The book also presents two case studies of the application of the recommender system in healthcare monitoring. The book shows how to design attack-resistant and trust-centric recommender systems for applica- tions dealing with sensitive data. The book has presented an in-depth discussion in the following chapters, which cover various aspects of recommender systems. • Comparison of Different Machine Learning Algorithms to Classify Whether or Not a Tweet is about a Natural Disaster—A Simulation- Based Approach This chapter discusses the use of various machine learning algorithms to classify whether or not a tweet is about a natural disaster and compares the results of classifcation algorithms in order to identify the best one for analyzing Twitter data. This chapter also discusses the role of social media (presently, Twitter) in a natural disaster or emergency situation along with current research works as well as challenges faced by researchers in this feld.
  • 22.
    Preface xvii • AnEnd-to-End Comparison among Contemporary Content-Based Recommendation Methodologies This chapter reviews a substantial number of articles and gives a fnal judgment on which algorithms should be adopted and tweaked in particular ways in order to have a more trustworthy environment. It also discusses some ideas for future development of this feld based on choices made by users of any other evolving culture in whatever form it may take. • Neural Network-Based Collaborative Filtering for Recommender Systems This chapter analyses different algorithms developed and used in the collaborative fltering (CF) based recommender systems and compares their performances in selecting the best algorithm. • Recommendation System and Big Data: Its Types and Applications In this chapter, various recommendation systems are discussed and their application in various sectors are compared. • The Role of Machine Learning/AI in Recommender Systems This chapter covers the machine learning algorithms that are associated with recommender systems. It also highlights the hybridization of these algorithms and how robust solutions are achieved from them. • A Recommender System Based on TensorFlow Framework This chapter aims to examine TensorFlow recommenders in implement- ing a recommender system. This chapter discusses how to build a recom- mender system based on deep learning. • A Marketing Approach to Recommender Systems This chapter examines recommender systems: their classes, their char- acteristics, and how they can be used for marketing. It also discusses rec- ommender systems that facilitate massive, detailed, and cost-effective data acquisition; one-to-one marketing analysis; market basket analysis; more informed, personalized, and adaptive recommendations; one-to-one mar- keting analysis; personalization and adaptation; niche targeting analysis; and improved merchandising and atmospherics. • Applied Statistical Analysis in Recommendation Systems This chapter provides a thorough literature overview of what is com- monly regarded to be the most popular statistical approaches to recom- mender systems. It lays attention on the statistical basis of the techniques rather than their computing details. This chapter discusses in detail the major statistical methods used in different recommender systems. • An IoT-Enabled Innovative Smart Parking Recommender Approach This chapter proposes an IoT enabled and network-based smart parking recommender solution, RecoPark. The proposed system enables cars to fnd a parking space automatically across cities and reserve them on the move. Optimal usage of parking space is rewarded to encourage disciplined usage of the system.
  • 23.
    xviii Preface • Classifcationof Road Segments in Intelligent Traffc Management System This chapter presents a framework for an intelligent traffc manage- ment system and discusses the different components of it. It also presents road segment classifcation techniques using different machine learning approaches based on traffc density and average speed. • Facial Gestures-Based Recommender System for Evaluating Online Classes This chapter discusses creating a model to track and recognize students’ postures and gestures throughout the class duration to measure student engagement with the material and teaching techniques of their professors. • Application of Swarm Intelligence in Recommender Systems This chapter discusses the advantages of the applications of Particle Swarm Optimization algorithms for developing more complex recommen- dation systems using multi-agent frameworks. • Application of Machine Learning Techniques in the Development of Neighborhood-Based Robust Recommender Systems This chapter evaluates and discusses the utility of traditional network clustering techniques such as Louvain, Infomap, and label propagation algo- rithms for the development of neighborhood-based robust recommender sys- tems. It also looks into and incorporates a modality-based network clustering method to make another neighborhood-based robust recommender systems. • Recommendation Systems for Choosing Online Learning Resources—A Hands-On Approach This chapter is a hands-on approach which describes, step by step, the process of developing a recommendation system for choosing online resources. We are thankful to all our authors for their excellent contributions, which led to the compilation of such an excellent resource for anyone who is interested in develop- ing their own recommendation systems. A special thanks to Dr. Maharaj Mukherjee of IBM for kindly writing such a valuable foreword for us. We also thank our series editor, Dr. Prasant Kumar Pattnaik, from the school of computer engineering, KIIT DU, for his excellent support and suggestions through- out our venture. Finally we are thankful to Dr. Gagandeep Singh and Ms. Aditi Mittal from Taylor and Francis for providing their timely inputs for the smooth execution of the entire project. (Editors) Monideepa Roy Pushpendu Kar Sujoy Datta
  • 24.
    1 Comparison ofDifferent Machine Learning Algorithms to Classify Whether or Not a Tweet Is about a Natural Disaster A Simulation-Based Approach Subrata Dutta, Manish Kumar, Arindam Giri, Ravi Bhushan Thakur, Sarmistha Neogy, and Keshav Dahal CONTENTS 1.1 Introduction ...................................................................................................... 2 1.2 Related Work .................................................................................................... 2 1.3 Challenges......................................................................................................... 3 1.3.1 Data Collection..................................................................................... 3 1.3.2 Data Authentication.............................................................................. 3 1.4 The Dataset....................................................................................................... 4 1.4.1 Flesch Reading Ease............................................................................. 9 1.4.2 Flesch-Kincaid Grade Level................................................................. 9 1.5 Methodology....................................................................................................10 1.5.1 Model Learning/Training Section.......................................................10 1.5.1.1 Data Preprocessing ...............................................................10 1.5.1.2 Feature Extraction.................................................................10 1.5.1.3 Classifcation.........................................................................11 1.5.2 Evaluation/Testing Section..................................................................11 1.6 Results and Discussion ....................................................................................11 1.7 Conclusion and Future Work ...........................................................................14 References.................................................................................................................15 DOI: 10.1201/9781003319122-1 1
  • 25.
    2 Recommender Systems 1.1INTRODUCTION In the growing feld of artifcial intelligence, researchers are mostly focusing on uti- lization of the available data and the upcoming data in future. Social media has too much data and, hence, it can be utilized in various felds to get the best out of it, such as a) getting feedback of a newly launched product or movie, b) knowing public opinion in an ongoing election, c) review of a restaurant using comments/feedback posted by various user, etc. Analysis of user tweets/comments/feedback/reviews by using machine learning and/or deep learning technique is called sentiment analysis. [1-2] Basically, sentiment analysis is performed to know the concern of the public. Similarly, when a natural disaster takes place or in any emergency situation, social media produces too much information, and by performing sentiment analysis over that information, some necessary action can be taken for the wellness of mankind. Researchers are working so that information available over social media could be utilized to its full capacity. In any emergency situation, especially in the case of a natural disaster, it is very diffcult to maintain communication because of disturbances due to the heavy impact of that incident at a particular location. In the past, most communications were done via televisions, radios, and newspa- pers, which are affected during disaster period. It was also very diffcult to get timely and accurate information because communication was one way. To get the actual scenario of any incident, two-way communication plays an important role. This is why social media outperforms other communication media. Social media such as Facebook, Twitter, etc. allow their users, irrespective of their location and role, to share text information, pictures, and videos related to any news. At the same time, the data available over social media are real time data and can be utilized to get the current status of a particular location regard- ing an event. These data can be utilized by concerned authorities, which is an important factor in reducing the impact of an incident by taking proper mitigat- ing actions.[2-3] In this technological world, we get some news earlier from social media than from traditional sources. The main objective of this chapter is to analyze the sentiment of various tweets and check whether or not it is about a natural disaster. The remainder of the chapter is organized as follows. Section 1.2 includes related works. In Section 1.3, we discuss various challenges faced by researchers in this area. Section 1.4 discusses the dataset used in simulation. In Section 1.5, we outline the methodology of data classifcation using machine learning. Section 1.6 provides results and discussions. Finally, Section 1.7 includes the conclusion and future work. 1.2 RELATED WORK The infuence of neighborhood equity on disaster situational awareness is investi- gated in hurricane by Zhai et al. 2020.[4] In Zou et al. 2018, Twitter data is mined and analyzed in disaster resilience.[5] The authors try to fnd common indexes from Twitter data so as to manage emergency situations. Human mobility patterns
  • 26.
    3 Different Machine LearningAlgorithms to Classify a Tweet during disasters are detected in Wang and Taylor 2014.[6] Potential use of social media in hurricanes is mentioned in Guan and Chen 2014 and Kryvasheyeu et al. 2016.[7-8] Research work in Wang et al. 2019 reveals that socially vulner- able communities had more infuence than other factors in Hurricane Sandy.[9] Bayesian networks classifers are used in sentiment analysis of Twitter data during natural disaster in Ruz et al. 2020.[10] This research demands the superiority of Bayesian classifer over support vector machine and random forest. The authors in Yang et al. 2019 proposed a credibility framework of Twitter data in a disaster scenario.[11] The framework is tested using a number of Twitter keywords. In order to generate Twitter Situational Awareness (TwiSA), sentiment analysis and topic modeling are used in Karami et al. 2020.[12] The TwiSA was used during the 2015 South Carolina food to manage huge tweets and fnd people’s negative concerns. A real-time disaster damage assessment model using social media is proposed in Shan et al. 2019.[13] In order to provide credible information about disasters, the Zahra et al. 2020 proposed an automatic identifcation of eyewit- ness messages on Twitter.[14] Based on different sources of tweets, the authors classify tweets and fnd associated characteristics. Analysis of Twitter data is used during the 2015 Chennai food through random forests, naïve Bayes, and decision tree. The research in Nair et al. 2017 reveals that random forests gives best result.[15] 1.3 CHALLENGES 1.3.1 DATA COLLECTION The importance of data can never be neglected in data analysis and data mining. The more data, the more information can be gathered. In the present application, we needed text data. As we worked on disaster tweets, we focused only on Twitter data extraction. We could access Twitter data by purchasing from private vendors or using Twitter application programming interface (API) to extract the data.[16] Most researchers prefer APIs for data extraction. But data extraction is restricted through this method. There is also restriction on the number of calls made for data extraction using a particular account. Also, most of the social media data (including Twitter) are unstructured, so it is very diffcult to extract data. Unstructured data does not follow any particular pattern so that specifc keywords could be used to extract the relevant data of any incident. 1.3.2 DATA AUTHENTICATION As we analyze social media data, where every individual is allowed to share data, there is no proper authentication or verifcation of data. So in a case of emergency, incorrect data may lead to danger of human lives. Beyond emergency situations, sometimes rumors also spread over social media, which indirectly become respon- sible for violence in society. So detecting fake news or posts in social media is still a very big challenge. Due to an increase in fake news, concerned authorities are work- ing hard to deal with such situations.
  • 27.
    4 Recommender Systems 1.4THE DATASET We took a dataset from a Kaggle competition,[17] in which 5329 samples were used as training data and 2284 samples were used for model evaluation (i.e., out of 7613 samples, 70% were used as training data and 30% were used as test data). Some of the samples were manually verifed to check the correctness of the sample dataset. The dataset con- tains felds such as ID, keyword, location, text, and target. The ID is a unique identity; the keyword (may be empty) is an important key from the tweet; text (most important feld for our analysis) is the actual text of tweet; and the target is our dependent variable (i.e., 1 represents tweet is about a real disaster, 0 means tweet is not about a real disaster). A sample dataset is shown in Figure 1.1. The number of tweets per class is shown in Figure 1.2(a), and the percentage of each class is shown in Figure 1.2(b). The num- ber of tweets for the top 10 locations is shown in Figure 1.3. The number of tweets according to location in an entire dataset on a map is shown in Figure 1.4. The num- ber of tweets for each class for top 10 locations is shown in Figure 1.5. Word clouds for disaster tweets are shown in Figure 1.6. Word cloud for non-disaster tweets are shown in Figure 1.7. Flesch-Kincaid readability test analysis [18] is shown in Figure 1.8 and Figure 1.9, and sample data after preprocessing is shown in Figure 1.10. FIGURE 1.1 Sample dataset. FIGURE 1.2A Number of tweets per class.
  • 28.
    5 Different Machine LearningAlgorithms to Classify a Tweet FIGURE 1.2B Percentage of each class. FIGURE 1.3 Number of tweets for 10 top locations. FIGURE 1.4 Number of tweets according to location in the entire dataset on a map.
  • 29.
    6 Recommender Systems FIGURE1.5 Number of tweets for each class for top 10 locations. FIGURE 1.6 Word cloud for disaster tweets.
  • 30.
    7 Different Machine LearningAlgorithms to Classify a Tweet FIGURE 1.7 Word cloud for non-disaster tweets. FIGURE 1.8 Flesch-Kincaid readability test.
  • 31.
    8 Recommender Systems FIGURE1.9 Flesch-Kincaid analysis of data. FIGURE 1.10 Sample data after preprocessing.
  • 32.
    9 Different Machine LearningAlgorithms to Classify a Tweet Two formulae for evaluating the readability of text—usually by counting syllables, words, and sentences—are Flesch Reading Ease and Flesch-Kincaid Grade Level. 1.4.1 FLESCH READING EASE In the Flesch Reading Ease test,[19] higher scores indicate material that is easier to read; lower scores mark passages that are more diffcult to read. The formula for the Flesch Reading Ease score (FRES) test is: 206.835-1.015*(total words/total sentences) – 84.6 (total syllables/total words) 1.4.2 FLESCH-KINCAID GRADE LEVEL These readability tests are used extensively in the feld of education. The Flesch– Kincaid Grade Level Formula presents a score as a US grade level, which makes it easier for teachers, parents, librarians, and others to judge the readability level of various books and texts. It can also mean the number of years of education gener- ally required to understand this text, which is relevant when the formula results in a number greater than 10. The grade level is calculated with the following formula: 0.39*(total words/total sentences) + 11.8*(total syllables/total words) – 15.59 Scores can be interpreted as shown in Table 1.1. TABLE 1.1 Flesch–Kincaid Readability Test Summary Score School level Notes 100-90 5th grade Very easy to read. Easily understood by an average 11-year-old student. 90-80 6th grade Easy to read. Conversational English for consumers. 80-70 7th grade Fairly easy to read. 70-60 8th & 9th grade Plain English. Easily understood by 13- to 15-year-old students. 60-50 10th to 12th grade Fairly diffcult to read. 50-30 College Diffcult to read. 30-10 College graduate Very diffcult to read. Best understood by university graduates. 10-0 Professional Extremely diffcult to read. Best understood by university graduates.
  • 33.
    10 Recommender Systems 1.5METHODOLOGY The methodology adopted while applying machine learning in analyzing Twitter data is depicted in Figure 1.11. As stated earlier, we have taken dataset from a Kaggle com- petition,[17] in which 5329 samples were used as training data, and 2284 samples were used for model evaluation (i.e., out of 7613 samples, 70% used as training data and 30% as test data). We divided our experiment into two sections: model learning and testing. 1.5.1 MODEL LEARNING/TRAINING SECTION Model learning/training consists of data preprocessing, feature extraction, and exe- cuting algorithm for classifcation [20]. 1.5.1.1 Data Preprocessing This is done on three columns (keyword, location, text). Then data cleaning was done by expanding the contraction, removing accented character, converting text to lower case, removing digits, splitting into tokens, and, fnally, lemmatization and stop word removal. 1.5.1.2 Feature Extraction Term frequency-inverse document frequency (TF-IDF), a technique used to convert text into word vectors, was used; fnally, we got the matrix with dimension m*n, where m represents the number of samples in our dataset and n represents the number FIGURE 1.11 Methodology adopted for applying machine learning for analyzing Twitter data.
  • 34.
    11 Different Machine LearningAlgorithms to Classify a Tweet of features in the dataset.[21] We tuned some of the parameters of TF-IDF, such as n_gram range and max_feature to get good feature vector. 1.5.1.3 Classifcation With feature vector obtained in the last step as input, machine learning classifca- tion algorithms were used, and we got a trained classifer/model as an output of this step. Some algorithms used here were logistic regression, K-nearest neighbors, near- est centroid, Gaussian naïve Bayes, Multinomial Naïve Bayes, linear support vector machine (SVM), decision tree, and random forest. 1.5.2 EVALUATION/TESTING SECTION This phase consisted of data preprocessing, feature extraction, and label prediction. Data preprocessing and feature extraction were conducted in the same way as was done in the training phase. Feature vector obtained was given as input to a trained model/classifer (as obtained in the training phase), and a label for each sample was predicted as an output. The simulation set up used for classifying Twitter data is given in Table 1.2. 1.6 RESULTS AND DISCUSSION After analyzing the results of different machine learning classifer algorithms obtai- ned after the simulation process, we found that logistic regression gave good accu- racy with TF-IDF word embedding technique. We have presented our score, which is an average of fve executions. Obtained result are presented in Table 1.3. We used the following eight algorithms in this experiment: logistic regres- sion, K-nearest neighbor (KNN), nearest centroid, Gaussian naïve Bayes (GNB), Multinomial Naïve Bayes (MNB), SVM, decision tree, and random forest. For further analysis we split the training data (i.e., 70% of the original dataset) into various subsets such as 25%, 50%, 75%, and 100%. These individual subsets were used for training the algorithms and tested on the same test data (i.e., 30% of the original dataset). The results are presented in Table 1.4. TABLE 1.2 Simulation Parameters Parameter Value Programming language Python 3.0 Library used NumPy, pandas, Matplotlib, re, NLTK, sklearn, LIME, warnings, Seaborn, Plotly, statistics, textstat, PyLab, spaCy, GeoPy, folium IDE Jupyter Notebook Processor Intel core i5 2.4GHz, 2.10GHz Memory 8GB RAM System type 64-bit OS, x64-based processor
  • 35.
    12 Recommender Systems TABLE1.3 Result Obtained by Various Classifers Algorithm Class Precision Recall F Score Accuracy Logistic regression 0 78 88 83 79 1 81 67 73 KNN 0 69 92 79 72 1 81 47 59 Nearest centroid 0 80 80 80 77 1 74 73 74 GNB 0 70 90 79 72 1 79 50 61 MNB 0 76 91 83 78 1 84 61 71 SVM (Linear) 0 78 85 81 77 1 77 69 73 Decision tree 0 77 74 76 72 1 67 70 69 Random forest 0 75 89 81 76 1 80 61 69 TABLE 1.4 Accuracy Obtained by Varying Training Dataset Sizes Algorithm 25% 50% 75% 100% Logistic regression 73 75 78 79 KNN 70 70 71 72 Nearest centroid 73 75 76 77 GNB 70 70 71 72 MNB 73 76 77 78 SVM (Linear) 73 75 76 77 Decision tree 70 70 71 72 Random forest 71 74 75 76 We also experimented on a word embedding technique called count vector- izer,[21] and the results are presented in Table 1.5. By making word clouds, we dug deeper into the feature set and got to know the important keyword or tokens, which play an important role in classifcation. Figure 1.12 shows a word cloud of important features that we used in our experiment. FurtherweusedatechniquecalledLocalInterpretableModel-AgnosticExplanations (LIME), which was used to explain the predictions of any regression or classifer by approximating it locally with an interpretable model.[17] Figure 1.13 explains predic- tions of the chosen classifer (logistics regression) to determine if a document is about a disaster or a non-disaster based on LIME. The bar chart in Figure 1.14 shows various
  • 36.
    Different Machine LearningAlgorithms to Classify a Tweet 13 TABLE 1.5 Results Obtained by Various Classifer Using Count Vectorizer Algorithm Class Precision Recall F Score Accuracy Logistic regression 0 79 86 83 79 1 79 70 74 KNN 0 68 91 78 71 1 78 44 56 Nearest centroid 0 76 86 81 76 1 77 63 70 GNB 0 70 91 79 73 1 80 49 61 MNB 0 77 89 83 79 1 81 66 73 SVM (Linear) 0 78 81 89 76 1 73 70 71 Decision tree 0 78 78 78 75 1 70 71 71 Random forest 0 76 86 81 77 1 77 65 70 FIGURE 1.12 Word cloud of important features used in the experiment.
  • 37.
    14 Recommender Systems FIGURE1.13 Predictions of the chosen classifer. FIGURE 1.14 Bar chart of various positive and negative keywords for the disaster class. positive and negative keywords for the disaster class obtained; the model interpretation for a particular example is in Figure 1.12. Color indicates which class the word contrib- utes to (blue for disaster, yellow for non-disaster). 1.7 CONCLUSION AND FUTURE WORK We analyzed the use of Twitter data and realized that Twitter is a community where people post the status of the current situation of their surroundings. Social media platform such as Twitter can be used for communication during any kind of natu- ral disaster and emergencies. These Twitter data can be used in getting information related to public opinion by using various machine learning techniques.[21] In this chapter, we analyzed Twitter data related to natural disaster, and we found that logis- tic regression is able to classify a tweet, whether or not it is about natural disaster,
  • 38.
    15 Different Machine LearningAlgorithms to Classify a Tweet with an average accuracy of 79%. Twitter data can be used to build an application that can be helpful in natural disasters or other emergencies. The biggest diffculty we found is the authenticity of data available over Twitter or any other social media platform. As future work, we will try to analyze all types of data (such as images, videos, etc.) available over social media platform like Twitter and other platforms. We would like to fnd the importance of the data in a particular scenario and action that may be taken based on the data, if any. In addition, we will try to improve the accuracy of current work. REFERENCES [1] J. Kersten and F. Klan, “What happens where during disasters? A Workfow for the multifaceted characterization of crisis events based on Twitter data,” J. Contingencies Cris. Manag., vol. 28, no. 3, pp. 262–280, 2020. [2] N. Pourebrahim, S. Sultana, J. Edwards, A. Gochanour, and S. Mohanty, “Understanding communication dynamics on Twitter during natural disasters: A case study of Hurricane Sandy,” Int. J. Disaster Risk Reduct., vol. 37, p. 101176, 2019. [3] B. Abedin and A. Babar, “Institutional vs. non-institutional use of social media during emergency response: A case of Twitter in 2014 Australian bush fre,” Inf. Syst. Front., vol. 20, no. 4, pp. 729–740, 2018. [4] W. Zhai, Z.-R. Peng, and F. Yuan, “Examine the effects of neighborhood equity on disaster situational awareness: Harness machine learning and geotagged Twitter data,” Int. J. Disaster Risk Reduct., vol. 48, p. 101611, 2020. [5] L. Zou, N. S. N. Lam, H. Cai, and Y. Qiang, “Mining Twitter data for improved under- standing of disaster resilience,” Ann. Am. Assoc. Geogr., vol. 108, no. 5, pp. 1422–1441, 2018. [6] Q. Wang and J. E. Taylor, “Quantifying human mobility perturbation and resilience in Hurricane Sandy,” PLoS One, vol. 9, no. 11, p. e112608, 2014. [7] X. Guan and C. Chen, “Using social media data to understand and assess disasters,” Nat. Hazards, vol. 74, no. 2, pp. 837–850, 2014. [8] Y. Kryvasheyeu et al., “Rapid assessment of disaster damage using social media activ- ity,” Sci. Adv., vol. 2, no. 3, p. e1500779, 2016. [9] Z. Wang, N. S. N. Lam, N. Obradovich, and X. Ye, “Are vulnerable communities digi- tally left behind in social responses to natural disasters? An evidence from Hurricane Sandy with Twitter data,” Appl. Geogr., vol. 108, pp. 1–8, 2019. [10] G. A. Ruz, P. A. Henríquez, and A. Mascareño, “Sentiment analysis of Twitter data dur- ing critical events through Bayesian networks classifers,” Futur. Gener. Comput. Syst., vol. 106, pp. 92–104, 2020. [11] J. Yang, M. Yu, H. Qin, M. Lu, and C. Yang, “A Twitter data credibility framework— Hurricane harvey as a use case,” ISPRS Int. J. Geo-Information, vol. 8, no. 3, p. 111, 2019. [12] A. Karami, V. Shah, R. Vaezi, and A. Bansal, “Twitter speaks: A case of national disas- ter situational awareness,” J. Inf. Sci., vol. 46, no. 3, pp. 313–324, 2020. [13] S. Shan, F. Zhao, Y. Wei, and M. Liu, “Disaster management 2.0: A real-time disaster damage assessment model based on mobile social media data—A case study of Weibo (Chinese Twitter),” Saf. Sci., vol. 115, pp. 393–413, 2019. [14] K. Zahra, M. Imran, and F. O. Ostermann, “Automatic identifcation of eyewitness messages on Twitter during disasters,” Inf. Process. Manag., vol. 57, no. 1, p. 102107, 2020.
  • 39.
    16 Recommender Systems [15]M. R. Nair, G. R. Ramya, and P. B. Sivakumar, “Usage and analysis of Twitter during 2015 Chennai food towards disaster management,” Procedia Comput. Sci., vol. 115, pp. 350–358, 2017. [16] M. Martinez-Rojas, M. del Carmen Pardo-Ferreira, and J. C. Rubio-Romero, “Twitter as a tool for the management and analysis of emergency situations: A systematic litera- ture review,” Int. J. Inf. Manage., vol. 43, pp. 196–208, 2018. [17] M. T. Ribeiro, S. Singh, and C. Guestrin, “‘ Why should I trust you?’ Explaining the predictions of any classifer,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 1135–1144. https://www.researchgate.net/publication/305342147_Why_Should_I_Trust_You_ Explaining_the_Predictions_of_Any_Classifer [18] P. Misra, N. Agarwal, K. Kasabwala, D. R. Hansberry, M. Setzen, and J. A. Eloy, “Readability analysis of healthcare-oriented education resources from the American academy of facial plastic and reconstructive surgery,” The Laryngoscope, vol. 123, no. 1, pp. 90–96, 2012. [19] P. Jacob and A. L. Uitdenbogerd, “Readability of Twitter Tweets for second language learners,” in Proceedings of the 17th Annual Workshop of the Australasian Language Technology Association, 2019, pp. 19–27. https://aclanthology.org/U19-1003 [20] S. Karmaniolos and G. Skinner, “A literature review on sentiment analysis and its foun- dational technologies,” in 2019 IEEE 4th International Conference on Computer and Communication Systems (ICCCS), 2019, pp. 91–95. [21] K. S. Kalaivani, S. Uma, and C. S. Kanimozhiselvi, “A review on feature extraction techniques for sentiment classifcation,” in 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC), 2020, pp. 679–683.
  • 40.
    An End-to-End 2 Comparisonamong Contemporary Content- Based Recommendation Methodologies Debajyoty Banik and Mansheel Agarwal CONTENTS 2.1 Introduction .....................................................................................................17 2.1.1 Why Do We Need Recommender Systems?........................................18 2.2 A Very Basic Content-Based Model................................................................19 2.3 Data Representation.........................................................................................19 2.3.1 Structured Data................................................................................... 20 2.3.2 Unstructured Data............................................................................... 20 2.4 Content-Based Recommendation through User Ratings and Item Analysis ...........................................................................................................21 2.4.1 Explicit Feedback ................................................................................21 2.4.2 Implicit Feedback ................................................................................21 2.5 Comparing and Analysing.............................................................................. 22 2.5.1 Improvement of the NLP Model......................................................... 22 2.5.2 Adjustment of Weights........................................................................ 22 2.5.3 The Cold Start Recommendation ....................................................... 23 2.5.4 Emotion Based.................................................................................... 24 2.5.5 Conversational Recommender............................................................ 25 2.6 Conclusion and Future Perspective................................................................. 26 References................................................................................................................ 26 2.1 INTRODUCTION As we set our feet in this world of recommender systems, it’s really important for us to understand why we need recommender systems. With the growth of technol- ogy and an increase in the scale of artifcial intelligence (AI), machines are now capable of providing us with a list of movies which seem exactly in sync with us. Before we start comparing different recommender systems, we should, frst and DOI: 10.1201/9781003319122-2 17
  • 41.
    18 Recommender Systems foremost,understand a very basic model of a content-based movie recommenda- tion. Once we understand how it works, we will quickly dive into the technical terms related to it, so that all my non-tech friends get to understand the various algorithms with ease too. 2.1.1 WHY DO WE NEED RECOMMENDER SYSTEMS? Living in such a beautiful a country as India, I will defnitely start out by giv- ing an insight into a little apparel store in the area where I reside. My mother would always go to a sari store, and the salesman there would try to “recom- mend” saris to my mom, which surprisingly matched her taste. That was the very primitive idea I had of recommender systems before I even started school. The world evolved and so did the stores around us. What we had in a physical envi- ronment started changing to what we now call a massive chain of multi-national companies who will do anything to bind in their customers. A very loved feld for tech-seekers, machine learning became the salesman in this platform readily adapting to the booming e-commerce led by hotshots like Amazon, Walmart, Myntra, Ajio and Wish. A recommender system (Figure 2.1) is not just important to multi-media com- panies but is also required to connect similar people and create a cohort in this ever-increasing world of possibilities. I started out by giving a very general instance of where a recommender system was in use before it was even introduced. I would conclude by maintaining that it’s a really important factor in user engagement and integrity and, therefore, inducing people to often switch careers and bring in more ideas about how the algorithms can be made more robust and trustworthy. FIGURE 2.1 Classifcation of the recommender system.
  • 42.
    19 Comparison of Content-BasedRecommendation Methodologies 2.2 A VERY BASIC CONTENT-BASED MODEL A content-based recommendation system basically involves an inbuilt search engine in itself that enables it to weigh certain items and predict the overall measurement of the movie to be recommended based on the overall weight calculated.[1-2] We will now understand the working of the system with the help of an example. Suppose we have a super set A consisting of all the possible movies in the given platform. Now we have another set, B, consisting of all the movies that a user has watched and given us some information about, such that ∀B∈A and |B|<<|A|, which makes sense as we’re taking a considerable amount of data for training our recom- mendation model. We also introduce another set, C, consisting of the movies the user has yet not rated, ∀C∈A and |C|<<|A| and a function f(x) that can also be referred to an interest function of the user, which denotes a positive (1) or a negative (0) value and helps us to derive another function g(x), which will estimate the value of f(x) for every element of the set A to effectively recommend appropriate content to the user based on his or her personal choice. Now the whole game of recommendation depends upon classifcation and regres- sion wherein we take into account the user’s ratings and the content of a limited num- ber of training data sets to educate our estimation function and then try to match it best to the user’s interest function before a movie is recommended to him or her. This chapter discusses the recently used algorithms, extensively working in these two main domains, and tries to incorporate the machine learning techniques to either make the user’s ratings more trustworthy or to expand the whole data set of the information we have about the movies set B from different resources to match the user’s interests better. Before we move on to understanding how the recent methodologies have affected the contemporary content-based recommendation system, we must know how we prepare and present the data so as to feed into our user rating estimation or the item analysis model. 2.3 DATA REPRESENTATION Now that we know we need a robust and accurate data set so as to provide an appro- priate estimation of the user’s ratings, we need to know how we source in and work through this data. Usually, the data used in the feld of content-based recommender systems is real time data like books, interviews, movies, authors, plays, etc., which we cannot give our model directly. We must now move forward and dive into how we manage and organise this data in an effcient manner as the more incorrect the data sets we have, the lesser will be the chances of our estimation matching with the interests of the users. We don’t want to waste our time deriving theoretical data that will not be of any use to the practical circumstances. The biggest question that we have in mind is if this data should be generated or manually fed by some technician. Both have their own pros and cons; for example, if we try to get really automated, we might not get a proper description of a par- ticular item from a computer-generated data set. On the other hand, if we let the
  • 43.
    20 Recommender Systems humanmind map put the data for us, it will be really subjective, which again will not help us increase the percentage of integrity of the estimation function in any form. Keeping this in mind, we have two different methods in which there will be an unbiased approach to represent the data in a way that we get the advantages of both the felds without trusting one blindly. They are discussed in the following sections. 2.3.1 STRUCTURED DATA When we talk about structured data, we mean the relational tables that we have in a properly constructed data set. They have a known data model or, in other words, a data schema. We have an attribute defned for every item and can also differentiate among them using an identifcation trademark called the primary key. 2.3.2 UNSTRUCTURED DATA Almost every data that does not follow a fxed database schema can fall into this cat- egory. It includes all the lengthy unrestricted texts and multimedia, even if they have an underlying structure, like a bit of grammar. In unstructured data, it is common to represent multimedia data using textual descriptions.[3] Although in the usual case this requires human intervention, this representation allows us to analyse multimedia data which usually has a much greater size than its textual description and requires complex and time-consuming analysing techniques. Furthermore, as noted before, the modern techniques of pattern recognition from multimedia data are still in their infancy and do not always produce satisfying results. We also have another data set that we call a semi-structured data, which is almost in the shape of a data schema and breaks the rules of regular data by containing some multimedia data for some of its attributes. This representation is really important for movies—the topic of our chapter—which doesn’t follow a strict data schema and consists of mostly an amalgam of regular and multimedia values that we need to break down in order to provide the data set to our recommendation model. In information extraction and data mining, semi-structured data is usually partitioned in structured and unstructured data and then treated using different techniques for each kind of data. The strict structure of structured data allows us to treat every item as a n-dimensional vector, where n is the number of characteristics used to describe an item. Then we can apply well known techniques from the felds of information theory and information retrieval, such as cosine similarity and Pearson correla- tion, in order to measure the similarity of items. Whereas, as for the unstructured data, we cannot directly process them using simple natural language processing methods as none of the algorithms have proved so right that it has been able to crack into the complex multimedia data like graphics and pixels. So we frst con- vert such unstructured data set to a structured form and then process it by using information extraction and pattern recognition to comprehend the multimedia and the restricted texts.
  • 44.
    21 Comparison of Content-BasedRecommendation Methodologies 2.4 CONTENT-BASED RECOMMENDATION THROUGH USER RATINGS AND ITEM ANALYSIS Now that we have explained how the sourcing of the data works, we must move to our concept of how user ratings and his or her profle can add with the item factors to cal- culate an estimated value g(x) for every movie in the set A. Now this user model can be put to work to compare the estimates of the unrated movies with the rated ones to correctly predict whether or not a user will like it. The many algorithms we’re about to discuss in this chapter deal with how a proper user model is created and how it can be used to relate this with the unrated data. In the scenario of a movie recommender system,[4-6] what remains intact is the fowchart, which starts from having a training data set that is used to familiarise our function with the kind of movies the user likes. The number of movies we consider basing our model on also contributes to its error percentage to a rather accountable scale as the greater the data will be, the more accurate our estimation will be. For this fact to become clear, we frst need to examine the different ways of rating the items in the training data. 2.4.1 EXPLICIT FEEDBACK To gather explicit feedback from the user, the device must ask customers to grant their scores for items. After accumulating the feedback, the gadget is aware of how applicable or comparable an object is to users’ preferences. Even though this approves the recommender to examine the customers’ specifc opinions, because it requires direct participation from the user, frequently, it is not effortless to col- lect. That is why there are one-of-a-kind approaches to gather feedback from users. Implementing a like/dislike performance into a net site offers customers the ability to consider the content material easily. Alternatively, the device can ask customers to insert their ratings where a discrete numeric scale represents how the consumer liked/disliked the content. Netfix frequently asks clients to rate flms. Another way to acquire explicit feedback is to ask customers to insert their remarks as text. While this is a fantastic way to analyse consumer opinion, it is normally no longer handy to acquire and evaluate. 2.4.2 IMPLICIT FEEDBACK In contrast to the explicit feedback, there is no consumer participation required to collect implicit feedback. The device mechanically tracks users’ preferences by way of monitoring the carried out actions, such as which object they visited, the place they clicked, which gadgets they purchased, or how long they stayed on a web page. One ought to locate the right movements to track primarily based on the area that the recommender device operates on. Another gain of implicit remarks is that it reduces the cold start troubles that take place till an object is rated ample enough to be served as a recommendation.
  • 45.
    22 Recommender Systems 2.5COMPARING AND ANALYSING Several technical laureates came forward with different ways of improving this basic architecture so as to improve our experience of a developed and sometimes integrated system. We basically divide our genres into these broad classifcations wherein we state the comparison among different techniques under these subtopics and, therefore, state the advantages and disadvantages of each. 2.5.1 IMPROVEMENT OF THE NLP MODEL The term frequency-inverse document frequency (TF-IDF) model has been in existence since the time it has been discovered.[7] The bag-of-words model used to exist before that which failed in the proper positioning of related vectors and, hence, the accuracy of the estimation wasn’t up to the mark. On the contrary, we have articles suggest- ing how the bag-of-words model of user tags is more suitable to a movie recommender system than an TF-IDF model. This involves splitting the available user and movie tags (author, writer, director, actors, cast, crew etc.) into tokens and cleaning them. Once we have a vectorized model, we pass the processed features into certain detailed media sources such as the ones available in Wikipedia or IMDB and then go on to create fuzz- ing recommendations based on how many tags appear in the resource for how many times. Alternatively, the bag-of-words representations of tags can be used together with an unsupervised dimensionality reduction algorithm, as latent semantic analysis (LSA), to represent movies. Another signifcant change is the use of the power of word embed- ding, which is used for transforming a word into a vector from a vector space with a fxed dimensionality in a way that words occurring in similar contexts are represented by similar vectors. Other than this, data can be further enriched by scraping some tags off commercial movie websites and the big hotshots of the media industry so that we can then use this information as an embedding into our model to provide more relat- able recommendations as well. As aforesaid, we can even improve this whole thing by generating a training data set and using the methods of classifcation along with some deep learning algorithms such as recurrent neural networks (RNNs) and long short-term memory (LSTM) to fnally predict a list of movies the user may fnd interesting. The downside of the previously stated approaches is that we’re still using a bag-of- words model, which isn’t suitable for new strings and would, at some point, enlarge the length of the vectors to a state where it’ll become unmanageable. It will also render many 0s this way, making it into a sparse matrix that we’re trying to avoid from the very start. Additionally, word embedding, as of what we’ve been introduced to date, integrates all the words that have multiple meanings into a single represen- tation, after which it’s really diffcult to make out the exact meaning of the word in a particular sentence. For example, the word “nursery” can mean the place where plants are harboured or the place where primary children go to study. 2.5.2 ADJUSTMENT OF WEIGHTS A content-based recommendation system makes use of weights that are given to the factors in accordance of their importance as per the user. We, intentionally or
  • 46.
    23 Comparison of Content-BasedRecommendation Methodologies unintentionally, provide a lot of personalized data over the web in our daily lives, and this is where the story of the weights begins. References have been made that these weighted values be extracted from a linear regression obtained from our data on social media platforms through which a similarity graph can be generated of whether or not the user would like a particular factor. Feature weighing system make it possible to incorporate different factors of an item and draw a similarity chart by calculating the weight in the following fashion: S(Oi, Oj) = ω1f(A1i, A1j) + ω2f(A2i, A2j) + ··· + ωnf(Ani, Anj) Where: S(Oi, Oj): similarity function An: the factors of item in consideration ωf(Ani, Anj): the weights of the similarity values calculated by the function f(i,j) Hence, feature weighting is found to be really useful as it shows a considerable improvement in the recall value and serves as a more personalized system than a pure content-based recommender. Using this takes into account the human behaviour of giving more importance to a particular factor than laying all their importance on some fxed factors incorporating both practicality and machine independence. However, if we go on assigning weights to every particular fea- ture, the output model of our algorithm might mislead consumers to negative and rapid conclusions. The recommendation process is more heuristic, which doesn’t justify the item preference for some other user. This was also improved in another research where they cited [1] the permutations and combinations technique to dou- ble check the data to improve the recommendation list created by the tradition feature weighting technique. 2.5.3 THE COLD START RECOMMENDATION The algorithms that we’ve seen until now deal with a training data set that has to be of a considerable size to make better predictions. This leads us to a major problem, which is a cold start. Cold start [8-9] refers to the initial period of recommendation where the machine doesn’t have much information about the user and just has a very little set to choose from. The challenge of still giving out a trustworthy list of recom- mendations were undertaken by many such professionals, which gave us an overview about how machine learning and its concepts can be used in a way to make the tradi- tional algorithm work effciently in such cases. To avoid the cold start problem, some platforms recommend the popular movies and videos to people after which they can choose and provide ratings to increase the size of the training data set. But, even by using deep learning, we still cannot solve the cold start problem for users who don’t rate many movies. Hence, a meta-learning system was introduced to solve the problem by taking only a small data set and opti- mising it with the help of the user search history, which will give us more personal- ized information about the user and will help us to recommend better movies to the new users promoting platform binding (Figure 2.2).
  • 47.
    24 Recommender Systems FIGURE2.2 Diagram of the optimisation-based meta-learning algorithm. Even though meta learning opens up a whole new world for machine learning, it comes at its own cost, quite literally. Meta learning requires a lot of simpler instructions for its training, thus it burns a hole in your pocket. Also, although it doesn’t require as large a data set, it works on the historical data of a user, which is more diffcult to comprehend and complex to mitigate. The existing model can show fast and effcient learning ability on simple new tasks such as moving and sorting targets, but the learning ability shown on some complex new tasks such as action cohesion is very unsatisfactory. Finally, the current algorithms are basically learning single metaknowledge, and metaknowledge is diverse, so the generalisation of the model may be affected to a certain extent. 2.5.4 EMOTION BASED Till now, we have seen how we can recommend user-based choices to them through a third person perspective. But what we failed to understand is that even though we apply millions of algorithms to make our output as friendly as possible, we might never be able to break into a person’s current mental state. A moody person, in this way, may never have a proper set of movie recommendations and would thus not prefer to stick to a particular platform. To solve this problem, researchers proposed a system based on the emotional and mental situation of each individual, which is bound to be strikingly dif- ferent from any other consumer on the website.[10] Hence, a graph-based movie recom- mender system promised to integrate the user’s emotions as well as his or her emotions on a single graph. Using Bidirectional Encoder Representations from Transformers (BERT) as a state-of-the-art model improved the language processing and helped our system understand the semantics of the user’s activities much more deeply than any other natural language processing (NLP) algorithm, which proved to be much more effective than any other conventional systems we’ve talked about. Using multiple BERTs and then passing them all fnally through our good old inductive graph-based matrix completion (IGMC) model, we get the fnal amalgamation function of emotions and ratings. Other articles mean to take into considerations the product reviews as well as the history of purchase to demonstrate an overall outlook on the user’s emotions to
  • 48.
    25 Comparison of Content-BasedRecommendation Methodologies predict their current mood. Extracting data from Wordnet and various other psy- chological resources and then merging them to obtain a fuzzy emotions data, we can then introduced it to the classifcation model which will hand over the absolute recommendations based on our emotions. However, the drawback of this system is that they require a lot of psychological data that are generally really personal and would thus be susceptible to copyright issues. Even if we get a safe set of data, it’s really diffcult to pay attention to each emotion and break it down into such a preliminary level as to comprehend it’s mean- ing in a very high rate of accuracy. 2.5.5 CONVERSATIONAL RECOMMENDER Last but not least, we consider the conversation factor [11-13] in our recommenda- tion system. All our previous architectures provided us just a one-way conversation between the user (giving ratings) and the system (maintaining recommendations); now it was time to up the game and step into the feld of a one-to-one conversation with the customer to dynamically refer movies at a point of time. Certain chatbots were introduced in the market along with some robust NLP algorithms to semanti- cally understand a person’s criteria. As shown in Figure 2.3, the system worked on four major aspects: Recommend, Request, Explain and Respond. The user would frst interact with an NLP model after it requests him or her, and then the processing will be done to respond and rec- ommend to the user solving the purpose.[14-15] The downside of this approach was that it provided a totally dynamic and unique output for every model, which made it complex for the researchers to analyse if it had an appreciative rate of success. Also, there is no such current NLP project, which can take under its responsibility and read the minds of every user in a particular way. After all, machines can never mimic our minds fully.[6,16] FIGURE 2.3 Simple block representation of a conversational recommender.
  • 49.
    26 Recommender Systems 2.6CONCLUSION AND FUTURE PERSPECTIVE In this chapter, we discussed the various methods of content-based recommendation systems and did a survey over several new algorithms that have recently come into action, which provided us a clear idea about why we should or should not go for such methods before designing our very own model. It is high time we focus on more relatable recommendations if we want our lives to be easier. We still stick to the fact that no machine can read a person’s mental state completely, but we can still strive to achieve as much closeness to the human mind as possible. All of the earlier men- tioned algorithms show a clear indication of how far we’ve reached in comprehend- ing people’s choices, but it all depends on the purpose for which a recommendation system has to be created. Personally, we can understand that recommendation systems are made for an indi- vidual rather than for a cohort; the sole purpose of mentioning emotional and conver- sational recommendation approaches at the end of the chapter was to convey an idea to the outside world of merging these two technical algorithms to create a hybrid one. The emotional intelligence calculator of the former can be used to integrate vectors in the graph of the NLP model the latter created, which then can be used to fgure out recommendations more wisely and accurately. The main purpose of selecting these two algorithms was that they are some of the most integrity-based models and would thus be useful in making the matters simpler rather than more complicated.[17-18] REFERENCES 1. Debnath, Souvik, Niloy Ganguly, and Pabitra Mitra. “Feature weighting in content based recommendation system using social network analysis.” Proceedings of the 17th International Conference on World Wide Web, 2008. https://doi.org/10.1145/1367497. 1367646 2. Son, Jieun, and Seoung Bum Kim. “Content-based fltering for recommendation sys- tems using multiattribute networks.” Expert Systems with Applications 89 (2017): 404–412. 3. Alharthi, Haifa, and Diana Inkpen. “Study of linguistic features incorporated in a liter- ary book recommender system.” Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing, 2019. https://doi.org/10.1145/3297280.3297382 4. Pazzani, Michael J., and Daniel Billsus. “Content-based recommendation systems.” The Adaptive Web. Springer, Berlin, Heidelberg, 2007: 325–341. 5. Son, Jieun, and Seoung Bum Kim. “Content-based fltering for recommendation sys- tems using multiattribute networks.” Expert Systems with Applications 89 (2017): 404–412. 6. Pan, Weike, et al. “Mixed factorization for collaborative recommendation with hetero- geneous explicit feedbacks.” Information Sciences 332 (2016): 84–93. 7. Hospedales, Timothy, et al. “Meta-learning in neural networks: A survey.” arXiv pre- print arXiv:2004.05439 (2020). 8. Saraswat, Mala, Shampa Chakraverty, and Atreya Kala. “Analyzing emotion based movie recommender system using fuzzy emotion features.” International Journal of Information Technology 12.2 (2020): 467–472. 9. Lee, Hoyeop, et al. “Melu: Meta-learned user preference estimator for cold-start rec- ommendation.” Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2019. https://doi.org/10.1145/3292500.3330859
  • 50.
    27 Comparison of Content-BasedRecommendation Methodologies 10. Dhelim, Sahraoui, et al. “A survey on personality-aware recommendation systems.” Artifcial Intelligence Review (2021): 1–46. 11. Jannach, Dietmar, et al. “A survey on conversational recommender systems.” ACM Computing Surveys (CSUR) 54.5 (2021): 1–36. 12. Habib, Javeria, Shuo Zhang, and Krisztian Balog. “Iai MovieBot: A conversational movierecommendersystem.” Proceedingsofthe29thACMInternationalConferenceon Information & Knowledge Management, 2020. https://doi.org/10.1145/3340531.3417433 13. Sun, Yueming, and Yi Zhang. “Conversational recommender system.” The 41st International ACM Sigir Conference on Research & Development in Information Retrieval, 2018. https://doi.org/10.1145/3209978.3210002 14. Pecune, Florian, Lucile Callebert, and Stacy Marsella. “A socially-aware conversa- tional recommender system for personalized recipe recommendations.” Proceedings of the 8th International Conference on Human-Agent Interaction, 2020. https://doi. org/10.1145/3406499.3415079 15. Mori, Hayato, et al. “Dialog-based interactive movie recommendation: Comparison of dialog strategies.” International Conference on Intelligent Information Hiding and Multimedia Signal Processing. Springer, Cham, 2017. 16. Berbatova, Melania. “Overview on NLP techniques for content-based recommender systems for books.” Proceedings of the Student Research Workshop Associated with RANLP 2019, 2019. DOI: 10.26615/issn.2603-2821.2019_009 17. Gawinecki, Maciej, et al. “What makes a good movie recommendation? Feature selec- tion for content-based fltering.” International Conference on Similarity Search and Applications. Springer, Cham, 2021. 18. Leng, Hongkun, et al. “Finding similar movies: Dataset, tools, and methods.” 2018. DOI: 10.24132/CSRN.2018.2802.15
  • 52.
    Neural Network-Based 3 CollaborativeFiltering for Recommender Systems Ananya Singh and Debajyoty Banik CONTENTS 3.1 Introduction .................................................................................................... 30 3.1.1 Role of AI/ML in Recommender Systems......................................... 30 3.1.2 Explicit and Implicit Feedback............................................................31 3.1.3 Ensemble v/s Joint Training.................................................................31 3.2 Algorithms for Collaborative Filtering............................................................31 3.2.1 Wide & Deep Learning Algorithm .....................................................31 3.2.1.1 The Wide Component...........................................................31 3.2.1.2 The Deep Component...........................................................32 3.2.1.3 Joint Training of Wide & Deep Model.................................32 3.2.2 Neural Graph Matching-Based Collaborative Filtering ......................33 3.2.2.1 Graph Neural Networks....................................................... 34 3.2.2.2 Graph Matching-Based Collaborative Filtering .................. 34 3.2.2.3 Graph Matching....................................................................35 3.2.3 Neural Factorization Machine.............................................................35 3.2.3.1 Factorization Machines.........................................................35 3.2.3.2 Deep Neural Network.......................................................... 36 3.2.3.3 Neural Factorization Machine ............................................. 36 3.2.4 Deep Factorization Machines..............................................................37 3.2.4.1 FM Component.....................................................................37 3.2.4.2 Deep Component ................................................................. 38 3.2.5 Neural Collaborative Filtering.............................................................39 3.2.5.1 Matrix Factorization .............................................................39 3.2.5.2 Generalized Matrix Factorization (GMF) ........................... 40 3.2.5.3 Multi-Layer Perceptron (MLP)............................................ 40 3.2.5.4 Fusion of GMF and MLP..................................................... 40 3.2.6 Feature Interaction Graph Neural Network........................................ 40 3.2.6.1 Embedding Layer..................................................................41 3.2.6.2 Multi-Head Self-Attention Layer ..........................................41 3.2.6.3 Feature Interaction Graph Neural Network..........................41 3.2.6.4 Attentional Scoring Layer.....................................................42 DOI: 10.1201/9781003319122-3 29
  • 53.
    30 Recommender Systems 3.2.7Automatic Feature Interaction Learning.............................................42 3.2.7.1 Input Layer............................................................................43 3.2.7.2 Embedding Layer..................................................................43 3.2.7.3 Interacting Layer...................................................................43 3.2.7.4 Output Layer ........................................................................ 44 3.2.8 L0-Statistical Interaction Graph Neural Network............................... 44 3.2.8.1 L0 Edge Prediction Model.................................................... 44 3.2.8.2 Statistical Interaction Graph Neural Network ..................... 44 3.2.9 Attentional Factorization Machines ....................................................45 3.2.9.1 Pair-Wise Interaction Layer ..................................................45 3.2.9.2 Attention-Based Pooling Layer.............................................45 3.3 Dataset ............................................................................................................ 46 3.3.1 MovieLens 1M.................................................................................... 46 3.4 Results............................................................................................................. 46 3.5 Conclusion .......................................................................................................47 References................................................................................................................ 48 3.1 INTRODUCTION Recommender systems are the emerging technologies that are used in EdTech, fash- ion, shopping, entertainment, and marketing industries. There are different types of recommender systems that have evolved with time: collaborative fltering-based recommender system, demographic-based recommender system, content-based rec- ommender system, utility-based recommender system, hybrid recommender system, and knowledge-based recommender system; however, collaborative fltering-based recommender system is the most extensively implemented. This chapter compares different algorithms for collaborative fltering. Collaborative fltering is the process in which the algorithms flter data from user ratings to generate personalized recommendations for those with similar likes. This system calculates recommendations based on the user’s (let’s call him/her our target user) previous interaction with different items. It then fnds users similar to our tar- get user and suggests the items that the similar users have interacted with and liked based on their ratings given to those items. 3.1.1 ROLE OF AI/ML IN RECOMMENDER SYSTEMS Artifcial intelligence (AI)/machine learning (ML) is widely used in recommenda- tion systems because AI can interpret a set of data and fnd unique patterns that help the system recognize what the consumer wants, and hence, it can suggest the products/services that they are highly susceptible to purchase. To be more specifc, recommendation systems are a set of machine learning algorithms that offer highly relevant subjects to the users. This gives the user a sense of credibility and rap- port with the system. This is important because user retention is highly desirable and, hence, is a must-have for every brand. Examples are Netfix, Amazon, and even social media platforms like Instagram. These websites use AI/ML algorithms to sug- gest better content, product, and services.
  • 54.
    31 Neural Network CollaborativeFiltering for Recommender Systems 3.1.2 EXPLICIT AND IMPLICIT FEEDBACK Recommender systems can be categorized into two types based on the feedback or data they gather, explicit feedback recommender systems, and implicit feedback recommender systems. An explicit feedback recommender system refers to the type of recommender system that gathers information directly from the user. This type of system is considered to be the best because the feedback comes directly from the user and, hence, is valuable. On the other hand, an implicit feedback recommender system refers to the type of recommender system that gathers data or information based on the behavior of the user. This is usually speculation and pattern-based and varies with the algorithm used. 3.1.3 ENSEMBLE V/S JOINT TRAINING Individual models in ensemble learning are trained independently, unaware of the other models present, and their outputs are integrated during inference but not during training; whereas joint training optimizes all the factors simultaneously and takes the deep and the wide parts of the model along with the weights of their total into consideration at the time of training. To provide appropriate clarity for ensemble learning to operate, every single model size must be big (since training for an ensem- ble is discontinuous). 3.2 ALGORITHMS FOR COLLABORATIVE FILTERING In this chapter, nine algorithms are compared on the dataset MovieLens 1M. In this section, all the algorithms are explained elaborately. 3.2.1 WIDE & DEEP LEARNING ALGORITHM There are two components to this algorithm: a wide part and a deep part.[1] For the job of recommendation, in this method a linear model is blended with a deep neural network. This method was introduced by Google to recommend mobile applications to its users. 3.2.1.1 The Wide Component It is regarded as a generalized linear algorithm. If one takes o as the output, i.e. the prediction, i as the input, i.e. the vector of features, p as the parameters of the model, and b as the bias, then the formula becomes: o = pTi + b (3.1) Cross product transformation is defned by: cmn c ⲫm(i) = ∏d i=1in mn ∈ {0,1} (3.2)
  • 55.
    Random documents withunrelated content Scribd suggests to you:
  • 56.
    CHAPTER X THE LAWIN EGYPT Penal code in Egypt of Mohammedan origin and derived from the Koran—The law of talion—Price of blood—Blood feuds and blood revenge—The courbash freely used to raise taxes—Old police in Cairo—Extensive reforms—Oppressive governors—Tyrannical rule of Ismail Pasha—Protection and security guaranteed to the fellaheen by British occupation—Prison reform—Tourah near Cairo—Labour at the quarries—Profitable workshops—Assiut prison—Life at Tourah—Attempts to escape—Convicts employed on the communication line in the Sudan campaign—Excellent sanitation and good hospital arrangements. The land of the Pharaohs has ever been governed by the practices and influenced by the traditions of the East. From the time of the Arab conquest, Mohammedan law has generally prevailed, and the old penal code was derived directly from the Koran. Its provisions were most severe, but followed the dictates of common sense and were never outrageously cruel. The law of talion was generally enforced, a life for a life, an eye for an eye, a tooth for a tooth. Murder entailed the punishment of death, but a fine might be paid to the family of the deceased if they would accept it; this was only permitted when the homicide was attended by palliating circumstances. The price of blood varied. It might be the value of a hundred camels; or if the culprit was the possessor of gold, a sum equal to £500 was demanded, but if he possessed silver only, the price asked was a sum equal to £300. The accomplices and accessories were also liable to death. Compensation in the form of a fine is not now permitted. A man who killed another in self-defence
  • 57.
    or to defendhis property from a depredator was exempt from punishment. Unintentional homicide might be expiated by a fine. The price of blood was incumbent upon the whole tribe or family to which the murderer belonged. A woman convicted of a capital crime was generally drowned in the Nile. Blood-revenge was a common practice among the Egyptian people. The victim’s relations claimed the right to kill the perpetrator, and relationship was widely extended, for the blood guiltiness included the homicide, his father, grandfather, great-grandfather and great- great-grandfather, and all these were liable to retaliation from any of the relatives of the deceased, who in times past, killed with their own hands rather than appeal to the government, and often did so with disgusting cruelty, even mangling and insulting the corpse. Animosity frequently survived even after retaliation had been accomplished, and blood-revenge sometimes subsisted between neighbouring villages for several years and through many generations. Revengeful mutilation was allowed by the law in varying degrees. Cutting off the nose was equivalent to the whole price of blood, or of any two members,—two arms, two hands, or two legs; the removal of one was valued at half the price of blood. The fine of a man for maiming or wounding a woman was just half of that inflicted for injuring a man, if free; if a slave the fine was fixed according to the commercial value of the slave. The whole price of blood was demanded if the victim had been deprived of any of his five senses or when he had been grievously wounded or disfigured for life. The Koran prescribed that for a first offence of theft the thief’s right hand should be cut off, and for a second, his left foot; for a third, the left hand; and for a fourth, the right foot. Further offences of this kind were punished by flogging, or beating with the courbash—a whip of hippopotamus hide hammered into a cylindrical form—or a stick upon the soles of the feet. The bastinado, in fact, was the familiar punishment of the East. Religious offences, such as apostacy and blasphemy, were very rigorously punished. In Cairo a person
  • 58.
    accused of thefts,assaults and so forth used to be carried by a soldier before the kadi, or chief magistrate of the metropolitan police, and sent on trial before a court of judicature, or if he denied his offence, or the evidence seemed insufficient for conviction, although good grounds for suspicion existed, he was bastinadoed to extort confession. He generally admitted his guilt with the common formula in the case of theft, “the devil seduced me and I took it.” The penalties inflicted less than death included hard labour on the public works, digging canals and the removal of rubbish or compulsory military service. The modern traveller in Egypt will bear witness to the admirable police system introduced under British rule, and to the security afforded to life and property in town and country by a well organised, well conducted force. In former days, under the Pashas, the whole administration of justice was corrupt from the judge in his court to the police armed with arbitrary powers of oppression. The chief of police in Cairo was charged with the apprehension of thieves and criminals and with his myrmidons made constant rounds nightly through the city. He was accompanied by the public executioner and a torch-bearer who carried a curious light that burned without flame unless waved through the air, when it burst suddenly forth; the burning end was sometimes hidden in a small pot or jar and when exposed served the purpose of a dark lantern. The smell of the burning torch often gave timely warning to thieves to make off. The chief of the police arrogated to himself arbitrary powers, and often put a criminal to death when caught, even for offences not deserving capital punishment. A curious custom obtained in old Cairo; it was the rule for the community of thieves to be controlled by and to obey one of their number, who was constituted their sheik and who was required by the authorities to hunt up offenders and surrender them to justice. In old times the administration of the country districts was in the hands of governors appointed by the Pasha and charged by him with the collection of taxes and the regulation of the corvee, or system of
  • 59.
    enforced or unremuneratedlabour, at one time the universal rule in Egypt. The prompt and excessive use of the stick or courbash was the stimulus by which the contributions demanded were extorted, and the sheik, or headman of a village, might be severely bastinadoed when the sum demanded ran short. Everything was taxed, particularly the land and its products, wholly or in part, or they were sometimes seized outright and sold at a fixed price, but impounded to make good the debts of the cultivators to the government. Taxes were also levied in kind,—butter, honey, wax, wood, baskets of palm leaves and grain. The government granaries were kept full by the last named exaction and in this regard an amazing story is told. The governor of the district and town of Tanta, when visiting the granary, saw two fellaheen resting who had just deposited their tale of corn. One had brought in 130 ardebbs (equivalent to five English bushels) from a village at a distance, the other only 60 ardebbs from some land adjoining the town. The governor at once fell foul of the defaulter, and utterly ignoring the townsman’s protest that his was a daily and the countryman’s a weekly contribution, ordered the man of Tanta to be forthwith hanged. The next day the governor paid a second visit to the granary and saw a peasant delivering a large quantity of corn. Being much pleased, he inquired who the man was and heard that it was he who had been summarily executed the day before and who now produced 160 ardebbs of grain. “What, has he risen from the dead?” cried the governor, astounded. “No, Sir; I hanged him so that his toes touched the ground; and when you were gone, I untied the rope; you did not order me to kill him,” replied his subordinate. “Aha,” answered the governor, “hanging and killing are different things. Next time I will say kill.” “To relate all the oppressions which the peasantry of Egypt endure,” says Mr. E. W. Lane, the authority for the foregoing, “from the dishonesty of the officials would require too much space in the present work. It would be scarcely possible for them to suffer more and live.” Yet a worse time was approaching, when the notorious
  • 60.
    Ismail Pasha becamepractically supreme ruler and used his unchecked power for the complete enslavement of Egypt. His methods of misgovernment, his robbery, spoliation and cruel oppression are now matters of history. This modern Sardanapalus, as he has been aptly styled, lavishly wasted the wealth he wrung out of his helpless subjects by the intolerable rapacity of his ferocious tax gatherers. The fellaheen were stripped to the skin to fill his coffers and feed the boundless extravagance of a vain and licentious prince. His private property was enormous; his estates and factories were valued at sixty millions sterling; he owned forty-three palaces and was building more when, in a few short years, he had brought Egypt to the brink of ruin, and the people starved at his door. The people of Egypt not only paid taxes, but their possessions were seized ruthlessly, their lands misappropriated, their cattle and goods confiscated; they were mere slaves whose right to work on their own account was forfeited; and the whole population was driven forth from their villages with whips, hundreds of thousands of men, women and children, under the iniquitous system of enforced labour, to make roads through the Khedive’s estates, till the cotton fields and build embankments to control the distribution of the life-giving Nile. No escape from these hardships was possible, no relief from this most grievous Egyptian bondage. The arbitrary despot backed his demands by a savage system of punishments, and when the courbash was ineffectual, he banished malcontents to the remote provinces of central Africa, where, after a terrible journey, they expiated their offences at Fazoglo or Fashoda. Sometimes the highest officials were arrested and despatched in chains, without any form of trial, and were detained for years in this tropical Siberia. To speak of the Nemesis that eventually overtook Ismail and deprived him with ignominy of a power he so shamefully misused is beyond the scope of this work. But reference must be made in some detail to the many merciful changes introduced into the administration of justice under the British protectorate that has succeeded to Egyptian rule.
  • 61.
    In Egypt, atthe present time, every son of the soil is safe from arbitrary and illegal arrest; the imposition of taxes is regulated strictly according to law; there is no enforced labour,—the corvee has been absolutely swept out of existence. Every peaceably disposed citizen may live sheltered and protected from outrage and in the undisturbed enjoyment of his possessions, waxing rich by his own exertion, safe from the attack or interference of evil-doers. It was not always so, and the great boons of personal security and humane, equitable treatment now guaranteed to every soul in the land have been only slowly acquired. Until 1844 the Egyptian police was ineffective, the law was often a dead letter, and the prisons were a disgrace to humanity and civilisation. Before that date the country was covered with zaptiehs, or small district prisons, in which illegal punishment and every form of cruelty were constantly practised. It was quite easy for anyone in authority to consign a fellah to custody. One of the first of the many salutary reforms introduced by the new prison department established under British predominance was an exact registration of every individual received at the prison gate, and the enforcement of the strict rule that no one should be admitted without an order of committal duly signed by some recognised judicial authority. To-day, of course, any such outrage as illegal imprisonment is out of the question. Another form of oppression in the old days was the unconscionable delay in bringing the accused to trial. Hundreds were thus detained awaiting gaol delivery for six or nine months, sometimes for one or two years. At that time, too, there was no separation of classes; the innocent were herded with the guilty, children with grown men; only the females, as might be expected in a Mohammedan country, were kept apart, but their number then and since has always been exceedingly few. The first step taken by the new régime was to concentrate prisoners in a certain number of selected prisons, such as they were, but the best that could be found. In these, twenty-one in number, strenuous efforts were made to introduce order; cleanliness was insisted upon and disinfectants were largely used, while medical men were
  • 62.
    appointed at eachplace, who attended daily to give medicine and move the sick into hospital. The health of the prisoners was so much improved that they constituted one per cent. of the daily average of prisoners, and this ratio has been maintained, so that in the cholera epidemic in 1896 only a few convicts died. A good prison system could only be introduced in improved prisons, and the first created was the great convict establishment at Tourah, a village about eight miles above Cairo on the banks of the Nile and at the foot of the great limestone quarries that have supplied the city with its building material from the earliest days. In 1885 the old military hospital at Tourah was handed over to be converted into a public works prison; a few of the wards were converted into cells, and a draft of 250 convicts was brought from the arsenal at Alexandria to occupy them. These proved skilful workmen, as the fellaheen, whether captive or free, invariably are, and with the help of a few paid stone-masons they restored the half-ruined upper story of the ancient building and converted it into a satisfactory prison to hold one hundred and fifty more inmates. The four hundred steadfastly continued their labours and to such good purpose, demolishing, removing, cleaning, and constructing new roads and approaches, that in May, 1886, an entirely new prison for five hundred convicts was completed and occupied. Many forms of industry were carried on with excellent financial results, as will be seen from the following details. All the lime for buildings was burned in two lime kilns constructed for the purpose; all the furniture and woodwork, the tables, beds and doors were made by convict carpenters; all the ironwork, the bolts and bars for safe custody, the very leg-irons, their own inalienable livery under the old Egyptian prison code, were turned out by convict blacksmiths; and hundreds of baskets for carrying earth and stone have been manufactured. The industrial labour at Tourah is now of many useful kinds. New prison clothing, new boots (although these usually indispensable articles are only issued to a favoured few prisoners in Egypt), the baking of bread and biscuit for home
  • 63.
    consumption, or tobe sent to out-stations, plate laying and engine fitting, stone dressing for prison buildings, both at Tourah and elsewhere,—all these are constantly in progress at the Tourah prison. The money made in the prison provides funds for many things necessary for further development, such as tram lines, locomotives, improved tools and machinery of all kinds. A visit to Tourah is both interesting and instructive. The chief employment of the convicts is in the quarries, a couple of miles from the prison, to which the gangs proceed every morning at daylight and where they remain every day of the week but Friday, which is their Sabbath, until four o’clock in the afternoon. There is no time wasted in marching to and fro. The dinner, or midday meal, is carried out to the quarries by the cooks, and after it is eaten the convicts are allowed an hour’s rest in such shade as can be found in the nearly blinding heat of the dazzling white quarries. As this midday siesta is the common hour for trains to pass on to the neighbouring health resort of Helouan, casual observers might think that rest and refreshment formed a great part of the Egyptian convict’s daily life. But that would be a grievous mistake. During the hours of labour, ceaseless activity is the rule; all around the picks resound upon the unyielding stone; some are busy with the levers raising huge blocks, stimulated by the sing-song, monotonous chant, without which Arabs, like sailors, cannot work with any effect. The burden of the song varies, but it is generally an appeal for divine or heavenly assistance, “Allahiteek!” “May God give it,” the phrase used by the initiated to silence the otherwise too importunate beggar, or “Halimenu,” “Hali Elisa,” ending in an abrupt “Hah!” or “Hop!” at the moment of supreme effort. A visitor of kindly disposition is not debarred from encouraging effort by the gift of a few cigarettes to the convicts. Tobacco is not forbidden in the prisons of Egypt. It is issued to convicts in the works prisons in small rations as a reward, according to the governor’s judgment. The unconvicted and civil prisoners undergoing merely detention are at liberty to purchase it. I was the witness, the
  • 64.
    cause indeed, ofa curious and unwonted scene in the small prison at Assiut when I inspected it in 1898. The sale of tobacco was in progress in the prison yard, where all of the prisoners, a hundred and more, were at exercise. An official stood behind a small table on which lay the little screws of tobacco for disposal, each for a few milliems, the smallest of Egyptian coins, the fractional part of a farthing. The eagerness with which the poor prisoners eyed the precious weed excited my generosity, and I bought up the whole table load, then and there, for a couple of shillings. The prisoners crowding around saw the deal and understood it. Hardly had I put down the ten piastres when the whole body “rushed” the table, overset it, threw the screws of tobacco upon the ground, and all hands pounced down on the scattered weed in one great struggling, scrambling, combatant medley. The tobacco was quite wasted, of course, and I have no idea who got the money. The mêlée was so unmanageable that it was necessary to call out the guard to drive the prisoners back to their wards. I was aghast at my indiscretion and ready to admit that I should have known better. The daily unremitting toil of Tourah must be preferable to all but the incurably idle. Yet the terror of “Tourah” is now universal up and down Egypt. It is the great “bogey” of the daily life among the lower classes, the threat held over the fractious child or the misconducted donkey boy who claims an exorbitant “bakshish.” To accuse any decent fellah of having been in Tourah is the worst sort of insult and at once indignantly denied. When my own connection with the English prisons became known, I was generally called the pasha of the English Tourah, and my official position gained me very marked respect among classes spoiled by many thousands of annual tourists,—the greedy guides and donkey boys, the shameless vendors of sham curiosities, the importunate beggars that infest hotel entrances, swarm in the villages and make hideous the landing stages up the Nile. An old hand will best silence a persistent cry for alms or the wail of miski (poverty stricken), of “Halas! finish father, finish mother” (the ornate expression for an orphan), by talking of the caracol, “police station,” and a promise of “Tourah” to follow.
  • 65.
    Life in Tourahmust be hard. The monotonous routine from daylight to sundown, the long nights of thirteen or fourteen hours, from early evening to morning, caged up with forty or fifty others tainted with every vice and crime, must be a heavy burden upon all but the absolutely debased. The evils of association, of herding criminals together, left to their own wicked devices, without supervision, were present in the highest degree in Egyptian prisons. At last, however, a move was made to provide separate cells for a certain number, and a new prison of 1,200 cells was built by convict labour at Tourah immediately opposite the new hospitals and at some distance from the old prison. Much mischievous conspiracy of the worst kind is prevented by keeping individuals apart during the idle hours of the night, for it was then that those concerted escapes of large numbers were planned, which have occurred more than once at Tourah, but have been generally abortive, ending only in bloodshed; for the black Sudanese, who form the convict guards, are expert marksmen and surely account for a large part of the fugitives. There must be something very tempting to the untutored mind—and many of these Tourah convicts are half-wild creatures, Bedouins of the desert or the lowest scum of the cities—in the seeming freedom of their condition during so many hours of the day. Liberty seems within easy reach. Not a mile from the quarries are great overhanging cliffs, honey-combed with caves, deep, cavernous recesses affording secure hiding places, and it is for these that the rush is made. In August of 1896 there was a serious attempt of this kind, and success was achieved by some of the runaways. The hour chosen was that of the break-off from labour, when the gangs, surrounded by their guards, converge on a central point, very much as may be seen on any working-day at Portland or Dartmoor, and thence march home in one compact body to the distant prison. It is a curiously picturesque scene. The convicts, mostly fine, stalwart men, their ragged, dirty white robes flying in the wind and their chains rattling, swing past, two by two, in an almost endless procession. Below, the mighty river, flowing between its belt of palm and narrow fringe of green, shines like burnished silver under the
  • 66.
    declining sun; beyondstretches the wide desert to the foot of the Pyramids, those of Sakhara at one end of the landscape, those of Cheops at the other,—colossal monuments of enforced labour very similar to that now surviving at Tourah. Such was the moment chosen for a general stampede. About sixty or seventy convicts agreed to cut and run simultaneously, all toward the shelter of the hills. A few were told off to try conclusions with the armed guards, to wrest away the rifles and thus secure both immunity from fire and the power to use the weapon in self-defence. The attempt appears to have been fairly successful at first. A few rifles were seized, and the fugitives, turning on their pursuers, made some pretty practice, during which a few of the more fortunate got away. But authority finally asserted itself. Many were shot down; the rest were overtaken and immediately surrendered. The absence of “grit,” so characteristic of the race, showed itself at once, and these poor wretches, who had been bold enough to make the first rush under a hail of bullets, now squatted down and with uplifted hands implored for mercy or declared it was all a mistake. “Malesh, it does not matter,” was their cry then. But they no doubt found that it mattered a great deal when a few days later Nemesis overtook them in the shape of corporal punishment; for the lash, a cat of six tails, is used in the Egyptian prisons as a last resort in the maintenance of discipline and good order. It is only inflicted, however, under proper safeguards and by direct sentence of a high official. There is no courbash now in the prisons, and no warder or guard is permitted to raise his hand against a prisoner. Tyranny and ill-usage are strictly forbidden. Escapes have happened at other places. When military operations were in progress on the frontier leading to the revindication of the Sudan, an immense amount of good work was done by large detachments of convicts at stations high up the river. There were rough and ready “Tourahs” at Assuan, Wady Halfa, Korosko, Suakin, El Teb, points of considerable importance in the service of the campaign, where supplies were constantly being landed, stored or
  • 67.
    sent forward tothe front. The Egyptian prison authorities very wisely and intelligently utilised the labour at their disposal to assist in unloading boats and in reshipping stores and railway plant. Numbers of convicts were employed to construct the railway ahead in the direction of Abu Hamed by which the advance was presently made. The Nile above Merawi flows through the most difficult country in its whole course, the very “worst water,” and no navigation in that length was possible by steamers, little or none by small boats except at high Nile and then only by haulage. It was necessary, therefore, to complete the railway to Abu Hamed, so that gunboats might be sent up in sections over the line, to be put together above the cataracts and then utilised in the final advance, for the river is more or less open to Berber and on to Khartum, and the success of the campaign was greatly facilitated thereby. Egyptian convicts did much good work of a superior kind. Now and again a trained handicraftsman was found who was willing to put forward his best skill and there was always a smart man ready to act as leader and foreman of the rest, as is very much the case, indeed, with convicts all over the world. One man in particular at Wady Halfa was well known as a most industrious and intelligent worker. He so gained the good-will of the British officers that, not knowing his antecedents, many of them strongly recommended him for release as a reward for his usefulness. But the prison authorities were unable to accede to this seemingly very justifiable request. This best of prisoners (again following experience elsewhere) was the worst of criminals. He had committed no fewer than eight murders, possibly not with malicious motives, or he would hardly have escaped the gallows. The death penalty is not, however, inflicted very frequently in Egypt. In one case worth mentioning as illustrating the almost comical side of Egyptian justice, a man sentenced to death was held to serve a short term of imprisonment for some minor offence before he was considered ripe for execution. When the short sentence was completed, he was incontinently hanged.
  • 68.
    At Assuan duringwar time hundreds of convicts were engaged all day long under the windows of the hotel. Their rattling chains were heard soon after dawn mixed with their unmelodious sing-song as described above. They could be seen constantly and freely approached, as they clustered around the great crane that raised the heaviest weights, locomotives, tender, and boilers, from the boats moored below, or as they passed along in single file backward and forward between the beach and the railway station or storehouses near-by. All were in picturesque rags, except the military prisoners, dressed in a startling uniform of bright orange; all wore the inevitable leg-irons riveted on their spare, shrunken brown ankles. It was the custom once, as in the old French bagnes, to chain the Egyptian convicts in couples, a long-term man newly arrived being chained with one whose sentence had nearly expired. This practice has now been discontinued, and each unfortunate bears his burden alone. Much ingenuity is exercised to prevent the basils or anklets from chafing the skin. The most effective method, employed no doubt by the most affluent, was a leather pad inserted within the iron ring; others without resources, owning not a single milliem in the world, used any filthy rags or scraps of sacking they could beg or steal. Pads of this kind have been worn from time immemorial by all prisoners and captives; no doubt the galley slaves chained to the oar in classical days invented them, and they were known until quite lately in the French bagnes of Rochefort and Toulon by the name of patarasses, which the old hands manufactured and sold to the newcomers. Another old-fashioned device among the Egyptian convicts is the short hook hanging from a waistband, which catches up one link of the irons, a simple necessity where the chain is of such length that it drags inconveniently along the ground. The general use of fetters is not now approved by civilised nations. But in Egypt they appear to be nearly indispensable for safe custody. The removal of the leg-irons from convicts has often encouraged them to effect escape. Once sixteen of them at Assuan were astute
  • 69.
    enough to shamillness. It was during the cholera epidemic, and they knew enough of the symptoms to counterfeit some of them cleverly. The medical officer in charge was compassionate and thought it cruel that his patients should die in their chains, so he had them struck off. Within a few hours the unshackled convicts gave their guardians leg-bail, and escaped from the hospital into the desert, and so down the river. These very men afterward formed the nucleus of the band of harami, the robbers and brigands who terrorised the lower province for some months and were only disposed of at last by summary action. The story of the subsequent burning of the brigands at Belianah became public property and was made the occasion of one of those virulent attacks upon British rule that often found voice under the unrestrained license of the Egyptian press. These out-laws were pursued and overtaken at last by the police in a house where they had barricaded themselves. It was impossible to break in, and the assailants therefore set fire to the thatched roof. The robbers used this as their private arsenal, and the fire soon ignited their cartridges with a terrific explosion in which most of the defenders lost their lives. This practice of concealing explosives in the roof was not uncommon during the days of conflict with the Mahdi. When the sheik of Derowi was arrested on a charge of conveying contraband ammunition into the Sudan, he contrived to send back a message to his wife to make away with all damaging evidence. She thought the safest way to dispose of the gunpowder stored in the house was by fire and at the same time she also disposed, very effectually, of herself. A striking feature at Tourah was the admirable prison hospital, which would compare favourably with the best in the world. It is a two- storied building with lofty, well-ventilated wards, beds and bedding, all in the most approved style; a well-stocked dispensary and a fully qualified medical man in daily attendance. The patients, unless too ill to rise, sit up on their beds rather like poultry roosting, and suffer from most of the ills to which humanity is heir. The complaints most prevalent are eczema, tuberculosis (the great scourge of the black prisoners from the south), ophthalmia, and dysentery. “Stone” is a
  • 70.
    malady very prevalentand showing itself in the most aggravated form, due no doubt to the constant drinking of lime-affected water. I saw calculi of almost colossal size, the result of some recent operations, extracted by the prison surgeons, whose skill is evidently remarkable. Too much praise can hardly be accorded the Egyptian prison administration for its prompt and effective treatment of the cholera epidemic when it appeared in Egypt in 1896. Although the mortality was serious in the general population, the percentage of deaths was relatively small in the prisons. Out of a total of 7,954 prison inmates (this number did not include the convicts at the seat of war or on the Red Sea) there were only one hundred and sixteen cases and seventy deaths. In six of the prisons the disease did not appear; in others, although situated in the heart of infected towns, and prisoners were being constantly received from infected districts, the cases were few. In Tourah, with a total population of thirteen hundred and fifty, there were but twenty-two; at Assiut, a new building with good sanitation, only two; the average was largest at Keneh, Mansourah and Assuan. Not a single female prisoner was attacked; an immunity attributed to the fact that the females in custody receive regular prison diet, while the males, except at Tourah and Ghizeh, are fed, often indifferently, by their friends outside. These excellent results were undoubtedly due to the strict isolation of the inmates of any prison in which the cholera had appeared. Whenever a case showed, the introduction of food or clothing from outside was strictly forbidden, and friends were not admitted when cholera existed in the neighbourhood. Much credit was due also to the unselfish devotion of the Egyptian medical staff, who were unremitting in their care and of whom two died of the disease at their posts. It was officially stated in 1903 that such crimes as robbery with violence, petty thefts and brigandage had increased materially since 1899. The reason given for this was the failure of the police machinery to bring out the truth and the practice of bribes which
  • 71.
    was everywhere prevalent.The corruption of magistrates and the terrorism held over witnesses make it exceedingly difficult to bring a man to justice or obtain satisfactory convictions. But we may well conclude that the prison system as established in Egypt to-day is of the most modern and satisfactory character.
  • 72.
  • 73.
    CHAPTER XI TURKISH PRISONS Oldcastles used as prisons—The Castle of Europe—The Seven Towers and the “Well of Blood”—The Seraglio and the Bagnio— The Zaptie—Lack of prison discipline—Midhat Pasha and the Constitution—His disgrace and death—The Young Turk movement—Horrible massacres at Adana—The provincial prisons all bad—Fetters and other modes of torture—Little improvement under new sultan. There are few notable buildings in Turkey constructed primarily as prisons. In fact there are few buildings of any sort constructed for that purpose. But every palace had, and one may almost say, still has its prison chambers; and every fortress has its dungeons, the tragedies of which are chiefly a matter of conjecture. Few were present at the tortures, and in a country where babbling is not always safe, witnesses were likely to be discreet. In and around Constantinople, if walls had only tongues, strange and gruesome stories might be told. On the Asiatic side of the Bosporus still stand the ruins of a castle built by Bayezid I, known as “the Thunderbolt” when the Ottoman princes were the dread of Europe. Sigismund, King of Hungary, had been defeated, and Constantinople was the next object of attack, though not to fall for a half century. This castle was named “the Beautiful,” but so many prisoners died there of torture and ill-treatment that the name “Black Tower” took its place in common speech.
  • 74.
    Directly opposite, onthe European side of the Bosporus, is Rumili Hissar, or the Castle of Europe, which Muhammad II, “the Conqueror,” built in 1452 when he finally reached out to transform the headquarters of Eastern Christendom into the centre of Islam. The castle was built upon the site of the state prison of the Byzantine emperors, which was destroyed to make room for it. The three towers of the castle, and the walls thirty feet thick, still stand. In the Tower of Oblivion which now has as an incongruous neighbour, the Protestant institution, Robert College, is a fiendish reminder of days hardly yet gone. A smooth walled stone chute reaches from the interior of the tower down into the Bosporus. Into the mouth of this the hapless victim, bound and gagged perhaps, with weights attached to his feet, was placed. Down he shot and bubbles marked for a few seconds the grave beneath the waters. The Conqueror built also the Yedi Kuleh, or the “Seven Towers,” at the edge of the old city. This imperial castle, like the Bastile or the Tower of London, was also a state prison, though its glory and its shame have both departed. The Janissaries who guarded this castle used to bring thither the sultans whom they had dethroned either to allow them to linger impotently or to cause them to lose their heads. A cavern where torture was inflicted and the rusty machines which tore muscles and cracked joints, may still be seen. The dungeons in which the prisoners lay are also shown. A small open court was the place of execution and to this day it is called the “place of heads” while a deep chasm into which the heads were thrown is the “well of blood.” Several sultans, (the exact number is uncertain) and innumerable officers of high degree have suffered the extreme penalty here. It was here too that foreign ambassadors were always imprisoned in former days, when Turkey declared war against the states they represented. The last confined here was the French representative in 1798.
  • 75.
    Another interesting survivalof early days is the Seraglio, the old palace of the sultans, and its subsidiary buildings, scattered over a considerable area. In the court of the treasury is the Kafess, or cage, in which the imperial children were confined from the time of Muhammad III, lest they should aspire to the throne. Sometimes however the brothers and sons of the reigning sultan were confined, each in a separate pavilion on the grounds. A retinue of women, pages and eunuchs was assigned to each but the soldiers who guarded them were warned to be strict. The present sultan was confined by his brother Abdul Hamid within the grounds of the Yildiz Kiosk, where he had many liberties but was a prisoner nevertheless. Absolutism breeds distrust of all, no matter how closely connected by ties of blood. An interesting prison was the old Bagnio, once the principal prison of Constantinople. The English economist, N. W. Senior, describes it as it was sixty years ago, in his “Journal.” It was simply an open court at one end of which was a two-story building. Each story was composed of one long room divided into stalls by wooden partitions, the whole, dark, unventilated and dirty beyond description. Some turbulent prisoners were chained in their stalls which they were not permitted to leave. The chief interest lay in the court-yard, however, which was the common meeting place. No rules as to cleanliness or regularity of hours existed. No one was compelled to work and the great majority preferred to lounge in the sun. In the court were coffee and tobacco shops, while sellers of sweetmeats made their way through the crowds. Though capital punishment was nominally inflicted, it was never imposed unless there were eye witnesses of the crime, and seldom then. So of the eight hundred inmates of the Bagnio, six hundred were murderers, some of them professionals. Nearly all wore chains, some of which were heavy, and as several prisoners were attached to one chain occasionally conflicts arose as different members of the group exhibited divergent desires.
  • 76.
    Another visitor aboutthe same time saw the picturesque side. He mentions the robbers, chiefs from Smyrna, stalking about the enclosure, the voluble Greeks and Armenians, the secretive Jews, and an Irishman or two, mingling with the stolid Turks. Inmates were sipping coffee, smoking, playing cards, disputing, fighting, while a furtive pickpocket made his rounds. In a corner a fever patient was stretched out oblivious to his surroundings, though the clamour sometimes was deafening. He goes on to say: “Yet physically the wretches were not ill-treated; they need not ever work unless they like. The court is small and so is the two-storied stable where they sleep upon the earth; but then these are men who perhaps never got between sheets nor lay on a bed in their lives. They may talk what they like, and when they like. They have a Mosque, a Greek chapel and a Roman Catholic chapel. They can have coffee and tobacco, and if they work they are supposed to be paid for it. There is no treadmill, no crank, there are no solitary cells.” The same observer describes the Zaptie or House of Detention as it then existed, and though the building as it exists to-day is improved, conditions are not essentially different. Then there were two communicating courts, where pickpockets, ordinary thieves, participants in affrays, and even murderers were confined. At night they were locked in rooms. One of these sleeping rooms, eleven by seventeen feet, was occupied at night by twelve men. In such places prisoners were kept an indefinite time awaiting trial, and perhaps then discharged without trial and without explanation. A large number of Turkish prisoners have been confined either for conspiracy against the government, or for daring to exhibit a certain amount of independence. An officer apparently high in favour to-day might be degraded on the next without warning. An interesting case of this kind is the case of Midhat Pasha, one of the best known men in Turkey thirty or forty years ago.
  • 77.
    He was oneof the little group of Turks who adopted European ideas after the Crimean war. He was a friend of England as opposed to Russia and the influence of the latter state was thrown against him. He was one of the ministers by whom the sultan, Abdul Aziz, was dethroned. This prince soon afterward died, possibly by suicide, though ugly rumours were heard. When Murad, the incompetent, was also deposed Midhat had a hand in the affair. On the accession of Abdul Hamid he was again made Grand Vizier, and secured the promulgation of the famous Turkish constitution of 1876, against the will of the sultan. When Abdul Hamid felt himself firm in his seat in 1877, he banished Midhat, but recalled him the next year, and made him governor- general, first of Syria and then of Smyrna. The constitution was practically abrogated by this time. Then without warning he was arrested in May, 1881, charged with being concerned in the murder of Abdul Aziz. He with others was quickly tried by a special court, was found guilty and condemned to death. The sentence was changed to imprisonment for life, and the place of confinement was fixed at Taïf, in Arabia, a small place south of Mecca. There he and his companions who had received similar sentence, including a former Sheikh-ul-Islam, Hassan Haïroullah, were at first allowed the freedom of the castle. Their servants bought and cooked their food, and though the rude accommodations were somewhat trying to the old men, conditions were endurable. A change in treatment was foreshadowed by a change in gaolers. The privilege of buying food was taken away, and they were expected to eat the coarse fare of the common soldier. They were forbidden to communicate with one another. For a time the faithful servant was refused access to Midhat’s person, though this order was afterward revoked. Poison was discovered in the milk, and in a pot of food. The servant was offered large sums to poison him, but the faithful attendant only redoubled his vigilance. Finally when hardship, separation from family and friends, and dread of the
  • 78.
    future, seemed unableto destroy his life more primitive measures were taken. After enduring two years of such treatment he was strangled one morning while still in bed, together with two of his friends. Such was the dread inspired by the sultan, that no one dared to inquire or to make public his fate. A letter from his friend, the Sheikh-ul-Islam, to the family of Midhat was, however, published a few years ago and then the whole truth became known. The case of Midhat was not exceptional, except for his prominence in European circles. The same fate has overtaken many others. Fishermen in the Bosporus, every now and then, pulled up a sack in which a body was sewn, and those who reasoned might remember that it had been announced that a one time favourite at the Court had set out on a journey to London or Paris, though somehow he had mysteriously failed to arrive. But though Midhat Pasha and others who struggled to introduce Western institutions into the borders of the East died their work lived. One by one, those suspected of having advanced ideas were degraded. A man might be Grand Vizier for a month or a week, or even for a day, and then without warning, be dismissed in disgrace. The suspicious sultan trusted no one. He set brother to watch brother, father to spy upon son, and then believed none of them, though he always guarded himself lest they might be telling the truth. Paris received the larger number of those who fled from the clutches of Abdul the Damned. In the life of the French capital, some gave themselves up to the manifold dissipations which that city offers for her visitors. Others loosely organised, worked and watched for that better day, when the Turk should no longer be a byword among civilised peoples. A newspaper edited by Ahmed Riza was published and thousands of copies were smuggled into the dominions. Hundreds of thousands of pamphlets somehow passed the Turkish frontiers and found readers, though their possession if discovered
  • 79.
    meant imprisonment anddegradation, but the “Young Turks” were undismayed. Into the harems the new ideas crept. One read to the others during the long days, and the forbidden books passed from hand to hand, and from house to house. Women high in rank, the daughters of court officials, carried messages. Where a man seemed approachable on that side, some member of his harem was converted, or else some woman was placed in his way, even sold to him, perhaps. Dozens of women sold into the harems of prominent men went as apostles of the new faith. Women deliberately sacrificed their reputations, since free association with men, unless supposedly lovers, would have aroused suspicion. The army became infected, the officers first. During 1907, the third army corps in Macedonia became thoroughly permeated. Of course the cruel autocrat knew something of all this, for his spies were everywhere, but he misjudged the extent. He had seen dissatisfaction and unrest before, and he had crushed them by sudden blows. Perhaps he was tired, and less acute than he had been twenty years before. At any rate he waited too long before taking vigorous action. Early in 1908 he ordered the higher officers of the army to quiet the unrest. A beloved officer raised the standard of revolt in Macedonia, and the soldiers refused to fire upon the rebels. The Committee of Union and Progress, as the “Young Turk” movement was called, assumed charge of the revolt and demanded the restoration of the constitution, which the sultan refused. Agents were sent to enforce his commands, but they were forced to flee for their lives, and officers not in sympathy with the movement were threatened. Thoroughly alarmed by the defection of the army, the cowardly sultan pretended to yield and on July 24, 1908, the constitution was restored.
  • 80.
    Too much perhapswas expected of the Parliament. The fanatical Moslem leaders spread rumours of every sort, and the sultan’s agents were everywhere active, distilling doubt and suspicion into the soldiers and populace. In April, 1909, the garrison at Constantinople rose, dispersed the Parliament, and the wily sultan seemed again in control. The army in Macedonia was still loyal to the new ideas, and was promptly mobilised. Within ten days Constantinople was again in control of the Young Turks. Abdul Hamid was evidently not to be trusted. The die was cast. His deposition was voted by the reassembled Parliament, and his brother who had long been a prisoner was placed on the throne, though the Young Turks, warned by their mishap, kept an effective veto on reaction in the form of the army. But the wily Abdul not only plotted to gain back his authority in Europe, but his agents fanned the flames of religious and racial hatred in Asia Minor. The Armenians were once a great nation, and though they have long been ground beneath the heel of the oppressor, they still cherish the idea that another great Christian nation will arise in Asia. They saw hope in the new régime and began to speak more freely, to exhibit pictures of their old kings, and to buy arms. The fierce Turks, Kurds, Arabs and Circassians looked upon the presumption of the “Christian dogs” with rage. Meanwhile agents of the Mohammedan League were everywhere stirring passion to fever heat, and on Tuesday, April 13, 1909, the conflict began in Adana, though not until the next day was the fighting general. For three days the contest raged, when soldiers appeared and a semblance of order was restored. Similar scenes had taken place in Osmanieh, Hamedieh, while at Tarsus the Armenians stood like sheep to be slain. On Sunday, April 25th, the slaughter again broke out at Adana. This time it was a massacre pure and simple, for the few Armenians who
  • 81.
    owned weapons hadeither fled, or else were almost without ammunition. Men, women, children were indiscriminately killed, houses were robbed and burned, until hardly a Christian home was left standing. Over the whole country fire and sword made a waste of what had been the home of a prosperous population. How many were killed can only be estimated. Some say thirty thousand. No estimate is less than half that number. An investigation was set on foot by Parliament after the instigator of the massacre had been sent with eight of his wives to live a prisoner at Salonica. The commission reported that it had hanged fifteen persons—fifteen persons for slaying fifteen thousand. Though much reduced during later years, the Turkish empire still stretches over three continents and the islands of the sea. Though penal conditions around Constantinople are bad, where diverse races and religions, far away from central control, must live together, trouble constantly exists. The Turk has always been weak in administration, and it is in these provincial prisons that the chief horrors are seen. For administrative purposes Turkey is divided into vilayets, which are subdivided into sanjaks or livas, and these into kazas. Each division has its prison. That of the last named corresponds roughly to the county gaol of the United States. In it accused persons awaiting trial and prisoners sentenced to short terms are confined. Graver crimes are punished by confinement in the prison of the sanjak or the vilayet. For special crimes and for certain kinds of political offences prisoners may be sent to Rhodes, Sinope, Tripoli and other similar points where old castles are usually the prisons. There is no common form of prison. Generally they are old ugly buildings, though in a few larger towns new and elegant structures have taken their place. In only one particular are they alike—they are all dirty, and are generally damp and unhealthful, because of slovenly attention and overcrowding. The prisons are usually in
  • 82.
    Welcome to ourwebsite – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com