To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
The Cambridge Handbook of Behavioural Data Science offers an essential exploration of how behavioural science and data science converge to study, predict, and explain human, algorithmic, and systemic behaviours. Bringing together scholars from psychology, economics, computer science, engineering, and philosophy, the Handbook presents interdisciplinary perspectives on emerging methods, ethical dilemmas, and real-world applications. Organised into modular parts-Human Behaviour, Algorithmic Behaviour, Systems and Culture, and Applications—it provides readers with a comprehensive, flexible map of the field. Covering topics from cognitive modelling to explainable AI, and from social network analysis to ethics of large language models, the Handbook reflects on both technical innovations and the societal impact of behavioural data, and reinforces concepts in online supplementary materials and videos. The book is an indispensable resource for researchers, students, practitioners, and policymakers who seek to engage critically and constructively with behavioural data in an increasingly digital and algorithmically mediated world.
This book presents a modern introduction to the field of algorithmic game theory. It places a heavy emphasis on optimization and online learning (a subdiscipline of machine learning), which are tools that increasingly play a central role in both the theory and practice of applying game-theoretic ideas. The book covers the core techniques used in several majorly successful applications, including techniques used for creating superhuman poker AIs, the theory behind the 'pacing' methodology that has become standard in the internet advertising industry, and the application of competitive equilibrium from equal incomes for fair course seat allocation in many business schools. With its focus on online learning tools, this book is an ideal companion to classic texts on algorithmic game theory for graduate students and researchers.
This Handbook is the first global comparative volume that examines the use of AI and digital technologies in courts. With contributions from over seventy academics, judges, and other professionals from over twenty-five countries, it provides an interdisciplinary and cross-jurisdictional perspective on how judicial institutions are responding to the opportunities and risks posed by AI. Covering judicial use of AI across domestic and regional jurisdictions in Europe, North and South America, Asia-Pacific and Africa, this Handbook begins with the premise that introducing AI into courts is not merely a technical upgrade but a constitutional reckoning and fresh call for judicial accountability. Each chapter examines not just what AI can do for courts, but what courts must do to ensure that AI tools enhance, rather than erode judicial values, justice and the rule of law.
Knowledge-infused learning directly confronts the opacity of current 'black-box' AI models by combining data-driven machine learning techniques with the structured insights of symbolic AI. This guidebook introduces the pioneering techniques of neurosymbolic AI, which blends statistical models with symbolic knowledge to make AI safer and user-explainable. This is critical in high-stakes AI applications in healthcare, law, finance, and crisis management. The book brings readers up to speed on advancements in statistical AI, including transformer models such as BERT and GPT, and provides a comprehensive overview of weakly supervised, distantly supervised, and unsupervised learning methods alongside their knowledge-enhanced variants. Other topics include active learning, zero-shot learning, and model fusion. Beyond theory, the book presents practical considerations and applications of neurosymbolic AI in conversational systems, mental health, crisis management systems, and social and behavioral sciences, making it a pragmatic reference for AI system designers in academia and industry.
The burgeoning field of differential equations on graphs has experienced significant growth in the past decade, propelled by the use of variational methods in imaging and by its applications in machine learning. This text provides a detailed overview of the subject, serving as a reference for researchers and as an introduction for graduate students wishing to get up to speed. The authors look through the lens of variational calculus and differential equations, with a particular focus on graph-Laplacian-based models and the graph Ginzburg-Landau functional. They explore the diverse applications, numerical challenges, and theoretical foundations of these models. A meticulously curated bibliography comprising approximately 800 references helps to contextualise this work within the broader academic landscape. While primarily a review, this text also incorporates some original research, extending or refining existing results and methods.
Providing a cohesive reference for advanced undergraduates, graduate students and even experienced researchers, this text contains both introductory and advanced material in extremal graph theory, hypergraph theory and Ramsey theory. Along the way, the book includes many modern proof techniques in the field such as the probabilistic method and algebraic methods. Several recent breakthroughs are presented with complete proofs, for example, recent results on the sunflower problem, and off-diagonal and geometric Ramsey theory. It is perhaps unique in containing material on both hypergraph regularity and containers. Featuring an extensive list of exercises, the text is suitable as a teaching text for a variety of courses in extremal combinatorics. Each of the two parts can form the basis of separate courses, and the majority of sections are designed to match the length of a single lecture.
This volume introduces the fundamental results and the state of the art in infinite duration games on graphs. These versatile game models first appeared in the study of automata and logic, but later became important for program verification and synthesis. They have many more applications. In particular, this book covers models from the fields of optimisation, reinforcement learning, model theory, and set theory. The material is presented at a level accessible to beginning graduate students, requiring only a basic understanding of discrete algorithms and graphs. The book's primary objective is constructing efficient algorithms for analysing different types of games. Rather than describe their implementation in full detail, it investigates their theoretical foundations and proves their properties and winning strategies. This tutorial reference from experts across the field is ideal for students, researchers, and professionals in logic and automata, verification and synthesis, and related fields.
• To understand the working principle of support vector machine (SVM).
• To comprehend the rules for identification of correct hyperplane.
• To understand the concept of support vectors, maximized margin, positive and negative hyperplanes.
• To apply an SVM classifier for a linear and non-linear dataset.
• To understand the process of mapping data points to higher dimensional space.
• To comprehend the working principle of the SVM Kernel.
• To highlight the applications of SVM.
10.1 Support Vector Machines
Support vector machines (SVMs) are supervised machine learning (ML) models used to solve regression and classification problems. However, it is widely used for solving classification problems. The main goal of SVM is to segregate the n-dimensional space into labels or classes by defining a decision boundary or hyperplanes. In this chapter, we shall explore SVM for solving classification problems.
10.1.1 SVM Working Principle
SVM Working Principle | Parteek Bhatia, https://youtu.be/UhzBKrIKPyE
To understand the working principle of the SVM classifier, we will take a standard ML problem where we want a machine to distinguish between a peach and an apple based on their size and color.
Let us suppose the size of the fruit is represented on the X-axis and the color of the fruit is on the Y-axis. The distribution of the dataset of apple and peach is shown in Figure 10.1.
To classify it, we must provide the machine with some sample stock of fruits and label each of the fruits in the stock as an “apple” or “peach”. For example, we have a labeled dataset of some 100 fruits with corresponding labels, i.e., “apple” or “peach”. When this data is fed into a machine, it will analyze these fruits and train itself. Once the training is completed, if some new fruit comes into the stock, the machine will classify whether it is an “apple” or a “peach”.
Most of the traditional ML algorithms would learn by observing the perfect apples and perfect peaches in the stock, i.e., they will train themselves by observing the ideal apples of stock (apples which are very much like apples in terms of their size and color) and the perfect peaches of stock (peaches which are very much like peaches in terms of their size and color). These standard samples are likely to be found in the heart of stock. The heart of the stock is shown in Figure 10.2.
• To define machine learning (ML) and discuss its applications.
• To learn the differences between traditional programming and ML.
• To understand the importance of labeled and unlabeled data and its various usage for ML.
• To understand the working principle of supervised, unsupervised, and reinforcement learnings.
• To understand the key terms like data science, data mining, artificial intelligence, and deep learning.
1.1 Introduction
In today’s data-driven world, information flows through the digital landscape like an untapped river of potential. Within this vast data stream lies the key to unlocking a new era of discovery and innovation. Machine learning (ML), a revolutionary field, acts as the gateway to this wealth of opportunities. With its ability to uncover patterns, make predictive insights, and adapt to evolving information, ML has transformed industries, redefined technology, and opened the door to limitless possibilities. This book is your gateway to the fascinating realm of ML—a journey that empowers you to harness the power of data, enabling you to build intelligent systems, make informed decisions, and explore the boundless possibilities of the digital age.
ML has emerged as the dominant approach for solving problems in the modern world, and its wide-ranging applications have made it an integral part of our lives. Right from search engines to social networking sites, everything is powered by ML algorithms. Your favorite search engine uses ML algorithms to get you the appropriate search results. Smart home assistants like Alexa and Siri use ML to serve us better. The influence of ML in our day-to-day activities is so much that we cannot even realize it. Online shopping sites like Amazon, Flipkart, and Myntra use ML to recommend products. Facebook is using ML to display our feed. Netflix and YouTube are using ML to recommend videos based on our interests.
Data is growing exponentially with the Internet and smartphones, and ML has just made this data more usable and meaningful. Social media, entertainment, travel, mining, medicine, bioinformatics, or any field you could name uses ML in some form.
To understand the role of ML in the modern world, let us first discuss the applications of ML.
• To understand the concept of artificial neural network (ANN).
• To comprehend the working of the human brain as an inspiration for the development of neural network.
• To understand the mapping of human brain neurons to an ANN.
• To understand the working of ANN with case studies.
• To understand the role of weights in building ANN.
• To perform forward and backward propagation to train the neural networks.
• To understand different activation functions like threshold function, sigmoid function, rectifier linear unit function, and hyperbolic tangent function.
• To find the optimized value of weights for minimizing the cost function by using the gradient descent approach and stochastic gradient descent algorithm.
• To understand the concept of the mini-batch method.
16.1 Introduction to Artificial Neural Network
Neural networks and deep learning are the buzzwords in modern-day computer science. And, if you think that these are the latest entrants in this field, you probably have a misconception. Neural networks have been around for quite some time, and they have only started picking up now, putting up a huge positive impact on computer science.
Artificial neural network (ANN) was invented in the 1960s and 1970s. It became a part of common tech talks, and people started thinking that this machine learning (ML) technique would solve all the complex problems that were challenging the researchers during that time. But sooner, the hopes and expectations died off over the next decade.
The decline could not be attributed to some loopholes in neural networks, but the major reason for the decline was the “technology” itself. The technology back then was not up to the right standard to facilitate neural networks as they needed a lot of data for training and huge computation resources for building the model. During that time, both data and computing power were scarce. Hence, the resulting neural network remained only on paper rather than taking centerstage of the machine to solve some real-world problems.
Later on, at the beginning of the 21st century, we saw a lot of improvements in storage techniques resulting in reduced cost per gigabyte of storage. Humanity witnessed a huge rise in big data due to the Internet boom and smartphones.
In various applications of computer vision and imageprocessing, it is required to detect points in animage, which characterize the visual content of thescene in its neighborhood and are distinguishableeven in other imaging instances of the same scene.These points are called key points of an image andthey are characterized by the functionaldistributions, such as distribution of brightnessvalues or color values, around its neighborhood foran image. For example, in the monocular and stereocamera geometries, various analyses involvecomputations of transformation matrices such as,homography between two scenes, fundamental matrixbetween two images of the same scene in a stereoimaging setup, etc. These transformation matricesare computed using key points of the same scenepoint of a pair of images. The image points of thesame scene point in different images of the sceneare called points ofcorrespondence or corresponding points. Key points ofimages are good candidates to form such pairs ofcorresponding points between two images of the samescene. Hence detection and matching of key points ina pair of images are fundamental tasks for suchgeometric analysis.
Consider Fig. 4.1, where images of the same scene arecaptured from two different views. Though theregions of structures in the images visuallycorrespond to each other, it is difficult toprecisely define points of correspondences betweenthem. Even an image of a two-dimensional (2-D)scene, such as 2-D objects on a plane, may gothrough various kinds of transformations, likerotation, scale, shear, etc. It may be required tocompute this transformation among such a pair ofimages. This is also a common problem of imageregistration.
• To implement the k-means clustering algorithm in Python.
• To determining the ideal number of clusters by implementing its code.
• To understand how to visualize clusters using plots.
• To create the dendrogram and find the optimal number of clusters for agglomerative hierarchical clustering.
• To compare results of k-means clustering with agglomerative hierarchical clustering.
• To implement clustering through various case studies.
13.1 Implementation of k-means Clustering and Hierarchical Clustering
In the previous chapter, we discussed various clustering algorithms. We learned that clustering algorithms are broadly classified into partitioning methods, hierarchical methods, and density-based methods. The k-means clustering algorithm follows partitioning method; agglomerative and divisive algorithms follow the hierarchical method, while DBSCAN is based on density-based clustering methods.
In this chapter, we will implement each of these algorithms by considering various case studies by following a step-by-step approach. You are advised to perform all these steps on your own on the mentioned databases stated in this chapter.
The k-means algorithm is considered a partitioning method and an unsupervised machine learning (ML) algorithm used to identify clusters of data items in a dataset. It is one of the most prominent ML algorithms, and its implementation in Python is quite straightforward. This chapter will consider three case studies, i.e., customers shopping in the mall dataset, the U.S. arrests dataset, and a popular Iris dataset. We will understand the significance of k-means clustering techniques to implement it in Python through these case studies. Along with the clustering of data items, we will also discuss the ways to find out the optimal number of clusters. To compare the results of the k-means algorithm, we will also implement hierarchical clustering for these problems.
We will kick-start the implementation of the k-means algorithm in Spyder IDE using the following steps.
Step 1: Importing the libraries and the dataset—The dataset for the respective case study would be downloaded, and then the required libraries would be imported.
Step 2: Finding the optimal number of clusters—We will find the optimal number of clusters by the elbow method for the given dataset.
Step 3: Fitting k-means to the dataset—A k-means model will be prepared by training the model over the acquired dataset.
Step 4: Visualizing the clusters—The clusters formed by the k-means model would then be visualized in the form of scatter plots.
Color is a psycho-physiological property of humanvisual experiences when the eyes look at objects andlight. Color is not a physical property of thoseobjects or light, rather, it is the result of aninteraction between physical light in theenvironment and human visual system (Palmer, 1999).For processing color images, it is required todevelop an understanding on how colors arerepresented following human perception.
3.1 Light sources
A broad range of electromagnetic spectrum, shown inFig. 3.1, consists of electromagnetic waves rangingfrom very long wavelengths at radio waves to veryhigh frequency at gamma waves. A very narrowinterval in this spectrum, toward the higher end ofspectral frequencies, accounts for the visible raysand it is called the visiblespectrum. The light and colors that ahuman eye perceives relate to the frequencies ofwaves that fall under the visible spectrum. Apictorial representation of the correspondence ofwavelengths in the visible range of the spectrum todifferent perceived colors has been shown in Fig.3.1. There are seven distinguishable colors in thefigure, violet, indigo, blue, green, yellow, orange,and red, usually known in order of their increasingwavelengths by the acronym of VIBGYOR. The luminancesensitivity function that is shown as a curve inFig. 3.1 is a function of the wavelength. It isempirically observed that the sensitivity of thehuman visual system is maximum in the green zone ofthe visible spectrum. The luminance sensitivityfunction gradually decays toward violet (higherfrequencies) and red (lower frequencies) from thegreen zone, as shown in the figure by the whitecurve.
In Chapter 1 on introduction of image processing, imageformation in a camera has been briefly described.Consider the image in Fig. 10.1. As a basic rule ofprojection, for a given scene point, 𝑷 , a ray from𝑷 that passes through the center of projection, 𝑶,intersects the image plane at its image point, 𝒑.This is a mapping, 𝑷 → 𝒑, of a three-dimensional(3-D) scene point to its two-dimensional (2-D) imagepoint. This rule of perspective projection isapplied for getting the image point of any scenepoint, in general. This particular geometry is thebasis of projectivegeometry in our context.
10.0.1 | Real and projective spaces
Consider a 2-D space, where a point, 𝒑, is denoted bya pair of coordinates, (𝑥, 𝑦), as shown in Fig.10.2. Since it is a cartesian product in real axis,the 2-D space is also denoted as ℝ2, and the point𝒑 belongs to the 2-D coordinate space. Followingthe coordinate conventions, these coordinates aredefined corresponding to an origin, 𝑶, and twoperpendicular axes meeting at the origin, namely,𝑥-axis and 𝑦-axis. The considered projectivespace, although defined in a 2-D space, implicitlyincludes a 3-D space behind its definition. Forexample, though all the points in an image are in a2-D plane, they are related to 3-D points of a scenewhich are lying on the ray of projection. This isthe abstraction of a 2-D projective space. Considera 3-D space, as shown in Fig. 10.2. If a ray passesthrough the origin, 𝑶, and the considered point,𝒑, 𝒑 is said to be the representative of the ray.Every point in this projected plane represents aray. In this case, the set of projection points,each representing a ray or straight line passingthrough the origin, is known as a 2-D projectivespace, ℙ2.
A document is an object which is primarily meant forhuman reading. It is not limited to only text.Besides text, which is primarily for reading, it mayalso contain figures, diagrams, photographs, tables,charts, etc. Many of these auxiliary componentsfacilitate the reading experience. Document imageprocessing involves processing of images ofdocuments. Examples of documents comprise of scannedimages of printed or handwritten pages, photographsof documents, etc. In general, images that containdifferent kinds of reading materials are consideredas images of documents. In this context, the imageof a text displayed in the environment is also anexample of document, e.g., an image of a signboard.Such kinds of texts are referred to as scenetexts.
A few examples of images of different kinds ofdocuments are shown in Fig. 16.1. The document inFig. 16.1 (a) contains printed text and graphics.Fig. 16.1 (b) is an example of an official document,which is a typical format of an official purchaseorder. Every organization usually has some standardtemplate or format of each official form used inregular administrative routines, which belongs tothis particular category of documents.
A page of magazine is shown in Fig. 16.1 (c), where thegraphics and text are overlaid in a specific layout.In Fig. 16.1 (d), an example of scene text is shown,which is a photograph of a stone tablet describing ahistorical monument. The image shown in Fig. 16.1(e) is a scanned document of a handwritten page, anexample of writing of the famous Bengali poet andNobel laureate, Rabindranath Tagore (1861–1941).