Instant Ebook Access, One Click Away – Begin at ebookgate.com
Mastering Predictive Analytics with R 2nd edition
Edition Forte
https://ebookgate.com/product/mastering-predictive-
analytics-with-r-2nd-edition-edition-forte/
OR CLICK BUTTON
DOWLOAD EBOOK
Get Instant Ebook Downloads – Browse at https://ebookgate.com
Click here to visit ebookgate.com and download ebook now
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...
Intelligent Techniques for Predictive Data Analytics 1st
Edition Neha Singh
https://ebookgate.com/product/intelligent-techniques-for-predictive-
data-analytics-1st-edition-neha-singh/
ebookgate.com
Applied Predictive Analytics Principles and Techniques for
the Professional Data Analyst 1st Edition Dean Abbott
https://ebookgate.com/product/applied-predictive-analytics-principles-
and-techniques-for-the-professional-data-analyst-1st-edition-dean-
abbott/
ebookgate.com
Modern Statistics With R From Wrangling and Exploring Data
to Inference and Predictive Modelling second edition Måns
Thulin
https://ebookgate.com/product/modern-statistics-with-r-from-wrangling-
and-exploring-data-to-inference-and-predictive-modelling-second-
edition-mans-thulin-2/
ebookgate.com
Modern Statistics with R From Wrangling and Exploring Data
to Inference and Predictive Modelling Second Edition Måns
Thulin
https://ebookgate.com/product/modern-statistics-with-r-from-wrangling-
and-exploring-data-to-inference-and-predictive-modelling-second-
edition-mans-thulin/
ebookgate.com
Advanced Analytics with Excel 2019 1st Edition Manisha
Nigam
https://ebookgate.com/product/advanced-analytics-with-excel-2019-1st-
edition-manisha-nigam/
ebookgate.com
Predictive Modeling with SAS Enterprise Miner Practical
Solutions for Business Applications 2nd Edition Kattamuri
S. Sarma
https://ebookgate.com/product/predictive-modeling-with-sas-enterprise-
miner-practical-solutions-for-business-applications-2nd-edition-
kattamuri-s-sarma/
ebookgate.com
Digital Marketing Analytics 2nd Edition Kevin Hartman
https://ebookgate.com/product/digital-marketing-analytics-2nd-edition-
kevin-hartman/
ebookgate.com
Introduction to Data Analytics for Accounting 2nd Edition
--
https://ebookgate.com/product/introduction-to-data-analytics-for-
accounting-2nd-edition/
ebookgate.com
Machine Learning with R Cookbook 2nd Edition Ashishsingh
Bhatia
https://ebookgate.com/product/machine-learning-with-r-cookbook-2nd-
edition-ashishsingh-bhatia/
ebookgate.com
Mastering Predictive Analytics with R
Second Edition
Table of Contents
Mastering Predictive Analytics with R Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Gearing Up for Predictive Modeling
Models
Learning from data
The core components of a model
Our first model – k-nearest neighbors
Types of model
Supervised, unsupervised, semi-supervised, and reinforcement learning models
Parametric and nonparametric models
Regression and classification models
Real-time and batch machine learning models
The process of predictive modeling
Defining the model's objective
Collecting the data
Picking a model
Pre-processing the data
Exploratory data analysis
Feature transformations
Encoding categorical features
Missing data
Outliers
Removing problematic features
Feature engineering and dimensionality reduction
Training and assessing the model
Repeating with different models and final model selection
Deploying the model
Summary
2. Tidying Data and Measuring Performance
Getting started
Tidying data
Categorizing data quality
The first step
The next step
The final step
Performance metrics
Assessing regression models
Assessing classification models
Assessing binary classification models
Cross-validation
Learning curves
Plot and ping
Summary
3. Linear Regression
Introduction to linear regression
Assumptions of linear regression
Simple linear regression
Estimating the regression coefficients
Multiple linear regression
Predicting CPU performance
Predicting the price of used cars
Assessing linear regression models
Residual analysis
Significance tests for linear regression
Performance metrics for linear regression
Comparing different regression models
Test set performance
Problems with linear regression
Multicollinearity
Outliers
Feature selection
Regularization
Ridge regression
Least absolute shrinkage and selection operator (lasso)
Implementing regularization in R
Polynomial regression
Summary
4. Generalized Linear Models
Classifying with linear regression
Introduction to logistic regression
Generalized linear models
Interpreting coefficients in logistic regression
Assumptions of logistic regression
Maximum likelihood estimation
Predicting heart disease
Assessing logistic regression models
Model deviance
Test set performance
Regularization with the lasso
Classification metrics
Extensions of the binary logistic classifier
Multinomial logistic regression
Predicting glass type
Ordinal logistic regression
Predicting wine quality
Poisson regression
Negative Binomial regression
Summary
5. Neural Networks
The biological neuron
The artificial neuron
Stochastic gradient descent
Gradient descent and local minima
The perceptron algorithm
Linear separation
The logistic neuron
Multilayer perceptron networks
Training multilayer perceptron networks
The back propagation algorithm
Predicting the energy efficiency of buildings
Evaluating multilayer perceptrons for regression
Predicting glass type revisited
Predicting handwritten digits
Receiver operating characteristic curves
Radial basis function networks
Summary
6. Support Vector Machines
Maximal margin classification
Support vector classification
Inner products
Kernels and support vector machines
Predicting chemical biodegration
Predicting credit scores
Multiclass classification with support vector machines
Summary
7. Tree-Based Methods
The intuition for tree models
Algorithms for training decision trees
Classification and regression trees
CART regression trees
Tree pruning
Missing data
Regression model trees
CART classification trees
C5.0
Predicting class membership on synthetic 2D data
Predicting the authenticity of banknotes
Predicting complex skill learning
Tuning model parameters in CART trees
Variable importance in tree models
Regression model trees in action
Improvements to the M5 model
Summary
8. Dimensionality Reduction
Defining DR
Correlated data analyses
Scatterplots
Causation
The degree of correlation
Reporting on correlation
Principal component analysis
Using R to understand PCA
Independent component analysis
Defining independence
ICA pre-processing
Factor analysis
Explore and confirm
Using R for factor analysis
The output
NNMF
Summary
9. Ensemble Methods
Bagging
Margins and out-of-bag observations
Predicting complex skill learning with bagging
Predicting heart disease with bagging
Limitations of bagging
Boosting
AdaBoost
AdaBoost for binary classification
Predicting atmospheric gamma ray radiation
Predicting complex skill learning with boosting
Limitations of boosting
Random forests
The importance of variables in random forests
XGBoost
Summary
10. Probabilistic Graphical Models
A little graph theory
Bayes' theorem
Conditional independence
Bayesian networks
The Naïve Bayes classifier
Predicting the sentiment of movie reviews
Predicting promoter gene sequences
Predicting letter patterns in English words
Summary
11. Topic Modeling
An overview of topic modeling
Latent Dirichlet Allocation
The Dirichlet distribution
The generative process
Fitting an LDA model
Modeling the topics of online news stories
Model stability
Finding the number of topics
Topic distributions
Word distributions
LDA extensions
Modeling tweet topics
Word clouding
Summary
12. Recommendation Systems
Rating matrix
Measuring user similarity
Collaborative filtering
User-based collaborative filtering
Item-based collaborative filtering
Singular value decomposition
Predicting recommendations for movies and jokes
Loading and pre-processing the data
Exploring the data
Evaluating binary top-N recommendations
Evaluating non-binary top-N recommendations
Evaluating individual predictions
Other approaches to recommendation systems
Summary
13. Scaling Up
Starting the project
Data definition
Experience
Data of scale – big data
Using Excel to gauge your data
Characteristics of big data
Volume
Varieties
Sources and spans
Structure
Statistical noise
Training models at scale
Pain by phase
Specific challenges
Heterogeneity
Scale
Location
Timeliness
Privacy
Collaborations
Reproducibility
A path forward
Opportunities
Bigger data, bigger hardware
Breaking up
Sampling
Aggregation
Dimensional reduction
Alternatives
Chunking
Alternative language integrations
Summary
14. Deep Learning
Machine learning or deep learning
What is deep learning?
An alternative to manual instruction
Growing importance
Deeper data?
Deep learning for IoT
Use cases
Word embedding
Word prediction
Word vectors
Numerical representations of contextual similarities
Netflix learns
Implementations
Deep learning architectures
Artificial neural networks
Recurrent neural networks
Summary
Index
Mastering Predictive Analytics with R
Second Edition
Mastering Predictive Analytics with R
Second Edition
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the authors, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2015
Second edition: August 2017
Production reference: 1140817
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78712-139-3
www.packtpub.com
Credits
Authors
James D. Miller
Rui Miguel Forte
Reviewer
Davor Lozić
Commissioning Editor
Amey Varangaonkar
Acquisition Editor
Divya Poojari
Content Development Editor
Deepti Thore
Technical Editor
Nilesh Sawakhande
Copy Editor
Safis Editing
Project Coordinator
Shweta H Birwatkar
Proofreader
Safis Editing
Indexer
Pratik Shirodkar
Graphics
Tania Dutta
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
About the Authors
James D. Miller is an IBM-certified expert, creative innovator, accomplished
director, senior project leader, and application/system architect. He has over 35 years
of extensive experience in application and system design and development across
multiple platforms and technologies. His experience includes introducing customers
to new technologies and platforms, integrating with IBM Watson Analytics, Cognos
BI, and TM1. He has worked in web architecture design, systems analysis, GUI
design and testing, database modeling, systems analysis, design and development of
OLAP, web and mainframe applications and systems utilization, IBM Watson
Analytics, IBM Cognos BI and TM1 (TM1 rules, TI, TM1Web, and Planning
Manager), Cognos Framework Manager, dynaSight - ArcPlan, ASP, DHTML, XML,
IIS, MS Visual Basic and VBA, Visual Studio, Perl, Splunk, WebSuite, MS SQL
Server, Oracle, and Sybase server. James's responsibilities have also included all
aspects of Windows and SQL solution development and design, such as analysis;
GUI (and website) design; data modeling; table, screen/form, and script
development; SQL (and remote stored procedures and triggers) development/testing;
test preparation; and management and training of programming staff.
His other experience includes the development of ETL infrastructures, such as data
transfer automation between mainframe (DB2, Lawson, Great Plains, and so on)
system and client/server SQL Server, web-based applications, and the integration of
enterprise applications and data sources. James has been a web application
development manager responsible for the design, development, QA, and delivery of
multiple websites, including online trading applications and warehouse process
control and scheduling systems, as well as administrative and control applications.
He was also responsible for the design, development, and administration of a web-
based financial reporting system for a 450-million dollar organization, reporting
directly to the CFO and his executive team.
Furthermore, he has been responsible for managing and directing multiple resources
in various management roles, including as project and team leader, lead developer,
and application development director. James has authored Cognos TM1 Developers
Certification Guide, Mastering Splunk, and a number of white papers on best
practices, including Establishing a Center of Excellence. He continues to post blogs
on a number of relevant topics based on personal experiences and industry best
practices. James is a perpetual learner, continuing to pursue new experiences and
certifications. He currently holds the following technical certifications: IBM
Certified Business Analyst - Cognos TM1 IBM Cognos TM1 Master 385
Certification (perfect score of 100%), IBM Certified Advanced Solution Expert -
Cognos TM1, IBM Cognos TM1 10.1 Administrator Certification C2020-703
(perfect score of 100%), IBM OpenPages Developer Fundamentals C2020-001-ENU
(98% in exam), IBM Cognos 10 BI Administrator C2020-622 (98% in exam), and
IBM Cognos 10 BI Professional C2020-180.
He specializes in the evaluation and introduction of innovative and disruptive
technologies, cloud migration, IBM Watson Analytics, Cognos BI and TM1
application design and development, OLAP, Visual Basic, SQL Server, forecasting
and planning, international application development, business intelligence, project
development and delivery, and process improvement.
I'd like to thank, Nanette L. Miller, and remind her that "Your destiny is my destiny.
Your happiness is my happiness." I'd also like to thank Shelby Elizabeth and Paige
Christina, who are both women of strength and beauty and whom I have no doubt
will have a lasting, loving effect on the world.
Rui Miguel Forte is currently the chief data scientist at Workable. He was born and
raised in Greece and studied in the UK. He is an experienced data scientist, with over
10 years of work experience in a diverse array of industries spanning mobile
marketing, health informatics, education technology, and human resources
technology. His projects have included predictive modeling of user behavior in
mobile marketing promotions, speaker intent identification in an intelligent tutor,
information extraction techniques for job applicant resumes, and fraud detection for
job scams. He currently teaches R, MongoDB, and other data science technologies to
graduate students in the Business Analytics MSc program at the Athens University
of Economics and Business. In addition, he has lectured at a number of seminars,
specialization programs, and R schools for working data science professionals in
Athens.
His core programming knowledge is in R and Java, and he has extensive experience
of a variety of database technologies, such as Oracle, PostgreSQL, MongoDB, and
HBase. He holds a master's degree in Electrical and Electronic Engineering from
Imperial College London and is currently researching machine learning applications
in information extraction and natural language processing.
Behind every great adventure is a good story and writing a book is no exception.
Many people contributed to making this book a reality. I would like to thank the
many students I have taught at AUEB whose dedication and support has been
nothing short of overwhelming. They should be rest assured that I have learned just
as much from them as they have learned from me, if not more. I also want to thank
Damianos Chatziantoniou for conceiving a pioneering graduate data science program
in Greece. Workable has been a crucible for working alongside incredibly talented
and passionate engineers on exciting data science projects that help businesses
around the globe. For this, I would like to thank my colleagues and in particular the
founders, Nick and Spyros, who created a diamond in the rough. I would like to
thank Subho, Govindan, and all the folks at Packt for their professionalism and
patience. My family and extended family have been an incredible source of support
on this project. In particular, I would like to thank my father, Libanio, for inspiring
me to pursue a career in the sciences and my mother, Marianthi, for always believing
in me far more than anyone else ever could. My wife, Despoina, patiently and
fiercely stood by my side even as this book kept me away from her during her first
pregnancy. Last but not least, my baby daughter slept quietly and kept a cherubic
vigil over her father during the book review phase. She helped me in ways words
cannot describe.
About the Reviewer
Davor Lozić is a senior software engineer interested in various subjects, especially
computer security, algorithms, and data structures. He manages a team of more than
15 engineers and is a part-time assistant professor who lectures about database
systems and interoperability. You can visit his website at http://warriorkitty.com. He
likes cats! If you want to talk about any aspect of technology or if you have funny
pictures of cats, feel free to contact him.
www.PacktPub.com
eBooks, discount offers, and more
Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at
www.PacktPub.com and as a print book customer, you are entitled to a discount on
the eBook copy. Get in touch with us at <customercare@packtpub.com> for more
details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all
Packt books and video courses, as well as industry-leading tools to help you plan
your personal development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our
editorial process. To help us improve, please leave us an honest review on this
book's Amazon page at https://www.amazon.com/dp/1787121399.
If you'd like to join our team of regular reviewers, you can e-mail us at
customerreviews@packtpub.com. We award our regular reviewers with free eBooks
and videos in exchange for their valuable feedback. Help us be relentless in
improving our products!
Preface
Predictive analytics incorporates a variety of statistical techniques from predictive
modeling, machine learning, and data mining that aim to analyze current and
historical facts to produce results referred to as predictions about the future or
otherwise unknown events.
R is an open source programming language that is widely used among statisticians
and data miners for predictive modeling and data mining. With its constantly
growing community and plethora of packages, R offers the functionality to deal with
a truly vast array of problems.
This book builds upon its first edition, meaning to be both a guide and a reference to
the reader wanting to move beyond the basics of predictive modeling. The book
begins with a dedicated chapter on the language of models as well as the predictive
modeling process. Each subsequent chapter tackles a particular type of model, such
as neural networks, and focuses on the three important questions of how the model
works, how to use R to train it, and how to measure and assess its performance using
real-world datasets.
This second edition provides up-to-date in-depth information on topics such as
Performance Metrics and Learning Curves, Polynomial Regression, Poisson and
Negative Binomial Regression, back-propagation, Radial Basis Function Networks,
and more. A chapter has also been added that focuses on working with very large
datasets. By the end of this book, you will have explored and tested the most popular
modeling techniques in use on real-world datasets and mastered a diverse range of
techniques in predictive analytics.
What this book covers
Chapter 1, Gearing Up for Predictive Modeling, helps you set up and get ready to
start looking at individual models and case studies, then describes the process of
predictive modeling in a series of steps, and introduces several fundamental
distinctions.
Chapter 2, Tidying Data and Measuring Performance, covers performance metrics,
learning curves, and a process for tidying data.
Chapter 3, Linear Regression, explains the classic starting point for predictive
modeling; it starts from the simplest single variable model and moves on to multiple
regression, over-fitting, regularization, and describes regularized extensions of linear
regression.
Chapter 4, Generalized Linear Models, follows on from linear regression, and in this
chapter, introduces logistic regression as a form of binary classification, extends this
to multinomial logistic regression, and uses these as a platform to present the
concepts of sensitivity and specificity.
Chapter 5, Neural Networks, explains that the model of logistic regression can be
seen as a single layer perceptron. This chapter discusses neural networks as an
extension of this idea, along with their origins and explores their power.
Chapter 6, Support Vector Machines, covers a method of transforming data into a
different space using a kernel function and as an attempt to find a decision line that
maximizes the margin between the classes.
Chapter 7, Tree-Based Methods, presents various tree-based methods that are
popularly used, such as decision trees and the famous C5.0 algorithm. Regression
trees are also covered, as well as random forests, making the link with the previous
chapter on bagging. Cross validation methods for evaluating predictors are presented
in the context of these tree-based methods.
Chapter 8, Dimensionality Reduction, covers PCA, ICA, Factor analysis, and Non-
negative Matrix factorization.
Chapter 9, Ensemble Methods, discusses methods for combining either many
predictors, or multiple trained versions of the same predictor. This chapter introduces
the important notions of bagging and boosting and how to use the AdaBoost
algorithm to improve performance on one of the previously analyzed datasets using a
single classifier.
Chapter 10, Probabilistic Graphical Models, introduces the Naive Bayes classifier as
the simplest graphical model following a discussion of conditional probability and
Bayes' rule. The Naive Bayes classifier is showcased in the context of sentiment
analysis. Hidden Markov Models are also introduced and demonstrated through the
task of next word prediction.
Chapter 11, Topic Modeling, provides step-by-step instructions for making
predictions on topic models. It will also demonstrate methods of dimensionality
reduction to summarize and simplify the data.
Chapter 12, Recommendation Systems, explores different approaches to building
recommender systems in R, using nearest neighbor approaches, clustering, and
algorithms such as collaborative filtering.
Chapter 13, Scaling Up, explains working with very large datasets, including some
worked examples of how to train some models we've seen so far with very large
datasets.
Chapter 14, Deep Learning, tackles the really important topic of deep learning using
examples such as word embedding and recurrent neural networks (RNNs).
What you need for this book
In order to work with and to run the code examples found in this book, the following
should be noted:
R is a free software environment for statistical computing and graphics. It
compiles and runs on a wide variety of UNIX platforms, Windows, and
MacOS. To download R, there are a variety of locations available, including
https://www.rstudio.com/products/rstudio/download.
R includes extensive accommodations for accessing documentation and
searching for help. A good source of information is at http://www.r-
project.org/help.html.
The capabilities of R are extended through user-created packages. Various
packages are referred to and used throughout this book and the features of and
access to each will be detailed as they are introduced. For example, the
wordcloud package is introduced in Chapter 11, Topic Modeling to plot a cloud
of words shared across documents. This is found at https://cran.r-
project.org/web/packages/wordcloud/index.html.
Who this book is for
It would be helpful if the reader has had some experience with predictive analytics
and the R programming language; however, this book will also be of value to readers
who are new to these topics but are keen to get started as quickly as possible.
Conventions
In this book, you will find a number of text styles that distinguish between different
kinds of information. Here are some examples of these styles and an explanation of
their meaning.
Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"The DrupalCoreUrl class provides static methods to generate an instance of
itself, such as ::fromRoute()."
A block of code is set as follows:
/**
* {@inheritdoc}
*/
public function alterRoutes(RouteCollection $collection) {
if ($route = $collection->get('mymodule.mypage)) {
$route->setPath('/my-page');
}
}
When we wish to draw your attention to a particular part of a code block, the
relevant lines or items are set in bold:
/**
* {@inheritdoc}
*/
public function alterRoutes(RouteCollection $collection) {
if ($route = $collection->get('mymodule.mypage)) {
$route->setPath('/my-page');
}
}
Any command-line input or output is written as follows:
$ php core/scripts/run-tests.sh PHPUnit
New terms and important words are shown in bold. Words that you see on the
screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking
the Next button moves you to the next screen."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or disliked. Reader feedback is important for us as it
helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <feedback@packtpub.com>, and
mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Downloading the example code
You can download the example code files for this book from your account at
http://www.packtpub.com. If you purchased this book elsewhere, you can visit
http://www.packtpub.com/support and register to have the files e-mailed directly to
you.
You can download the code files by following these steps:
1. Log in or register to our website using your e-mail address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.
You can also download the code files by clicking on the Code Files button on the
book's webpage at the Packt Publishing website. This page can be accessed by
entering the book's name in the Search box. Please note that you need to be logged
in to your Packt account.
Once the file is downloaded, please make sure that you unzip or extract the folder
using the latest version of:
WinRAR / 7-Zip for Windows
Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at
https://github.com/PacktPublishing/Mastering-Predictive-Analytics-with-R-Second-
Edition. We also have other code bundles from our rich catalog of books and videos
available at https://github.com/PacktPublishing/. Check them out!
Downloading the color images of this book
We also provide you with a PDF file that has color images of the
screenshots/diagrams used in this book. The color images will help you better
understand the changes in the output. You can download this file from
https://www.packtpub.com/sites/default/files/downloads/MasteringPredictiveAnalyticswithRS
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you could report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting
http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata
Submission Form link, and entering the details of your errata. Once your errata are
verified, your submission will be accepted and the errata will be uploaded to our
website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to
https://www.packtpub.com/books/content/support and enter the name of the book in
the search field. The required information will appear under the Errata section.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all
media. At Packt, we take the protection of our copyright and licenses very seriously.
If you come across any illegal copies of our works in any form on the Internet,
please provide us with the location address or website name immediately so that we
can pursue a remedy.
Please contact us at <copyright@packtpub.com> with a link to the suspected pirated
material.
We appreciate your help in protecting our authors and our ability to bring you
valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at
<questions@packtpub.com>, and we will do our best to address the problem.
Chapter 1. Gearing Up for Predictive
Modeling
In this first chapter, we'll start by establishing a common language for models and
taking a deep view of the predictive modeling process. Much of predictive modeling
involves the key concepts of statistics and machine learning, and this chapter will
provide a brief tour of the core features of these fields that are essential knowledge
for a predictive modeler. In particular, we'll emphasize the importance of knowing
how to evaluate a model that is appropriate to the type of problem we are trying to
solve. Finally, we will showcase our first model, the k-nearest neighbors model, as
well as caret, a very useful R package for predictive modelers.
Models
Models are at the heart of predictive analytics and, for this reason, we'll begin our
journey by talking about models and what they look like. In simple terms, a model is
a representation of a state, process, or system that we want to understand and reason
about. We make models so that we can draw inferences from them and, more
importantly for us in this book, make predictions about the world. Models come in a
multitude of different formats and flavors, and we will explore some of this diversity
in this book. Models can be equations linking quantities that we can observe or
measure; they can also be a set of rules. A simple model with which most of us are
familiar from school is Newton's Second Law of Motion. This states that the net sum
of force acting on an object causes the object to accelerate in the direction of the
force applied and at a rate proportional to the resulting magnitude of the force and
inversely proportional to the object's mass.
We often summarize this information via an equation using the letters F, m, and a for
the quantities involved. We also use the capital Greek letter sigma (Σ) to indicate
that we are summing over the force and arrows above the letters that are vector
quantities (that is, quantities that have both magnitude and direction):
This simple but powerful model allows us to make some predictions about the world.
For example, if we apply a known force to an object with a known mass, we can use
the model to predict how much it will accelerate. Like most models, this model
makes some assumptions and generalizations. For example, it assumes that the color
of the object, the temperature of the environment it is in, and its precise coordinates
in space are all irrelevant to how the three quantities specified by the model interact
with each other. Thus, models abstract away the myriad of details of a specific
instance of a process or system in question, in this case the particular object in whose
motion we are interested, and limit our focus only to properties that matter.
Newton's second law is not the only possible model to describe the motion of
objects. Students of physics soon discover other more complex models, such as those
taking into account relativistic mass. In general, models are considered more
complex if they take a larger number of quantities into account or if their structure is
more complex. For example, nonlinear models are generally more complex than
linear models. Determining which model to use in practice isn't as simple as picking
a more complex model over a simpler model. In fact, this is a central theme that we
will revisit time and again as we progress through the many different models in this
book. To build our intuition as to why this is so, consider the case where our
instruments that measure the mass of the object and the applied force are very noisy.
Under these circumstances, it might not make sense to invest in using a more
complicated model, as we know that the additional accuracy in the prediction won't
make a difference because of the noise in the inputs. Another situation where we
may want to use the simpler model is when, in our application, we simply don't need
the extra accuracy. A third situation arises where a more complex model involves a
quantity that we have no way of measuring. Finally, we might not want to use a more
complex model if it turns out that it takes too long to train or make a prediction
because of its complexity.
Learning from data
In this book, the models we will study have two important and defining
characteristics. The first of these is that we will not use mathematical reasoning or
logical induction to produce a model from known facts, nor will we build models
from technical specifications or business rules; instead, the field of predictive
analytics builds models from data. More specifically, we will assume that for any
given predictive task that we want to accomplish, we will start with some data that is
in some way related to (or derived from) the task at hand. For example, if we want to
build a model to predict annual rainfall in various parts of a country, we might have
collected (or have the means to collect) data on rainfall at different locations, while
measuring potential quantities of interest, such as the height above sea level, latitude,
and longitude. The power of building a model to perform our predictive task stems
from the fact that we will use examples of rainfall measurements at a finite list of
locations to predict the rainfall in places where we did not collect any data.
The second important characteristic of the problems for which we will build models
is that, during the process of building a model from some data to describe a
particular phenomenon, we are bound to encounter some source of randomness. We
will refer to this as the stochastic or nondeterministic component of the model. It
may be the case that the system itself that we are trying to model doesn't have any
inherent randomness in it, but it is the data that contains a random component. A
good example of a source of randomness in data is the measurement of errors from
readings taken for quantities such as temperature. A model that contains no inherent
stochastic component is known as a deterministic model, Newton's second law
being a good example of this. A stochastic model is one that assumes that there is an
intrinsic source of randomness to the process being modeled. Sometimes, the source
of this randomness arises from the fact that it is impossible to measure all the
variables that are most likely impacting a system, and we simply choose to model
this using probability. A well-known example of a purely stochastic model is rolling
an unbiased six-sided die. Recall that, in probability, we use the term random
variable to describe the value of a particular outcome of an experiment or of a
random process. In our die example, we can define the random variable, Y, as the
number of dots on the side that lands face up after a single roll of the die, resulting in
the following model:
This model tells us that the probability of rolling a particular digit, say, 3, is one in
six. Notice that we are not making a definite prediction on the outcome of a
particular roll of the die; instead, we are saying that each outcome is equally likely.
Note
Probability is a term that is commonly used in everyday speech, but at the same time
sometimes results in confusion with regard to its actual interpretation. It turns out
that there are a number of different ways of interpreting probability. Two commonly
cited interpretations are Frequentist probability and Bayesian probability.
Frequentist probability is associated with repeatable experiments, such as rolling a
one-sided die. In this case, the probability of seeing the digit 3, is just the relative
proportion of the digit 3 coming up if this experiment were to be repeated an infinite
number of times. Bayesian probability is associated with a subjective degree of
belief or surprise at seeing a particular outcome and can, therefore, be used to give
meaning to one-off events, such as the probability of a presidential candidate
winning an election. In our die rolling experiment, we are as surprised to see the
number 3 come up as with any other number. Note that in both cases, we are still
talking about the same probability numerically (1/6); only the interpretation differs.
In the case of the die model, there aren't any variables that we have to measure. In
most cases, however, we'll be looking at predictive models that involve a number of
independent variables that are measured, and these will be used to predict a
dependent variable. Predictive modeling draws on many diverse fields and as a
result, depending on the particular literature you consult, you will often find different
names for these. Let's load a dataset into R before we expand on this point. R comes
with a number of commonly cited datasets already loaded, and we'll pick what is
probably the most famous of all, the iris dataset:
> head(iris, n = 3)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
Tip
To see what other datasets come bundled with R, we can use the data() command to
obtain a list of datasets along with a short description of each. If we modify the data
from a dataset, we can reload it by providing the name of the dataset in question as
an input parameter to the data()command; for example, data(iris) reloads the iris
dataset.
The iris dataset consists of measurements made on a total of 150 flower samples of
three different species of iris. In the preceding code, we can see that there are four
measurements made on each sample, namely the lengths and widths of the flower
petals and sepals. The iris dataset is often used as a typical benchmark for different
models that can predict the species of an iris flower sample, given the four
previously mentioned measurements. Collectively, the sepal length, sepal width,
petal length, and petal width are referred to as features, attributes, predictors,
dimensions, or independent variables in literature. In this book, we prefer to use
the word feature, but other terms are equally valid. Similarly, the species column in
the data frame is what we are trying to predict with our model, and so it is referred to
as the dependent variable, output, or target. Again, in this book, we will prefer
one form for consistency, and will use output. Each row in the data frame
corresponding to a single data point is referred to as an observation, though it
typically involves observing the values of a number of features.
As we will be using datasets, such as the iris data described earlier, to build our
predictive models, it also helps to establish some symbol conventions. Here, the
conventions are quite common in most of the literature. We'll use the capital letter, Y,
to refer to the output variable, and subscripted capital letter, Xi, to denote the ith
feature. For example, in our iris dataset, we have four features that we could refer to
as X1 through X4. We will use lower-case letters for individual observations, so that
x1 corresponds to the first observation. Note that x1 itself is a vector of feature
components, xij, so that x12 refers to the value of the second feature in the first
observation. We'll try to use double suffixes sparingly and we won't use arrows or
any other form of vector notation for simplicity. Most often, we will be discussing
either observations or features and so the case of the variable will make it clear to the
reader which of these two is being referenced.
When thinking about a predictive model using a dataset, we are generally making the
assumption that for a model with n features, there is a true or ideal function, f, that
maps the features to the output:
We'll refer to this function as our target function. In practice, as we train our model
using the data available to us, we will produce our own function that we hope is a
good estimate for the target function. We can represent this by using a caret on top of
the symbol f to denote our predicted function, and also for the output, Y, since the
output of our predicted function is the predicted output. Our predicted output will,
unfortunately, not always agree with the actual output for all observations (in our
data or in general):
Given this, we can essentially summarize predictive modeling as a process that
produces a function to predict a quantity, while minimizing the error it makes
compared to the target function. A good question we can ask at this point is, Where
does the error come from? Put differently, why are we generally not able to exactly
reproduce the underlying target function by analyzing a dataset?
The answer to this question is that in reality there are several potential sources of
error that we must deal with. Remember that each observation in our dataset contains
values for n features, and so we can think about our observations geometrically as
points in an n-dimensional feature space. In this space, our underlying target function
should pass through these points by the very definition of the target function. If we
now think about this general problem of fitting a function to a finite set of points, we
will quickly realize that there are actually infinite functions that could pass through
the same set of points. The process of predictive modeling involves making a choice
in the type of model that we will use for the data, thereby constraining the range of
possible target functions to which we can fit our data. At the same time, the data's
inherent randomness cannot be removed no matter what model we select. These
ideas lead us to an important distinction in the types of error that we encounter
during modeling, namely the reducible error and the irreducible error,
respectively.
The reducible error essentially refers to the error that we as predictive modelers can
minimize by selecting a model structure that makes valid assumptions about the
process being modeled and whose predicted function takes the same form as the
underlying target function. For example, as we shall see in the next chapter, a linear
model imposes a linear relationship between its features in order to compose the
output.
This restrictive assumption means that, no matter what training method we use, how
much data we have, and how much computational power we throw in, if the features
aren't linearly related in the real world, then our model will necessarily produce an
error for at least some possible observations. By contrast, an example of an
irreducible error arises when trying to build a model with an insufficient feature set.
This is typically the norm and not the exception. Often, discovering what features to
use is one of the most time-consuming activities of building an accurate model.
Sometimes, we may not be able to directly measure a feature that we know is
important. At other times, collecting the data for too many features may simply be
impractical or too costly. Furthermore, the solution to this problem is not simply a
question of adding as many features as possible. Adding more features to a model
makes it more complex and we run the risk of adding a feature that is unrelated to
the output, thus introducing noise in our model. This also means that our model
function will have more inputs and will, therefore, be a function in a higher
dimensional space.
Some of the potential practical consequences of adding more features to a model
include increasing the time it will take to train the model, making convergence on a
final solution harder, and actually reducing model accuracy under certain
circumstances, such as with highly correlated features. Finally, another source of an
irreducible error that we must live with is the error in measuring our features so that
the data itself may be noisy.
Reducible errors can be minimized not only through selecting the right model, but
also by ensuring that the model is trained correctly. Thus, reducible errors can also
come from not finding the right specific function to use, given the model
assumptions. For example, even when we have correctly chosen to train a linear
model, there are infinitely many linear combinations of the features that we could
use. Choosing the model parameters correctly, which in this case would be the
coefficients of the linear model, is also an aspect of minimizing the reducible error.
Of course, a large part of training a model correctly involves using a good
optimization procedure to fit the model. In this book, we will at least give a high-
level intuition of how each model that we study is trained. We generally avoid
delving deeply into the mathematics of how optimization procedures work, but we
do give pointers to the relevant literature for the interested reader to find out more.
Another Random Document on
Scribd Without Any Related Topics
name, or alter the body of the cheque. In many commercial houses
the body of the cheque is filled up by the confidential clerk and
taken to the head of the firm, who signs it. These forgeries are
sometimes for a small sum, at other times for a large amount.
Several cases of uttering forged cheques were lately tried before the
police-courts.
A respectable-looking young woman, who described herself as a
domestic servant, was brought before the Lord Mayor, charged with
uttering a cheque for 5l. 18s., purporting to be signed by Mr. W. P.
Bennett, with intent to defraud a banking firm in London. She had
recently been on a visit to London, and had been lent a small sum of
money by another servant in town, along with some dresses,
amounting to 10s. 6d.
On the 30th October the latter young woman received a letter from
the prisoner, enclosing a forged cheque, and at the same time
stating that a young man with whom she had been keeping
company had died, and had given her this cheque to get cashed. If
the servant could not get away to get the cheque cashed, the
prisoner wished her to lend her what she was able, to go to the
young man’s funeral. On presenting the cheque at the banker’s the
forgery was discovered.
It appeared from the evidence that the prisoner had been lodging in
the same house with Mr. Bennett, whose signature she forged.
A young man of respectable appearance residing in the
neighbourhood of Fleet Street, was tried at Guildhall lately, charged
with uttering a cheque for 6l., well knowing the same to be a
forgery. He had gone to the landlord of a public-house in Essex
Street, Bouverie Street, and asked him to cash it. It was drawn by
Josiah Evans in favour of C. B. Bennett, Esq., and indorsed by the
latter. The cheque was on Sir Benjamin Hayward, Bart., & Co., of
Manchester. When presented at the bank, it was returned with a
note stating that no such person had an account there, and they did
not know any of the names. The criminal was then arrested, and
committed for trial.
Forged Acceptance.—A bill of exchange is a mercantile contract
written on a slip of paper, whereby one person requests another to
pay money on his account to a third person at the time therein
specified. The person who draws the bill is termed the drawer, the
party to whom it is addressed before acceptance is called the
drawee—afterwards the acceptor. The party for whom it is drawn is
termed the payee, who indorses the bill, and is then styled the
indorser, and the party to whom he transfers it is called the indorsee.
The person in possession of the bill is termed the holder.
An acceptance is an engagement to pay the bill, the person writing
the word accepted across the bill with his name under it. This may
be absolute or qualified. An absolute acceptance is an engagement
to pay the bill according to its request. A qualified acceptance
undertakes to do it conditionally.
Bills are either inland or foreign. The inland bill is on one piece of
paper; foreign bills generally consist of three parts called a “set;” so
that should the bearer lose one, he may receive payment for the
other. Each part contains a condition that it shall be paid provided
the others are unpaid. These bills require to have a stamp of proper
value to make them valid.
Forgeries of bills seldom consist of the whole bill, but either the
acceptor’s signature, or that of the drawer, or the indorser.
Sometimes the contents of the bill is altered to make it payable
earlier.
These forgeries are not so numerous, and are frequently done by
parties who get the bills in a surreptitious way. It often happens that
one party draws the bill in another name, forging the acceptance,
and passes it to a third party who is innocent of the forgery. If the
person who forged the acceptance, pays the money to the bank
where the bill is payable when it is due, the forgery is not detected.
When he is not able to pay in the money it is discovered. It happens
in this way: A B and C are commercial men, A stands well in the
commercial world; B draws a bill in his name, and without his
knowledge. The name of A being good, the bill passes to C without
any suspicion. If B can meet it at the time it is due, A does not know
that his name has been used.
If the bill is not paid at the proper time, C takes it to A, and thus
discovers the forgery.
Forged Wills.—A will is a written document in which the testator
disposes of his property after his death. It is not necessary that it
should be written on stamped paper, as no stamp duty is required till
the death of the testator, when the will is proved in court in the
district where he resided. The essentials are that it should be legible,
and so intelligible, that the testator’s intention can be clearly
understood.
If the will is not signed by the testator, it must be signed by some
other person by his direction, and in his presence; two or more
witnesses being present who must attest that the will was signed,
and the signature acknowledged by the testator in their presence.
No will is valid unless signed at the foot of the page, or at the end
by the testator, or by some other person in his presence, and by his
direction. Marriage revokes a will previously made.
A codicil is a supplement, or addition to the will, altering some part,
or making an addition. It may be written on the same document, or
on another paper, and folded up with the original instrument. There
can only be one will, yet there may be a number of codicils attached
to it, and the last is equally binding as the first, if they are not
contradictory.
Forgeries of wills are generally done by relations, who get a fictitious
will prepared in their favour contrary to the genuine will. On the
death of the supposed testator, the forged will is put forth as the
genuine one, and the other is destroyed.
All parties expecting property on the death of a relative or friend,
and finding none, should be careful to have the signatures of the
witnesses examined, to test whether they are genuine; and also the
signature of the testator.
Every will can be seen at the district court, where they are proved,
on the payment of a shilling. Such an examination is the only likely
method of detecting the forgery.
There are several other classes of forgery in addition to those
already noticed, such as forging certificates of character, and bills of
lading.
A case of the latter kind was recently tried at Guildhall. A merchant,
near the Haymarket, and an artist also in the West-end, were
arraigned with having feloniously forged and altered certain bills of
lading; one of these represented ten casks of alkali amounting to the
value of 84l., and another, twenty-six casks of alkali worth 140l.,
with the intention of defrauding certain merchants in London. All the
bills of lading were with one exception to a certain extent genuine,
that is, were filled up in the first instance. But after being signed by
the wharfinger, they were altered by the introduction of words and
figures, to represent a larger quantity of goods than had been
shipped. The prisoners were committed for trial.
Number of cases of forgery in the metropolitan districts for the
year 1860
27
Ditto ditto in the City 20
47
Amount of loss thereby in the metropolitan districts£254
Ditto ditto in the City 736
£990
CHEATS.
Embezzlers.
This is the crime of a servant appropriating to his own use the money
or goods received by him on account of his master, and is perpetrated
in the metropolis by persons both in inferior and superior positions.
Were a party to advance money or goods to an acquaintance or friend,
for which the latter did not give a proper return, the case would be
different, and require to be sued for in a civil action.
Embezzlement is often committed by journeymen bakers entrusted by
their employers with quantities of bread to distribute to customers in
different parts of the metropolis, by brewer’s draymen delivering malt
liquors, by carmen and others engaged in their various errands. A case
of this kind occurred recently. A carman in the service of a coal
merchant in the West-end was charged with embezzling 6l. 1s. 6d. He
had been in the habit of going out with coals to customers, and was
empowered to receive the money, but had gone into a public-house on
his return, got intoxicated, and lost the whole of his cash. He was tried
at Westminster Police Court, and sentenced to pay a fine of 10l. with
costs. This crime is frequent among this class. The chief inducements
which lead to it are the habits of drinking, prevalent among them,
gambling in beer-shops, attending music-saloons, such as the Mogul,
Drury Lane, and Paddy’s Goose, Ratcliffe Highway, and attending
running matches. Their pay is not sufficient to enable them to indulge
in those habits, and this leads them to commit the crime of
embezzlement.
Persons in trade frequently send out their shopmen to receive orders,
and obtain payment for goods supplied to families at their residence,
and are occasionally entrusted with goods on stalls. In June, 1861, a
respectable-looking young man, was placed at the bar of the Southwark
Police Court, charged with having embezzled 39l., the property of a
bookselling firm in the Strand. He had been entrusted with a stall where
he sold books and newspapers, and was called to account for the
receipts daily. One day he neglected to send 8l., the receipts of the
previous Saturday, and for other seven days he had given no proper
count and reckoning. He admitted the neglect, and confessed he had
appropriated the money. He was paid at the rate of 1l. 10s. a month,
which with commission amounted to about 6l. or 7l.
A clerk and salesman in the service of a draper in Camberwell, was
charged with embezzling various sums of money belonging to his
employer. It was his duty each night to account for the goods he
disposed of, and the money he received. One morning he went out with
a quantity of goods, and did not return at the proper time, when his
employer found him in a beershop in the Blackfriars Road. On asking
him what had become of the goods, he replied he had left them at a
public-house in the Borough, which was untrue. In the account-book
found upon him it was ascertained that he had received several sums of
money he had not accounted for.
A robbery by a young man of this class was very ingeniously detected a
few weeks ago, and brought before the Marlborough Police Court.
A shopman to a cheesemonger in Oxford Street was charged with
stealing money from the till. He had been in his employer’s service for
ten months, and served at the counter along with three other shopmen.
The cheesemonger having found a considerable deficiency in his
receipts suspected his honesty, especially as he was in the habit of
attending places of amusement, and indulging in other extravagances
he knew were beyond his means. He marked three half-crowns, and
put them in the till to which the young man had access. Soon after he
saw the latter put in his hand, and take out a piece of money. He made
an excuse to send the shopman out for a moment, and on examining
the till, missed one of the marked pieces of money. He thereupon gave
information to the police, and again placed money in the till similarly
marked, leaving a police-officer on the watch. The shopman was again
detected, he was then arrested, and taken to the police-station.
Many young men of this class are wretchedly paid by their employers,
and have barely enough to maintain them and keep them in decent
clothing. Many of them spend their money foolishly on extravagant
dress, or associating with girls, attending music-saloons, such as
Weston’s, in Holborn; the Pavilion, near the Haymarket; Canterbury
Hall; the Philharmonic, Islington; and others. Some frequent the
Grecian Theatre, City Road, and other gay resorts, and are led into
crime. In one season eighteen girls were known to have been seduced
by fast young men, and to become prostitutes through attending music-
saloons in the neighbourhood of Tottenham Court Road.
Embezzlements are occasionally committed by females of various
classes. Some of them, by fraudulent representations, obtain goods
from various tradesmen, consisting of candles, soap, sugar, as on
account of their customers. Some women of a higher class, such as
dressmakers, and others, are entrusted with merinos, silks, satins, and
other drapery goods which they embezzle.
A young married woman was lately tried at Guildhall, on a charge of
disposing of a quantity of silk entrusted to her. It appeared from the
evidence of the salesman of the silk manufacturer, that this female
applied to him for work, at same time producing a written
recommendation, purporting to come from a person known by the firm.
Materials to the value of 5l. 15s. were given her to be wrought up into
an article of dress. On applying for it at the proper time, he found she
had sold the materials, and had left her lodging. While the work was
supposed to be in progress, the firm had also given her 2l. 13s., on
partial payment. She pleaded poverty as the cause of her embezzling
the goods.
Parties connected with public societies occasionally embezzle the money
committed to their charge. The secretary of a friendly society in the
east-end, was brought before the Thames Police Court, charged with
embezzling various sums of money he had received on account of the
society. The secretary of another friendly society on the Surrey side,
was lately charged at Southwark Police Court with embezzling upwards
of 100l. This society has branches in all parts of the kingdom, but the
central office is in the metropolis. The secretary had been in their
service for upwards of two years, at a fixed salary. It was his duty to
receive contributions from the country, and town members; and to
account for the same to the treasurer. He recently absconded, when
large defalcations were discovered amounting to upwards of 100l.
A considerable number of embezzlements are committed by commercial
travellers, and by clerks in lawyers’ offices, banks, commercial firms,
and government offices. Some of them of great and serious amounts.
Tradesmen and others in the middle class, and some respectable
labouring men, and mechanics, place their sons in counting-houses, or
other establishments superior to their own position; these foolishly try
to maintain the appearance of their fellow-clerks who have ampler
pecuniary means. This often leads to embezzling the property of the
employer or firm.
Crimes of this class are occasionally committed by lawyers’ clerks, who
are in many cases wretchedly paid, as well as by some who have
handsome salaries. Numerous embezzlements are also perpetrated in
commercial firms, by their servants; some of them to the value of many
thousand pounds.
A commercial traveller was lately brought up at the Mansion House,
charged with embezzlement. It appears he travelled for a firm in the
City, and had been above ten years in their service at a salary of 1l. 1s.
per day. It was his duty to take orders and collect accounts as they
became due. Some days he received from the customers certain sums
and afterwards paid a less amount to the firm, keeping the rest of the
money in his hands, which he appropriated. Another day he received a
sum of money he never accounted for. He was committed for trial.
An embezzlement was committed by a cashier to a commercial firm in
the City. It appeared from the evidence, he had been in the service of
his employers for ten years, and kept the petty cash-book; with an
account of all sums paid. He had to account for the amounts given him
as petty cash, and for disbursements whenever he should be called.
From the extravagant style in which he was living, which reached the
ear of the firm, their suspicions were aroused, and one of them asked
him to bring his books into the counting-house, and render the
customary account of the petty cash. His employer discovered the
balance of some of the pages did not correspond with the balance
brought forward, and asked the cashier to account for it; when he
acknowledged that he had appropriated the difference to his own use.
Several items were then pointed out, ranging over a number of months,
in which he had plundered his employers of several hundred pounds.
This was effected in a very simple way; by carrying the balance of the
cash in hand to the top of next page 100l. less than it was on the
preceding page, and by calling the disbursements when his employers
checked the accounts, 100l. more than they really were.
The books of commercial firms are frequently falsified in other modes,
to effect embezzlements.
These defalcations often arise from fast life, extravagant habits, and
gambling. Many fashionable clerks in lawyers’ offices, banks, and
Government offices, frequent the Oxford and Alhambra music halls, the
West-end theatres, concerts, and operas. They attend the Holborn
Assembly-room and the Argyle Rooms, and are frequently to be seen at
masked balls, and at Cremorne Gardens during the season. They
occasionally indulge in midnight carousals in the Turkish divans and
supper-rooms. Some Government clerks have high salaries, and keep a
mistress in fashionable style, with brougham and coachman, and
footman; others maintain their family in a style their salary is unable to
support, all of which lead them step by step to embezzlement and ruin.
Number of cases of embezzlement in the Metropolitan districts for
1860
223
Ditto ditto in the City 70
293
Value of money and property abstracted thereby in the
Metropolitan districts—
£5,271
Ditto ditto in the City 2,660
£7,931
Magsmen, or Sharpers.
This is a peculiar class of unprincipled men, who play tricks with cards,
skittles, &c. &c., and lay wagers with the view of cheating those
strangers who may have the misfortune to be in their company.
Their mode of operation is this: There are generally three of them in a
gang—seldom or never less. They go out together, but do not walk
beside each other when they are at work. One may be on the one side
of the street, and the other two arm-in-arm on the other. They
generally dress well, and in various styles, some are attired as
gentlemen, others as country farmers. In one gang, a sharper is
dressed as a coachman in livery, and in another they have a
confederate attired as a parson, and wearing green spectacles.
Many of them start early in the morning from the bottom of Holborn
Hill, and branch off in different directions in search of dupes. They
frequent Fleet Street, Oxford Street, Strand, Regent Street, Shoreditch,
Whitechapel, Commercial Road, the vicinity of the railway stations, and
the docks. They are generally to be seen wandering about the streets
till four o’clock in the afternoon, unless they have succeeded in picking
up a stranger likely to be a victim. They visit the British Museum, St.
Paul’s, Westminster Abbey, and the Crystal Palace, &c., and on market
days attend the fairs.
The person who walks the street in front of the gang, is generally the
most engaging and social; the other two keep in sight, and watch his
movements. As the former proceeds along he keenly observes the
persons passing. If he sees a countryman or a foreigner pass who
appears to have money, or a person loitering by a shop-window, he
steps up to him and probably enters into conversation regarding some
object in sight.
For instance, in passing Somerset House in the Strand, he will go up to
him and ask what noble building that is, hinting at the same time that
he is a stranger in London. It frequently occurs that the individual he
addresses is also a stranger in London. Having entered into
conversation, the first object he has in view is to learn from the person
the locality to which he belongs. The sharp informs him he has some
relation there, or knows some person in the town or district. (Many of
the magsmen have travelled a good deal, and are acquainted with
many localities, some of them speak several foreign languages.) He
may then represent that he has a good deal of property, and is going
back to this village to give so much money to the poor. It sometimes
occurs in the course of conversation he proposes to give the stranger a
sum of money to distribute among the poor of his district, as he is
specially interested in them, and may at the same time produce his
pocket-book, with a bundle of flash notes. This may occur in walking
along the street. He will then propose to enter a beer-shop, or gin-
palace to have a glass of ale or wine. They go in accordingly. When
standing at the bar, or seated in the parlour, one of his confederates,
enters, and calls for a glass of liquor.
This party appears to be a total stranger to his companion. He soon
enters as it were casually into conversation, and they possibly speak of
their bodily strength. A bet is made that one of them cannot throw a
weight as many yards as the other. They make a wager, and the
stranger is asked to go with them as a referee, to decide the bet. They
may call a cab, and adjourn to some well-known skittle-alley. On going
there they find another confederate, who also pretends to be
unacquainted with the others. One of the two who made the wager as
to throwing the weight may pace the skittle-ground to find its
dimensions, and pretend it is not long enough.
They will then possibly propose to have a game at skittles, and will bet
with each other that they will throw down the pins in so many throws.
The sharp who introduced the stranger, and assumes to be his friend,
always is allowed to win, perhaps from 5s. to 10s., or more, as the case
may be. He plays well, and the other is not so good. Up to this time the
intended victim has no hand in the game. Another bet is made, and the
stranger is possibly induced to join in it with his agreeable companion,
and it is generally arranged that he wins the first time.
He is persuaded to bet for a higher amount by himself, and not in
partnership, which he loses, and continues to do so every time till he
has lost all he possessed.
He is invariably called out to the bar by the man who introduced him to
the house, when they have a glass together, and in the meantime the
others escape.
The sharp will say to the victim after staying there a short time, “I
believe these men not to be honest; I’ll go and see where they have
gone, and try and get your money back.” He goes out with the pretence
of looking after them, and walks off. The victim proceeds in search of
them, and finds they have decamped leaving him penniless.
They have a very ingenious mode of finding out if the person they
accost has money in his pocket. This is done after he is introduced into
the public-house when getting a glass of ale. The second confederate
comes in invariably. The two magsmen begin to converse as to the
money they have with them. One pretends he has so much money,
which the other will dispute. They possibly appear to get very angry,
and one of them makes a bet that he can produce more money than
any in the company. They then take out their cash, and induce the
stranger to do so, to find which of them has got the highest amount.
They thus learn how much money he has in his possession.
When they find he has a sufficient sum, they adjourn to a house they
are accustomed to use for the purpose of paying the sum lost by the
wager. It generally happens the stranger has most, and wins the bet.
On arriving at this house they wish a stamped receipt for the cash.
Being a stranger he is asked as a security to leave something as a
deposit till he returns. At the same time this sharp takes out a bag of
money containing medals instead of sovereigns, or a pocket-book with
flash notes.
He soon comes back with a receipt stamp, but a dispute invariably
arises whether it will do. He suggests that some one else should go and
get one. The stranger is urged to go for one. In the same manner he
leaves money on the table as a security that he will return.
He may not know where to get the receipt stamp, and one of them
proposes to accompany him. They walk along some distance together,
when this man will say, “I don’t much like these two men you have left
your money with; do you know them?” He will then advise him to go
back, and see if his cash is all right. On his return he finds them both
gone, and his money has also disappeared.
We shall now notice several of the tricks they practise to delude their
victims.
LIBERATION OF PRISONERS FROM COLDBATH FIELDS HOUSE OF CORRECTION.
The Card tricks.—These are not often practised in London but generally
at racecourses and country fairs, or where any pastime is going on.
Only three cards are used. There is one picture card along with two
others. They play with them generally on the ground or on their knee.
There are always several persons in a gang at this game. One works
the cards, shuffling them together, and then deals them on the ground.
They bet two to one no one will find the picture card (the Knave, King,
or Queen). One of the confederates makes a bet that he can find it, and
throws down a sovereign or half-sovereign, as the case may be.
He picks up one of the cards, which will be the picture card, or the one
they propose to find. The sharp dealing the cards bets that no one will
find the same card again. Some simpleton in the crowd will possibly bet
from 1l. to 10l. that he can find it. He picks up a card, which is not the
picture card and cannot be, as it has been secretly removed from the
pack, and another card has been substituted in its place.
Skittles.—They generally depend on the ability of one of their gang
when engaged in this game, so that he shall be able to take the
advantage when wanted. When they bet and find their opponent is
expert, he is expected to be able to beat him. In every gang there is
generally one superior player. He may pretend to play indifferently for a
time, but has generally superior skill, and wins the bet.
Thimble and Pea.—It is done in this way. There are three thimbles and
a pea. These are generally worked by a man dressed as a countryman,
with a smock-frock, at country fairs, race-courses, and other places
without the metropolitan police district. They commence by working the
pea from one thimble to another, similar to the card trick, and bet in the
same way until some person in the company—not a confederate—will
bet that he can find the pea. He lifts up one of the thimbles and
ascertains that it is not there. Meantime the pea has been removed. It
is secreted under the thumb nail of the sharp, and is not under either of
the thimbles.
The Lock.—While the sharps are seated in a convenient house with
their dupe, a man, a confederate of theirs, may come in, dressed as a
hawker, offering various articles for sale. He will produce a lock which
can be easily opened by a key in their presence. He throws the lock
down on the table and bets any one in the room they cannot open it.
One of his companions will make a bet that he can open it. He takes it
up, opens it easily, and wins the wager.
He will show the stranger how it is opened; after which, by a swift
movement of his hand, he substitutes another similar lock in its place
which cannot be opened. The former is induced possibly to bet that he
is able to open it.
The lock is handed to him; he thinks it is the same and tries to open it,
but does not succeed, and loses his wager.
There are various other tricks somewhat of a similar character, on which
they lay wagers and plunder their dupes. They have a considerable
number of moves with cards, and are ever inventing new dodges or
“pulls” as they term them.
They chiefly confine themselves on most occasions to the tricks we
have noticed. Sometimes, however, they play at whist, cribbage,
roulette, loo, and other card games, and manage to get the advantage
in many ways. One of them will look at the cards of his opponent when
playing, and will telegraph to some of the others by various signs and
motions, understood among themselves, but unintelligible to a stranger.
The same sharpers who walk the streets of London attend country fairs
and race-courses, in different dress and appearance, as if they had no
connexion with each other.
It often happens one of them is arrested for these offences and is
remanded. Before the expiry of the time his confederates generally
manage to see the dupe, and restore his property on the condition he
shall keep out of the way and allow the case to drop. The female who
cohabits with him, or possibly his wife, may call on him for this
purpose, and give him part or the whole of his money.
Their ages average from twenty to sixty years. Many of them are
married and have families; others cohabit with well-dressed women—
pickpockets and shoplifters.
Some are in better condition than others. They are occasionally shabbily
dressed and in needy condition; at other times in most respectable
attire—some appear as men of fashion.
They are generally very heartless in plundering their dupes. Not content
with stripping him of the money he may have on his person—
sometimes a large sum—they try to get the cash he has deposited in
the bank, and strip him of his watch and chain, leaving him without a
shilling in his pocket.
There is no formal association between the several gangs, yet from
their movements there appears to be an understanding between them.
For example, if a certain gang has plundered a victim in Oxford Street,
it will likely remove to another district for a time, and another party of
magsmen will take their place.
Magsmen are of various grades. Some are broken-down tradesmen,
others have been brokers and publicans and french-polishers, while part
of their number are convicted felons. Numbers of them are betting-men
and attend races; indeed most of them are connected with this
disreputable class. Many of them reside in the neighbourhood of
Waterloo Road and King’s Cross, and in quiet streets over the
metropolis.
They are frequently brought before the police-courts, charged with
conspiracy with intent to defraud; but the matter is in general secretly
arranged with the prosecutor, and the case is allowed to drop.
Sometimes when the sharps cannot manage to defraud the strangers
they meet with, they snatch their money from them with violence.
In the beginning of November, 1861, two sharps were brought before
the Croydon police-court, charged with being concerned, with others
not in custody, in stealing 116l., the property of a baker, residing in the
country.
As the prosecutor, a young man, was going along a country road he
met one of the sharps and a man not in custody. At this time there
were four men on the road playing cards. He remained for a few
minutes looking at them. The man who was the companion of the
sharp asked him to accompany him to a railway hotel, and ordered a
glass of ale for himself.
A man not in custody then asked a sharp to lend him some money,
saying he would get him good security; upon which the latter offered to
lend him the sum of 50l. at five per cent. interest. On the stranger
being represented to this person as a friend, he offered to lend him as
large a sum of money as he could produce himself, to show that he was
a respectable and substantial person. The sharp then told the baker to
go home and get 100l. and he would lend him that sum. He did so, one
of the sharps accompanying him nearly all the way to his house. The
dupe returned with a 10l. note. They told him it was not enough, and
wished him to leave it in their hands and to bring 100l. He went out
leaving the 10l. on the table as security for his coming back with more
money.
He returned with 100l. in bank notes and gold and counted it out on
the table. The sharp pretended then to be willing to lend 100l. at five
per cent., but added that he must have a stamped receipt. The dupe
left his money on the table covered with his handkerchief, and went out
to get a stamp, and on his return found the sharps and his money had
disappeared.
A few days after, the victim happening to be in London, saw one of
them in the street, and gave him into custody.
A few weeks ago three skittle-sharps, well-dressed men, were brought
before the Southwark police court, charged with robbing a country
waiter of 40l. in Bank of England notes. It appeared from the evidence,
that the prosecutor met a man in High Street, Southwark, on an
afternoon, who offered to show him the way to the Borough Road.
They entered a public-house on the way, when the other prisoners
came in. One of them pulled out a number of notes, and said he had
just come into possession of a fortune. It was suggested, in the course
of conversation, they should go to another house to throw a weight,
and the prosecutor was to go and see they had fair play.
They accordingly went to another house, but instead of throwing the
weight, skittles were introduced, and they played several games. The
prosecutor lost a sovereign, which was all the money he had with him.
One of the sharps bet 20l. that the waiter could not produce 60l. within
three hours. He accepted the bet and went with two of them to
Blackheath, and returned to the public house with the money,
amounting to 40l. in bank notes and 20l. in gold. They went to the
skittle-ground, when one of them snatched the notes out of his hand,
and they all decamped.
They were apprehended that night by Mr. Jones, detective at Tower
Street station.
The statistics of this class of crime will be given when we come to treat
of swindlers.
Swindlers.
Swindling is carried on very extensively in the metropolis in different
classes of society, from the young man who strolls into a coffeehouse in
Shoreditch or Bishopsgate, and decamps without paying his night’s
lodging, to the fashionable rogue who attends the brilliant assemblies in
the West-end. It occurs in private life and in the commercial world in
different departments of business. Large quantities of goods are sent
from the provinces to parties in London, who give orders and are
entirely unknown to those who send them, and fictitious references are
given, or references to confederates in town connected with them.
We select a few illustrations of various modes of swindling which prevail
over the metropolis.
A young man calls at a coffeehouse, or hotel, or a private lodging, and
represents that he is the son of a gentleman in good position, or that
he is in possession of certain property, left him by his friends, or that he
has a situation in the neighbourhood, and after a few days or weeks
decamps without paying his bill, perhaps leaving behind him an empty
carpet bag, or a trunk, containing a few articles of no value.
An ingenious case of swindling occurred in the City some time since. A
fashionably attired young man occupied a small office in White Lion
Court, Cornhill, London. It contained no furniture, except two chairs
and a desk. He obtained a number of bracelets from different jewellers,
and quantities of goods from different tradesmen to a considerable
amount, under false pretences. He was apprehended and tried before
the police court, and sentenced to twelve months’ imprisonment with
hard labour.
At the time of his arrest he had obtained possession of a handsome
residence at Abbey Wood, Kent, which was evidently intended as a
place of reference, where no doubt he purposed to carry on a profitable
system of swindling.
Swindlers have many ingenious modes of obtaining goods, sometimes
to a very considerable amount, from credulous tradesmen, who are too
often ready to be duped by their unprincipled devices. For example,
some of them of respectable or fashionable appearance may pretend
they are about to be married, and wish to have their house furnished.
They give their name and address, and to avoid suspicion may even
arrange particulars as to the manner in which the money is to be paid.
A case of this kind occurred in Grove Terrace, where a furniture-dealer
was requested to call on a swindler by a person who pretended to be
his servant, and received directions to send him various articles of
furniture. The goods were accordingly sent to the house. On a
subsequent day the servant called on him at his premises, with a well-
dressed young lady, whom she introduced as the intended wife of her
employer, and said they had called to select some more goods. They
selected a variety of articles, and desired they should be added to the
account. One day the tradesman called for payment, and was told the
gentleman was then out of town, but would call on him as soon as he
returned. Soon after he made another call at the house, which he found
closed up, and that he had been heartlessly duped. The value of the
goods amounted to 58l. 18s. 4d.
Swindling is occasionally carried on in the West-end in a bold and
brilliant style by persons of fashionable appearance and elegant
address. A lady-like person who assumed the name of Mrs. Gordon, and
sometimes Mrs. Major Gordon, and who represented her husband to be
in India, succeeded in obtaining goods from different tradesmen and
mercantile establishments at the West-end to a great amount, and gave
references to a respectable firm as her agents. Possessing a lady-like
appearance and address, she easily succeeded in obtaining a furnished
residence at St. John’s Wood, and applied to a livery stable-keeper for
the loan of a brougham, hired a coachman, and got a suit of livery for
him, and appeared in West-end assemblies as a lady of fashion. After
staying about a fortnight at St. John’s Wood she left suddenly, without
settling with any of her creditors. She addressed a letter to each of
them, requesting that their account should be sent to her agents, and
payment would be made as soon as Captain Gordon’s affairs were
settled. She expressed regret that she had been called away so abruptly
on urgent business.
She was usually accompanied by a little girl, about eleven years of age,
her daughter, and by an elderly woman, who attended to domestic
duties.
She was afterwards convicted at Marylebone police court, under the
name of Mrs. Helen Murray, charged with obtaining large quantities of
goods from West-end tradesmen by fraudulent means.
A considerable traffic in commercial swindling in various forms is carried
on in London. Sometimes fraudulently under the name of another well-
known firm; at other times under the name of a fictitious firm.
A case of this kind was tried at the Liverpool assizes, which illustrates
the fraudulent system we refer to. Charles Howard and John Owen
were indicted for obtaining goods on false pretences. In other counts of
their indictment they were charged with having conspired with another
man named Bonar Russell—not in custody—with obtaining goods under
false pretences. The prosecutor Thomas Parkenson Luthwaite, a currier
at Barton in Westmoreland, received an order by letter from John
Howard and Co. of Droylesden, near Manchester, desiring him to send
them a certain quantity of leather, and reference was given as to their
respectability. The prosecutor sent the leather and a letter by post
containing the invoice. The leather duly arrived at Droylesden; but the
police having received information gave notice to the railway officials to
detain it, until they got further knowledge concerning them. Howard
and Russell went to the station, but were told they could not get the
leather, as there was no such firm as Howard and Co. at Droylesden.
Howard replied that there was—that he lived there. It was subsequently
arranged that the goods should be delivered, on the party producing a
formal order. On the next day, Owen came with a horse and cart to
Droylesden station, and asked for the goods, at the same time
producing his order.
They were delivered to him, when he put them in his cart and drove off.
Two officers of police in plain clothes accosted him, and asked for a ride
in his cart which he refused. The officers followed him, and found he
did not go to Droylesden, but to a house at Hulme near Manchester, as
he had been directed. This house was searched, and Howard and
Russell were arrested. Howard having been admitted to bail, did not
appear at the trial.
On farther inquiries it was found there was no such firm as John
Howard and Co. at Droylesden, but that Howard and Russell had taken
a house there which was not furnished, and where they went
occasionally to receive letters addressed to Howard and Co.,
Droylesden. Owen was acquitted; Howard was found guilty of
conspiracy with intent to defraud.
A number of cases occur where swindlers attempt to cheat different
societies in various ways. Two men were tried at the police court a few
days ago for unlawfully attempting to cheat and defraud a loan society
to obtain 5l. The prisoners formed part of a gang of swindlers, who
operated in this way:—Some of them took a house for the purpose of
giving references to others, who applied to loan societies for an
advance of money, and produced false receipts for rent and taxes. They
had carried on this system for years, and many of them had been
convicted. Some of the gang formerly had an office in Holborn, where
they defrauded young men in search of situations by getting them to
leave a sum of money as security. They were tried and convicted on
this charge.
There is another heartless system of base swindling perpetrated by a
class of cheats, who pretend to assist parties in getting situations, and
hold out flaming inducements through advertisements in the
newspapers to working men, servants, clerks, teachers, clergymen, and
others; and contrive to get a large income by duping the public.
A swindler contrived to obtain sums of 5s. each in postage stamps, or
post-office orders, from a large number of people, under pretence of
obtaining situations for them as farm bailiffs. An advertisement was
inserted in the newspaper, and in reply to the several applicants, a
letter was returned, stating that although the applicant was among the
leading competitors another party had secured the place. At the same
time another attempt was made to inveigle the dupe, under the
pretence of paying another fee of 5s., with the hope of obtaining a
similar situation in prospect. The swindler intimated that the only
interest he had in the matter was the agent’s fee, charged alike to the
employer and the employed, and generally paid in advance. He desired
that letters addressed to him should be directed to 42, Sydney Street,
Chorlton-upon-Medlock. He had an empty house there, taken for the
purpose, with the convenience of a letter-box in the door into which the
postman dropped letters twice a day. A woman came immediately after
each post and took them away.
On arresting the woman, the officers found in her basket 87 letters, 44
of them containing 5s. in postage stamps, or a post-office order payable
to the swindler himself. Nearly all the others were letters from persons
at a distance from a post office, who were unable to remit the 5s., but
promised to send the money when they got an opportunity.
On a subsequent day, 120 letters were taken out of the letter-box, most
of them containing a remittance. This system had been in operation for
a month. One day 190 letters were delivered by one post. It was
estimated that no fewer than 3000 letters had come in during the
month, most of them enclosing 5s.; and it is supposed the swindler had
received about 700l., a handsome return for the price of a few
advertisements in newspapers, a few lithographed circulars, a few
postage-stamps, and a quarter of a year’s rent of an empty house.
Another case of a similar kind, occurred at the Maidstone assizes. Henry
Moreton, aged 43, a tall gentlemanly man, and a young woman aged
19 years, were indicted for conspiring to obtain goods and money by
false pretences. The name given by the male prisoner was known to be
an assumed one. It was stated that he was well connected and formerly
in a good position in society.
At the trial, a witness deposed that an advertisement had appeared in a
Cornish newspaper, addressed to Cornish miners, stating they could be
sent out to Australia by an English gold-mining company, and would be
paid 20l. of wages per month, to commence on their arrival at the
mines. The advertisement also stated that if 1s. or twelve postage
stamps were sent to Mr. Henry Moreton, Chatham, a copy of the
stamped agreement and full particulars as to the company, would be
given.
The prisoner was arrested, and 41 letters found in his possession,
addressed to “Mr. H. Moreton, Chatham:” 25 of the letters contained
twelve postage stamps each and some of them had 1s. inside. It was
ascertained the female cohabited with him. It appeared that he had
pawned 482 stamps on the 14th February, for 1l. 15s., 289 on the 21st,
for 1l., and 744 on another day.
Eighty-two letters came in one day chiefly from Ireland and Cornwall.
On searching a box in his room they found a large quantity of Irish and
Cornish newspapers, many of them containing the advertisement
referred to.
He was found guilty, and was sentenced to hard labour for fifteen
months. The young woman was acquitted.
The judge, in passing sentence, observed that the prisoner had been
convicted of swindling poor people, and his being respectably
connected aggravated the case.
We give the following illustration of an English swindler’s adventures on
the Continent.
A married couple were tried at Pau, on a charge of swindling. The
husband represented himself to be the son of a colonel in the English
army and of a Neapolitan princess. His wife pretended to be the
daughter of an English general. They said they were allied to the
families of the Dukes of Norfolk, Leinster, and Devonshire. They came in
a post-chaise to the Hotel de France, accompanied by several servants,
lived in the style of persons of the highest rank, and run up a bill of
6000 francs. As the landlord declined to give credit for more, they took
a château, which they got fitted up in a costly way. They paid 2500
francs for rent, and were largely in debt to the butcher, tailor, grocer,
and others. The lady affected to be very pious, and gave 895 francs to
the abbé for masses.
An English lady who came from Brussels to give evidence, stated that
her husband had paid 50,000 francs to release them from a debtors’
prison at Cologne, as he believed them to be what they represented. It
was shown at the trial that they had received letters from Lord Grey,
the King of Holland, and other distinguished personages. They were
convicted of swindling, and condemned to one year’s imprisonment, or
to pay a fine of 200 francs.
On hearing the sentence the woman uttered a piercing cry and fainted
in her husband’s arms, but soon recovered. They were then removed to
prison.
The assumption of a variety of names, some of them of a high-
sounding and pretentious character, is resorted to by swindlers giving
orders for goods by letter from a distance—an address is also assumed
of a nature well calculated to deceive: as an instance, we may mention
that an individual has for a long period of time fared sumptuously upon
the plunder obtained by his fraudulent transactions, of whose aliases
and pseudo residences the following are but a few:—
Creighton Beauchamp Harper; the Russets, near Edenbridge.
Beauchamp Harper; Albion House, Rye.
Charles Creighton Beauchamp Harper; ditto.
Neanberrie Harper, M. N. I.; The Broadlands, Winchelsea.
Beauchamp Harper; Halden House, Lewes.
R. E. Beresford; The Oaklands, Chelmsford.
The majority of these residencies existed only in the imagination of this
indefatigable cosmopolite. In some cases he had christened a paltry
tenement let at the rent of a few shillings per week “House;” a small
cottage in Albion Place, Rye, being magnified into “Albion House.” When
an address is assumed having no existence, his plan is to request the
postmaster of the district to send the letters, &c., to his real address—
generally some little distance off—a similar notice also being given at
the nearest railway station. The goods ordered are generally of such a
nature as to lull suspicion, viz., a gun, as “I am going to a friend’s
grounds to shoot and I want one immediately;” “a silver cornet;” “two
umbrellas, one for me and one for Mrs. Harper;” “a fashionable bonnet
with extra strings, young looking, for Mrs. Harper;” “white lace frock for
Miss Harper, immediately;” “a violet-coloured velvet bonnet for my
sister,” &c., &c., &c., ad infinitum.
A person, pretending to be a German baron, some time ago ordered
and received goods to a large amount from merchants in Glasgow. It
was ascertained he was a swindler. He was a man of about forty years
of age, 5 feet 8 inches high, and was accompanied by a lady about
twenty-five years of age. They were both well-educated people, and
could speak the English language fluently.
A fellow, assuming the name of the Rev. Mr. Williams, pursued a
romantic and adventurous career of swindling in different positions in
society, and was an adept in deception. On one occasion, by means of
forged credentials, he obtained an appointment as curate in
Northamptonshire, where he conducted himself for some time with a
most sanctimonious air. Several marriages were celebrated by him,
which were apparently satisfactorily performed. He obtained many
articles of jewellery from firms in London, who were deceived by his
appearance and position. He wrote several modes of handwriting, and
had a plausible manner of insinuating himself into the good graces of
his victims.
He died a very tragical death. Having been arrested for swindling he
was taken to Northampton. On his arrival at the railway station there,
he threw himself across the rails and was crushed to death by the train.
There is a mode of extracting money from the unwary, practised by a
gang of swindlers by means of mock auctions. They dispose of
watches, never intended to keep time, and other spurious articles, and
have confederates, or decoys, who pretend to bid for the goods at the
auctions, and sometimes buy them at an under price; but they are by
arrangement returned soon after, and again offered for sale.
We have been favoured with some of the foregoing particulars by the
officials of Stubbs’ Mercantile Offices; the courtesy of the secretary
having also placed the register of that extensive establishment at our
service.
Number of cases of fraud and conspiracy with intent to defraud in
the Metropolitan districts for 1860
325
Ditto ditto in the City 51
376
Value of property thereby abstracted in the Metropolitan district£3,443
Ditto ditto in the City 2,429
£5,872
BEGGARS AND CHEATS.
In primitive times beggars were recognised as a legitimate
component part in the fabric of society. Socially, and apart from state
government, there were, during the patriarchal period, three states
of the community, and these were the landowners, their servants,
and the dependants of both—beggars. There was no disgrace
attached to the name of beggar at this time, for those who lived by
charity were persons who were either too old to work or were
incapacitated from work by bodily affliction. This being the condition
of the beggars of the early ages, it was considered no less a sacred
than a social duty to protect them and relieve their wants. Many
illustrious names, both in sacred and profane history, are associated
with systematic mendicancy, and the very name of “beggar” has
derived a sort of classic dignity from this circumstance. Beggars are
frequently mentioned with honour in the Old Testament; and in the
New, one of the most touching incidents in our Lord’s history has
reference to “a certain beggar named Lazarus, which was laid at the
rich man’s gate.” Nor must it be forgotten that the father of poetry,
the immortal Homer, was a beggar and blind, and went about
singing his own verses to excite charity. The name of Belisarius is
more closely associated with the begging exploits ascribed to him
than with his great historical conquests. “Give a halfpenny to a poor
man” was as familiar a phrase in Latin in the old world as it is to-day
in the streets of London. It would be tedious to enumerate all the
instances of honourable beggary which are celebrated in history, or
even to glance at the most notable of them; it will be enough for the
purpose we have in view if I direct attention to the aspects of
beggary at a few marked periods of history.
It will be found that imposture in beggary has invariably been the
offspring of a high state of civilization, and has generally had its
origin in large towns. When mendicancy assumes this form it
becomes a public nuisance, and imperatively calls for prohibitive
laws. The beggar whose poverty is not real, but assumed, is no
longer a beggar in the true sense of the word, but a cheat and an
impostor, and as such he is naturally regarded, not as an object for
compassion, but as an enemy to the state. In all times, however, the
real beggar—the poor wretch who has no means of gaining a
livelihood by his labour, the afflicted outcast, the aged, the forsaken,
and the weak—has invariably commanded the respect and excited
the compassion of his more fortunate fellow-men. The traces of this
consideration for beggars which we find in history are not a little
remarkable. In the early Saxon times the relief of beggars was one
of the most honourable duties of the mistress of the house. Our
beautiful English word “lady” derives its origin from this practice. The
mistress of a Saxon household gave away bread with her own hand
to the poor, and thence she was called “lef day” or bread giver,
which at a later period was rendered into lady. A well-known
incident in the life of Alfred the Great shows how sacred a duty the
giving of alms was regarded at that period. In early times beggary
had even a romantic aspect. Poets celebrated the wanderings of
beggars in so attractive a manner that great personages would
sometimes envy the condition of the ragged mendicant and imitate
his mode of life. James V. of Scotland was so enamoured of the life
of the gaberlunzie man that he assumed his wallet and tattered
garments, and wandered about among his subjects begging from
door to door, and singing ballads for a supper and a night’s lodging.
The beggar’s profession was held in respect at that time, for it had
not yet become associated with imposture; and as the country
beggars were also ballad-singers and story-tellers, their visits were
rather welcome than otherwise. It must also be taken into account
that beggars were not numerous at this period.
It would appear that beggars first began to swarm and become
troublesome and importunate shortly after the Reformation. The
immediate cause of this was the abolition and spoliation of the
monasteries and religious houses by Henry VIII. Whatever amount
of evil they may have done, the monasteries did one good thing—
they assisted the poor and provided for many persons who were
unable to provide for themselves. When the monasteries were
demolished and their revenues confiscated, these dependent
persons were cast upon the world to seek bread where they could
find it. As many of them were totally unaccustomed to labour, they
had no resource but to beg. The result was that the country was
soon overrun with beggars, many of whom exacted alms by violence
and by threats. In the course of the next reign we hear of legislative
enactments for the suppression of beggary. The first efforts in this
direction wholly failed to abate the nuisance, and more stringent
acts were passed. In the reign of Charles II. begging had become so
profitable that a great many Irish came over to this country to
pursue it as a trade.
The evil then became so intolerable that a royal proclamation was
issued, specially directed to check the importation of beggars from
Ireland. It is intituled “A Proclamation for the speedy rendering away
of the Irishe Beggars out of this Kingdome into their owne Countrie
and for the Suppressing and Ordering of Rogues and Vagabonds
according to the Laws,” which recites that: “Whereas this realme
hath of late been pestered with great numbers of Irishe beggars
who live here idly and dangerously, and are of ill example to the
natives of this kingdome; and, whereas the multitude of English
rogues and vagabonds doe much more abound than in former tymes
—some wandering and begging under the colour of soldiers and
mariners, others under the pretext of impotent persons, whereby
they become a burthen to the good people of the land, all which
happeneth by the neglect of the due execution of the lawes,
formerly with great providence made, for relief of the true poore and
indigent, and for the punishment of sturdy rogues and vagabonds;
for the reforming therefore of soe great a mischiefe, and to prevent
the many dangers which will ensue by the neglect thereof, the king,
by the advice of his privy council and of his judges, commands that
all the laws and statutes now in force for the punishment of rogues
and vagabonds be duly putt in execution; and more particularly that
all Irishe beggars, which now are in any part of this kingdome,
wandering or begging, under what pretence soever, shall forthwith
depart this realme and return to their owne countries, and there
abide.” And it is further directed that all such beggars “shall be
conveyed from constable to constable to Bristoll, Mynhead,
Barstable, Chester, Lyrepool, Milford-haven, and Workington, or such
of them as shall be most convenient.”
We see by this that the state of mendicancy in 1629, was very much
what it is now, and that the artifices and dodges resorted to at that
period were very similar to, and in many cases, exactly the same, as
the more modern impostures which I shall have to expose in the
succeeding pages.
THE ORIGIN AND HISTORY OF THE POOR
LAWS.
An Act passed in 1536 (27 Henry VIII. c. 25) is the first by which
voluntary charity was converted into compulsory payment. It enacts
that the head officers of every parish to which the impotent or able-
bodied poor may resort under the provisions of the Act of 1531, shall
receive and keep them, so that none shall be compelled to beg
openly. The able-bodied were to be kept to constant labour, and
every parish making default, was to forfeit 20s. a month. The money
required for the support of the poor, was to be collected partly by
the head officers of corporate towns and the churchwardens of
parishes, and partly was to be derived from collections in the
churches, and on various occasions where the clergy had
opportunities for exhorting the people to charity. Alms-giving beyond
the town or parish was prohibited on forfeiture of ten times the
amount given. A “sturdy beggar” was to be whipped the first time he
was detected in begging; to have his right ear cropped for the
second offence; and if again guilty of begging was to be indicted for
“wandering, loitering, and idleness,” and if convicted was “to suffer
execution of death as a felon and an enemy of the Commonwealth.”
The severity of this act prevented its execution, and it was repealed
by 1 Edward VI. c. 3 (1547). Under this statute, every able-bodied
person who should not apply himself to some honest labour, or offer
to serve for even meat and drink, was to be taken for a vagabond,
branded on the shoulder and adjudged a slave for two years to any
one who should demand him, to be fed on bread and water and
refuse meat and made to work by being beaten, chained, or
otherwise treated. If he ran away during the two years, he was to be
branded on the cheek and adjudged a slave for life, and if he ran
away again he was to suffer death as a felon. If not demanded as a
slave he was to be kept to hard labour on the highway in chains.
The impotent poor were to be passed to their place of birth or
settlement from the hands of one parish constable to those of
another.
The statute was repealed three years afterwards and that of 1531
was revived. In 1551 an Act was passed which directed that a book
should be kept in every parish containing the names of the
householders and of the impotent poor; that collectors of alms
should be appointed who should “gently ask every man and woman
what they of their charity will give weekly to the relief of the poor.” If
any one able to give should refuse, or discourage others from giving,
the ministers and churchwardens were to exhort him, and failing of
success, the bishop was to admonish him on the subject. This Act,
and another made to enforce it, which was passed in 1555, were
wholly ineffectual, and in 1563 it was re-enacted (5 Elizabeth c. 3),
with the addition that any person able to contribute and refusing
should be cited by the bishop to appear at the next sessions before
the justices, where if he would not be persuaded to give, the justices
were to tax him according to their discretion, and on his refusal he
was to be committed to gaol until the sum taxed should be paid,
with all arrears.
The next statute on the subject, which was passed in 1572 (14 Eliz.
c. 5), shows how ineffectual the previous statutes had been. It
enacted that all rogues, vagabonds and sturdy beggars, including in
this description “all persons whole and mighty in body, able to
labour, not having land or master, nor using any lawful merchandise,
craft or mystery, and all common labourers, able in body, loitering
and refusing to work for such reasonable wage as is commonly
given,” should “for the first offence be grievously whipped and
burned through the gristle of the right ear with a hot iron of the
compass of an inch about;” for the second should be deemed felons;
and for the third should suffer death as felons without benefit of
clergy.
For the relief and sustentation of the aged and impotent poor, the
justices of the peace within their several districts were “by their good
discretion” to tax and assess all the inhabitants dwelling therein. Any
one refusing to contribute was to be imprisoned until he should
comply with the assessment. By the statutes 39 of Elizabeth, c. 3
and 4 (1598), every able-bodied person refusing to work for the
ordinary wages was to be “openly whipped until his body should be
bloody, and forthwith sent from parish to parish, the most strait way
to the parish where he was born, there to put himself to labour as a
true subject ought to do.”
The next Act, the 43 Elizabeth, c. 2, has been in operation from the
time of its enactment in 1601 to the present day. A change in the
mode of administration was, however, effected by the Poor Law
Amendment Act (4 and 5 Wm. IV. c. 76) which was passed in 1834.
During that long period many abuses crept into the administration of
the laws relating to the poor, so that in practice their operation
impaired the character of the most numerous class, and was
injurious to the whole country. In its original provisions the Act of
Elizabeth directed the overseers of the poor in every parish to “take
order for setting to work the children of all such parents as shall not
be thought able to maintain their children,” as well as all such
persons as, having no means to maintain them, use no ordinary
trade to get their living by. For this purpose they were empowered to
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com

Mastering Predictive Analytics with R 2nd edition Edition Forte

  • 1.
    Instant Ebook Access,One Click Away – Begin at ebookgate.com Mastering Predictive Analytics with R 2nd edition Edition Forte https://ebookgate.com/product/mastering-predictive- analytics-with-r-2nd-edition-edition-forte/ OR CLICK BUTTON DOWLOAD EBOOK Get Instant Ebook Downloads – Browse at https://ebookgate.com Click here to visit ebookgate.com and download ebook now
  • 2.
    Instant digital products(PDF, ePub, MOBI) available Download now and explore formats that suit you... Intelligent Techniques for Predictive Data Analytics 1st Edition Neha Singh https://ebookgate.com/product/intelligent-techniques-for-predictive- data-analytics-1st-edition-neha-singh/ ebookgate.com Applied Predictive Analytics Principles and Techniques for the Professional Data Analyst 1st Edition Dean Abbott https://ebookgate.com/product/applied-predictive-analytics-principles- and-techniques-for-the-professional-data-analyst-1st-edition-dean- abbott/ ebookgate.com Modern Statistics With R From Wrangling and Exploring Data to Inference and Predictive Modelling second edition Måns Thulin https://ebookgate.com/product/modern-statistics-with-r-from-wrangling- and-exploring-data-to-inference-and-predictive-modelling-second- edition-mans-thulin-2/ ebookgate.com Modern Statistics with R From Wrangling and Exploring Data to Inference and Predictive Modelling Second Edition Måns Thulin https://ebookgate.com/product/modern-statistics-with-r-from-wrangling- and-exploring-data-to-inference-and-predictive-modelling-second- edition-mans-thulin/ ebookgate.com
  • 3.
    Advanced Analytics withExcel 2019 1st Edition Manisha Nigam https://ebookgate.com/product/advanced-analytics-with-excel-2019-1st- edition-manisha-nigam/ ebookgate.com Predictive Modeling with SAS Enterprise Miner Practical Solutions for Business Applications 2nd Edition Kattamuri S. Sarma https://ebookgate.com/product/predictive-modeling-with-sas-enterprise- miner-practical-solutions-for-business-applications-2nd-edition- kattamuri-s-sarma/ ebookgate.com Digital Marketing Analytics 2nd Edition Kevin Hartman https://ebookgate.com/product/digital-marketing-analytics-2nd-edition- kevin-hartman/ ebookgate.com Introduction to Data Analytics for Accounting 2nd Edition -- https://ebookgate.com/product/introduction-to-data-analytics-for- accounting-2nd-edition/ ebookgate.com Machine Learning with R Cookbook 2nd Edition Ashishsingh Bhatia https://ebookgate.com/product/machine-learning-with-r-cookbook-2nd- edition-ashishsingh-bhatia/ ebookgate.com
  • 6.
    Mastering Predictive Analyticswith R Second Edition
  • 7.
    Table of Contents MasteringPredictive Analytics with R Second Edition Credits About the Authors About the Reviewer www.PacktPub.com eBooks, discount offers, and more Why subscribe? Customer Feedback Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Downloading the color images of this book Errata Piracy Questions 1. Gearing Up for Predictive Modeling Models Learning from data The core components of a model Our first model – k-nearest neighbors Types of model Supervised, unsupervised, semi-supervised, and reinforcement learning models Parametric and nonparametric models Regression and classification models Real-time and batch machine learning models The process of predictive modeling Defining the model's objective Collecting the data Picking a model
  • 8.
    Pre-processing the data Exploratorydata analysis Feature transformations Encoding categorical features Missing data Outliers Removing problematic features Feature engineering and dimensionality reduction Training and assessing the model Repeating with different models and final model selection Deploying the model Summary 2. Tidying Data and Measuring Performance Getting started Tidying data Categorizing data quality The first step The next step The final step Performance metrics Assessing regression models Assessing classification models Assessing binary classification models Cross-validation Learning curves Plot and ping Summary 3. Linear Regression Introduction to linear regression Assumptions of linear regression Simple linear regression Estimating the regression coefficients Multiple linear regression Predicting CPU performance Predicting the price of used cars Assessing linear regression models Residual analysis Significance tests for linear regression
  • 9.
    Performance metrics forlinear regression Comparing different regression models Test set performance Problems with linear regression Multicollinearity Outliers Feature selection Regularization Ridge regression Least absolute shrinkage and selection operator (lasso) Implementing regularization in R Polynomial regression Summary 4. Generalized Linear Models Classifying with linear regression Introduction to logistic regression Generalized linear models Interpreting coefficients in logistic regression Assumptions of logistic regression Maximum likelihood estimation Predicting heart disease Assessing logistic regression models Model deviance Test set performance Regularization with the lasso Classification metrics Extensions of the binary logistic classifier Multinomial logistic regression Predicting glass type Ordinal logistic regression Predicting wine quality Poisson regression Negative Binomial regression Summary 5. Neural Networks The biological neuron The artificial neuron Stochastic gradient descent
  • 10.
    Gradient descent andlocal minima The perceptron algorithm Linear separation The logistic neuron Multilayer perceptron networks Training multilayer perceptron networks The back propagation algorithm Predicting the energy efficiency of buildings Evaluating multilayer perceptrons for regression Predicting glass type revisited Predicting handwritten digits Receiver operating characteristic curves Radial basis function networks Summary 6. Support Vector Machines Maximal margin classification Support vector classification Inner products Kernels and support vector machines Predicting chemical biodegration Predicting credit scores Multiclass classification with support vector machines Summary 7. Tree-Based Methods The intuition for tree models Algorithms for training decision trees Classification and regression trees CART regression trees Tree pruning Missing data Regression model trees CART classification trees C5.0 Predicting class membership on synthetic 2D data Predicting the authenticity of banknotes Predicting complex skill learning Tuning model parameters in CART trees Variable importance in tree models
  • 11.
    Regression model treesin action Improvements to the M5 model Summary 8. Dimensionality Reduction Defining DR Correlated data analyses Scatterplots Causation The degree of correlation Reporting on correlation Principal component analysis Using R to understand PCA Independent component analysis Defining independence ICA pre-processing Factor analysis Explore and confirm Using R for factor analysis The output NNMF Summary 9. Ensemble Methods Bagging Margins and out-of-bag observations Predicting complex skill learning with bagging Predicting heart disease with bagging Limitations of bagging Boosting AdaBoost AdaBoost for binary classification Predicting atmospheric gamma ray radiation Predicting complex skill learning with boosting Limitations of boosting Random forests The importance of variables in random forests XGBoost Summary 10. Probabilistic Graphical Models
  • 12.
    A little graphtheory Bayes' theorem Conditional independence Bayesian networks The Naïve Bayes classifier Predicting the sentiment of movie reviews Predicting promoter gene sequences Predicting letter patterns in English words Summary 11. Topic Modeling An overview of topic modeling Latent Dirichlet Allocation The Dirichlet distribution The generative process Fitting an LDA model Modeling the topics of online news stories Model stability Finding the number of topics Topic distributions Word distributions LDA extensions Modeling tweet topics Word clouding Summary 12. Recommendation Systems Rating matrix Measuring user similarity Collaborative filtering User-based collaborative filtering Item-based collaborative filtering Singular value decomposition Predicting recommendations for movies and jokes Loading and pre-processing the data Exploring the data Evaluating binary top-N recommendations Evaluating non-binary top-N recommendations Evaluating individual predictions Other approaches to recommendation systems
  • 13.
    Summary 13. Scaling Up Startingthe project Data definition Experience Data of scale – big data Using Excel to gauge your data Characteristics of big data Volume Varieties Sources and spans Structure Statistical noise Training models at scale Pain by phase Specific challenges Heterogeneity Scale Location Timeliness Privacy Collaborations Reproducibility A path forward Opportunities Bigger data, bigger hardware Breaking up Sampling Aggregation Dimensional reduction Alternatives Chunking Alternative language integrations Summary 14. Deep Learning Machine learning or deep learning What is deep learning? An alternative to manual instruction
  • 14.
    Growing importance Deeper data? Deeplearning for IoT Use cases Word embedding Word prediction Word vectors Numerical representations of contextual similarities Netflix learns Implementations Deep learning architectures Artificial neural networks Recurrent neural networks Summary Index
  • 15.
    Mastering Predictive Analyticswith R Second Edition
  • 16.
    Mastering Predictive Analyticswith R Second Edition Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2015 Second edition: August 2017 Production reference: 1140817 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78712-139-3 www.packtpub.com
  • 17.
    Credits Authors James D. Miller RuiMiguel Forte Reviewer Davor Lozić Commissioning Editor Amey Varangaonkar Acquisition Editor Divya Poojari Content Development Editor Deepti Thore Technical Editor Nilesh Sawakhande Copy Editor Safis Editing Project Coordinator Shweta H Birwatkar Proofreader Safis Editing
  • 18.
    Indexer Pratik Shirodkar Graphics Tania Dutta ProductionCoordinator Shantanu Zagade Cover Work Shantanu Zagade
  • 19.
    About the Authors JamesD. Miller is an IBM-certified expert, creative innovator, accomplished director, senior project leader, and application/system architect. He has over 35 years of extensive experience in application and system design and development across multiple platforms and technologies. His experience includes introducing customers to new technologies and platforms, integrating with IBM Watson Analytics, Cognos BI, and TM1. He has worked in web architecture design, systems analysis, GUI design and testing, database modeling, systems analysis, design and development of OLAP, web and mainframe applications and systems utilization, IBM Watson Analytics, IBM Cognos BI and TM1 (TM1 rules, TI, TM1Web, and Planning Manager), Cognos Framework Manager, dynaSight - ArcPlan, ASP, DHTML, XML, IIS, MS Visual Basic and VBA, Visual Studio, Perl, Splunk, WebSuite, MS SQL Server, Oracle, and Sybase server. James's responsibilities have also included all aspects of Windows and SQL solution development and design, such as analysis; GUI (and website) design; data modeling; table, screen/form, and script development; SQL (and remote stored procedures and triggers) development/testing; test preparation; and management and training of programming staff. His other experience includes the development of ETL infrastructures, such as data transfer automation between mainframe (DB2, Lawson, Great Plains, and so on) system and client/server SQL Server, web-based applications, and the integration of enterprise applications and data sources. James has been a web application development manager responsible for the design, development, QA, and delivery of multiple websites, including online trading applications and warehouse process control and scheduling systems, as well as administrative and control applications. He was also responsible for the design, development, and administration of a web- based financial reporting system for a 450-million dollar organization, reporting directly to the CFO and his executive team. Furthermore, he has been responsible for managing and directing multiple resources in various management roles, including as project and team leader, lead developer, and application development director. James has authored Cognos TM1 Developers Certification Guide, Mastering Splunk, and a number of white papers on best practices, including Establishing a Center of Excellence. He continues to post blogs on a number of relevant topics based on personal experiences and industry best practices. James is a perpetual learner, continuing to pursue new experiences and certifications. He currently holds the following technical certifications: IBM
  • 20.
    Certified Business Analyst- Cognos TM1 IBM Cognos TM1 Master 385 Certification (perfect score of 100%), IBM Certified Advanced Solution Expert - Cognos TM1, IBM Cognos TM1 10.1 Administrator Certification C2020-703 (perfect score of 100%), IBM OpenPages Developer Fundamentals C2020-001-ENU (98% in exam), IBM Cognos 10 BI Administrator C2020-622 (98% in exam), and IBM Cognos 10 BI Professional C2020-180. He specializes in the evaluation and introduction of innovative and disruptive technologies, cloud migration, IBM Watson Analytics, Cognos BI and TM1 application design and development, OLAP, Visual Basic, SQL Server, forecasting and planning, international application development, business intelligence, project development and delivery, and process improvement. I'd like to thank, Nanette L. Miller, and remind her that "Your destiny is my destiny. Your happiness is my happiness." I'd also like to thank Shelby Elizabeth and Paige Christina, who are both women of strength and beauty and whom I have no doubt will have a lasting, loving effect on the world. Rui Miguel Forte is currently the chief data scientist at Workable. He was born and raised in Greece and studied in the UK. He is an experienced data scientist, with over 10 years of work experience in a diverse array of industries spanning mobile marketing, health informatics, education technology, and human resources technology. His projects have included predictive modeling of user behavior in mobile marketing promotions, speaker intent identification in an intelligent tutor, information extraction techniques for job applicant resumes, and fraud detection for job scams. He currently teaches R, MongoDB, and other data science technologies to graduate students in the Business Analytics MSc program at the Athens University of Economics and Business. In addition, he has lectured at a number of seminars, specialization programs, and R schools for working data science professionals in Athens. His core programming knowledge is in R and Java, and he has extensive experience of a variety of database technologies, such as Oracle, PostgreSQL, MongoDB, and HBase. He holds a master's degree in Electrical and Electronic Engineering from Imperial College London and is currently researching machine learning applications in information extraction and natural language processing. Behind every great adventure is a good story and writing a book is no exception. Many people contributed to making this book a reality. I would like to thank the
  • 21.
    many students Ihave taught at AUEB whose dedication and support has been nothing short of overwhelming. They should be rest assured that I have learned just as much from them as they have learned from me, if not more. I also want to thank Damianos Chatziantoniou for conceiving a pioneering graduate data science program in Greece. Workable has been a crucible for working alongside incredibly talented and passionate engineers on exciting data science projects that help businesses around the globe. For this, I would like to thank my colleagues and in particular the founders, Nick and Spyros, who created a diamond in the rough. I would like to thank Subho, Govindan, and all the folks at Packt for their professionalism and patience. My family and extended family have been an incredible source of support on this project. In particular, I would like to thank my father, Libanio, for inspiring me to pursue a career in the sciences and my mother, Marianthi, for always believing in me far more than anyone else ever could. My wife, Despoina, patiently and fiercely stood by my side even as this book kept me away from her during her first pregnancy. Last but not least, my baby daughter slept quietly and kept a cherubic vigil over her father during the book review phase. She helped me in ways words cannot describe.
  • 22.
    About the Reviewer DavorLozić is a senior software engineer interested in various subjects, especially computer security, algorithms, and data structures. He manages a team of more than 15 engineers and is a part-time assistant professor who lectures about database systems and interoperability. You can visit his website at http://warriorkitty.com. He likes cats! If you want to talk about any aspect of technology or if you have funny pictures of cats, feel free to contact him.
  • 23.
  • 24.
    eBooks, discount offers,and more Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. https://www.packtpub.com/mapt Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
  • 25.
    Why subscribe? Fully searchableacross every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser
  • 26.
    Customer Feedback Thanks forpurchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1787121399. If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
  • 27.
    Preface Predictive analytics incorporatesa variety of statistical techniques from predictive modeling, machine learning, and data mining that aim to analyze current and historical facts to produce results referred to as predictions about the future or otherwise unknown events. R is an open source programming language that is widely used among statisticians and data miners for predictive modeling and data mining. With its constantly growing community and plethora of packages, R offers the functionality to deal with a truly vast array of problems. This book builds upon its first edition, meaning to be both a guide and a reference to the reader wanting to move beyond the basics of predictive modeling. The book begins with a dedicated chapter on the language of models as well as the predictive modeling process. Each subsequent chapter tackles a particular type of model, such as neural networks, and focuses on the three important questions of how the model works, how to use R to train it, and how to measure and assess its performance using real-world datasets. This second edition provides up-to-date in-depth information on topics such as Performance Metrics and Learning Curves, Polynomial Regression, Poisson and Negative Binomial Regression, back-propagation, Radial Basis Function Networks, and more. A chapter has also been added that focuses on working with very large datasets. By the end of this book, you will have explored and tested the most popular modeling techniques in use on real-world datasets and mastered a diverse range of techniques in predictive analytics.
  • 28.
    What this bookcovers Chapter 1, Gearing Up for Predictive Modeling, helps you set up and get ready to start looking at individual models and case studies, then describes the process of predictive modeling in a series of steps, and introduces several fundamental distinctions. Chapter 2, Tidying Data and Measuring Performance, covers performance metrics, learning curves, and a process for tidying data. Chapter 3, Linear Regression, explains the classic starting point for predictive modeling; it starts from the simplest single variable model and moves on to multiple regression, over-fitting, regularization, and describes regularized extensions of linear regression. Chapter 4, Generalized Linear Models, follows on from linear regression, and in this chapter, introduces logistic regression as a form of binary classification, extends this to multinomial logistic regression, and uses these as a platform to present the concepts of sensitivity and specificity. Chapter 5, Neural Networks, explains that the model of logistic regression can be seen as a single layer perceptron. This chapter discusses neural networks as an extension of this idea, along with their origins and explores their power. Chapter 6, Support Vector Machines, covers a method of transforming data into a different space using a kernel function and as an attempt to find a decision line that maximizes the margin between the classes. Chapter 7, Tree-Based Methods, presents various tree-based methods that are popularly used, such as decision trees and the famous C5.0 algorithm. Regression trees are also covered, as well as random forests, making the link with the previous chapter on bagging. Cross validation methods for evaluating predictors are presented in the context of these tree-based methods. Chapter 8, Dimensionality Reduction, covers PCA, ICA, Factor analysis, and Non- negative Matrix factorization. Chapter 9, Ensemble Methods, discusses methods for combining either many predictors, or multiple trained versions of the same predictor. This chapter introduces
  • 29.
    the important notionsof bagging and boosting and how to use the AdaBoost algorithm to improve performance on one of the previously analyzed datasets using a single classifier. Chapter 10, Probabilistic Graphical Models, introduces the Naive Bayes classifier as the simplest graphical model following a discussion of conditional probability and Bayes' rule. The Naive Bayes classifier is showcased in the context of sentiment analysis. Hidden Markov Models are also introduced and demonstrated through the task of next word prediction. Chapter 11, Topic Modeling, provides step-by-step instructions for making predictions on topic models. It will also demonstrate methods of dimensionality reduction to summarize and simplify the data. Chapter 12, Recommendation Systems, explores different approaches to building recommender systems in R, using nearest neighbor approaches, clustering, and algorithms such as collaborative filtering. Chapter 13, Scaling Up, explains working with very large datasets, including some worked examples of how to train some models we've seen so far with very large datasets. Chapter 14, Deep Learning, tackles the really important topic of deep learning using examples such as word embedding and recurrent neural networks (RNNs).
  • 30.
    What you needfor this book In order to work with and to run the code examples found in this book, the following should be noted: R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows, and MacOS. To download R, there are a variety of locations available, including https://www.rstudio.com/products/rstudio/download. R includes extensive accommodations for accessing documentation and searching for help. A good source of information is at http://www.r- project.org/help.html. The capabilities of R are extended through user-created packages. Various packages are referred to and used throughout this book and the features of and access to each will be detailed as they are introduced. For example, the wordcloud package is introduced in Chapter 11, Topic Modeling to plot a cloud of words shared across documents. This is found at https://cran.r- project.org/web/packages/wordcloud/index.html.
  • 31.
    Who this bookis for It would be helpful if the reader has had some experience with predictive analytics and the R programming language; however, this book will also be of value to readers who are new to these topics but are keen to get started as quickly as possible.
  • 32.
    Conventions In this book,you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning. Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The DrupalCoreUrl class provides static methods to generate an instance of itself, such as ::fromRoute()." A block of code is set as follows: /** * {@inheritdoc} */ public function alterRoutes(RouteCollection $collection) { if ($route = $collection->get('mymodule.mypage)) { $route->setPath('/my-page'); } } When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold: /** * {@inheritdoc} */ public function alterRoutes(RouteCollection $collection) { if ($route = $collection->get('mymodule.mypage)) { $route->setPath('/my-page'); } } Any command-line input or output is written as follows: $ php core/scripts/run-tests.sh PHPUnit New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen." Note
  • 33.
    Warnings or importantnotes appear in a box like this. Tip Tips and tricks appear like this.
  • 34.
    Reader feedback Feedback fromour readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
  • 35.
    Customer support Now thatyou are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
  • 36.
    Downloading the examplecode You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can download the code files by following these steps: 1. Log in or register to our website using your e-mail address and password. 2. Hover the mouse pointer on the SUPPORT tab at the top. 3. Click on Code Downloads & Errata. 4. Enter the name of the book in the Search box. 5. Select the book for which you're looking to download the code files. 6. Choose from the drop-down menu where you purchased this book from. 7. Click on Code Download. You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account. Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of: WinRAR / 7-Zip for Windows Zipeg / iZip / UnRarX for Mac 7-Zip / PeaZip for Linux The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-Predictive-Analytics-with-R-Second- Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
  • 37.
    Downloading the colorimages of this book We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/MasteringPredictiveAnalyticswithRS
  • 38.
    Errata Although we havetaken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title. To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
  • 39.
    Piracy Piracy of copyrightedmaterial on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy. Please contact us at <[email protected]> with a link to the suspected pirated material. We appreciate your help in protecting our authors and our ability to bring you valuable content.
  • 40.
    Questions If you havea problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.
  • 41.
    Chapter 1. GearingUp for Predictive Modeling In this first chapter, we'll start by establishing a common language for models and taking a deep view of the predictive modeling process. Much of predictive modeling involves the key concepts of statistics and machine learning, and this chapter will provide a brief tour of the core features of these fields that are essential knowledge for a predictive modeler. In particular, we'll emphasize the importance of knowing how to evaluate a model that is appropriate to the type of problem we are trying to solve. Finally, we will showcase our first model, the k-nearest neighbors model, as well as caret, a very useful R package for predictive modelers.
  • 42.
    Models Models are atthe heart of predictive analytics and, for this reason, we'll begin our journey by talking about models and what they look like. In simple terms, a model is a representation of a state, process, or system that we want to understand and reason about. We make models so that we can draw inferences from them and, more importantly for us in this book, make predictions about the world. Models come in a multitude of different formats and flavors, and we will explore some of this diversity in this book. Models can be equations linking quantities that we can observe or measure; they can also be a set of rules. A simple model with which most of us are familiar from school is Newton's Second Law of Motion. This states that the net sum of force acting on an object causes the object to accelerate in the direction of the force applied and at a rate proportional to the resulting magnitude of the force and inversely proportional to the object's mass. We often summarize this information via an equation using the letters F, m, and a for the quantities involved. We also use the capital Greek letter sigma (Σ) to indicate that we are summing over the force and arrows above the letters that are vector quantities (that is, quantities that have both magnitude and direction): This simple but powerful model allows us to make some predictions about the world. For example, if we apply a known force to an object with a known mass, we can use the model to predict how much it will accelerate. Like most models, this model makes some assumptions and generalizations. For example, it assumes that the color of the object, the temperature of the environment it is in, and its precise coordinates in space are all irrelevant to how the three quantities specified by the model interact with each other. Thus, models abstract away the myriad of details of a specific instance of a process or system in question, in this case the particular object in whose motion we are interested, and limit our focus only to properties that matter. Newton's second law is not the only possible model to describe the motion of objects. Students of physics soon discover other more complex models, such as those taking into account relativistic mass. In general, models are considered more
  • 43.
    complex if theytake a larger number of quantities into account or if their structure is more complex. For example, nonlinear models are generally more complex than linear models. Determining which model to use in practice isn't as simple as picking a more complex model over a simpler model. In fact, this is a central theme that we will revisit time and again as we progress through the many different models in this book. To build our intuition as to why this is so, consider the case where our instruments that measure the mass of the object and the applied force are very noisy. Under these circumstances, it might not make sense to invest in using a more complicated model, as we know that the additional accuracy in the prediction won't make a difference because of the noise in the inputs. Another situation where we may want to use the simpler model is when, in our application, we simply don't need the extra accuracy. A third situation arises where a more complex model involves a quantity that we have no way of measuring. Finally, we might not want to use a more complex model if it turns out that it takes too long to train or make a prediction because of its complexity.
  • 44.
    Learning from data Inthis book, the models we will study have two important and defining characteristics. The first of these is that we will not use mathematical reasoning or logical induction to produce a model from known facts, nor will we build models from technical specifications or business rules; instead, the field of predictive analytics builds models from data. More specifically, we will assume that for any given predictive task that we want to accomplish, we will start with some data that is in some way related to (or derived from) the task at hand. For example, if we want to build a model to predict annual rainfall in various parts of a country, we might have collected (or have the means to collect) data on rainfall at different locations, while measuring potential quantities of interest, such as the height above sea level, latitude, and longitude. The power of building a model to perform our predictive task stems from the fact that we will use examples of rainfall measurements at a finite list of locations to predict the rainfall in places where we did not collect any data. The second important characteristic of the problems for which we will build models is that, during the process of building a model from some data to describe a particular phenomenon, we are bound to encounter some source of randomness. We will refer to this as the stochastic or nondeterministic component of the model. It may be the case that the system itself that we are trying to model doesn't have any inherent randomness in it, but it is the data that contains a random component. A good example of a source of randomness in data is the measurement of errors from readings taken for quantities such as temperature. A model that contains no inherent stochastic component is known as a deterministic model, Newton's second law being a good example of this. A stochastic model is one that assumes that there is an intrinsic source of randomness to the process being modeled. Sometimes, the source of this randomness arises from the fact that it is impossible to measure all the variables that are most likely impacting a system, and we simply choose to model this using probability. A well-known example of a purely stochastic model is rolling an unbiased six-sided die. Recall that, in probability, we use the term random variable to describe the value of a particular outcome of an experiment or of a random process. In our die example, we can define the random variable, Y, as the number of dots on the side that lands face up after a single roll of the die, resulting in the following model:
  • 45.
    This model tellsus that the probability of rolling a particular digit, say, 3, is one in six. Notice that we are not making a definite prediction on the outcome of a particular roll of the die; instead, we are saying that each outcome is equally likely. Note Probability is a term that is commonly used in everyday speech, but at the same time sometimes results in confusion with regard to its actual interpretation. It turns out that there are a number of different ways of interpreting probability. Two commonly cited interpretations are Frequentist probability and Bayesian probability. Frequentist probability is associated with repeatable experiments, such as rolling a one-sided die. In this case, the probability of seeing the digit 3, is just the relative proportion of the digit 3 coming up if this experiment were to be repeated an infinite number of times. Bayesian probability is associated with a subjective degree of belief or surprise at seeing a particular outcome and can, therefore, be used to give meaning to one-off events, such as the probability of a presidential candidate winning an election. In our die rolling experiment, we are as surprised to see the number 3 come up as with any other number. Note that in both cases, we are still talking about the same probability numerically (1/6); only the interpretation differs. In the case of the die model, there aren't any variables that we have to measure. In most cases, however, we'll be looking at predictive models that involve a number of independent variables that are measured, and these will be used to predict a dependent variable. Predictive modeling draws on many diverse fields and as a result, depending on the particular literature you consult, you will often find different names for these. Let's load a dataset into R before we expand on this point. R comes with a number of commonly cited datasets already loaded, and we'll pick what is probably the most famous of all, the iris dataset: > head(iris, n = 3) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa
  • 46.
    Tip To see whatother datasets come bundled with R, we can use the data() command to obtain a list of datasets along with a short description of each. If we modify the data from a dataset, we can reload it by providing the name of the dataset in question as an input parameter to the data()command; for example, data(iris) reloads the iris dataset. The iris dataset consists of measurements made on a total of 150 flower samples of three different species of iris. In the preceding code, we can see that there are four measurements made on each sample, namely the lengths and widths of the flower petals and sepals. The iris dataset is often used as a typical benchmark for different models that can predict the species of an iris flower sample, given the four previously mentioned measurements. Collectively, the sepal length, sepal width, petal length, and petal width are referred to as features, attributes, predictors, dimensions, or independent variables in literature. In this book, we prefer to use the word feature, but other terms are equally valid. Similarly, the species column in the data frame is what we are trying to predict with our model, and so it is referred to as the dependent variable, output, or target. Again, in this book, we will prefer one form for consistency, and will use output. Each row in the data frame corresponding to a single data point is referred to as an observation, though it typically involves observing the values of a number of features. As we will be using datasets, such as the iris data described earlier, to build our predictive models, it also helps to establish some symbol conventions. Here, the conventions are quite common in most of the literature. We'll use the capital letter, Y, to refer to the output variable, and subscripted capital letter, Xi, to denote the ith feature. For example, in our iris dataset, we have four features that we could refer to as X1 through X4. We will use lower-case letters for individual observations, so that x1 corresponds to the first observation. Note that x1 itself is a vector of feature components, xij, so that x12 refers to the value of the second feature in the first observation. We'll try to use double suffixes sparingly and we won't use arrows or any other form of vector notation for simplicity. Most often, we will be discussing either observations or features and so the case of the variable will make it clear to the reader which of these two is being referenced. When thinking about a predictive model using a dataset, we are generally making the
  • 47.
    assumption that fora model with n features, there is a true or ideal function, f, that maps the features to the output: We'll refer to this function as our target function. In practice, as we train our model using the data available to us, we will produce our own function that we hope is a good estimate for the target function. We can represent this by using a caret on top of the symbol f to denote our predicted function, and also for the output, Y, since the output of our predicted function is the predicted output. Our predicted output will, unfortunately, not always agree with the actual output for all observations (in our data or in general): Given this, we can essentially summarize predictive modeling as a process that produces a function to predict a quantity, while minimizing the error it makes compared to the target function. A good question we can ask at this point is, Where does the error come from? Put differently, why are we generally not able to exactly reproduce the underlying target function by analyzing a dataset? The answer to this question is that in reality there are several potential sources of error that we must deal with. Remember that each observation in our dataset contains values for n features, and so we can think about our observations geometrically as points in an n-dimensional feature space. In this space, our underlying target function should pass through these points by the very definition of the target function. If we now think about this general problem of fitting a function to a finite set of points, we will quickly realize that there are actually infinite functions that could pass through the same set of points. The process of predictive modeling involves making a choice in the type of model that we will use for the data, thereby constraining the range of possible target functions to which we can fit our data. At the same time, the data's inherent randomness cannot be removed no matter what model we select. These ideas lead us to an important distinction in the types of error that we encounter during modeling, namely the reducible error and the irreducible error,
  • 48.
    respectively. The reducible erroressentially refers to the error that we as predictive modelers can minimize by selecting a model structure that makes valid assumptions about the process being modeled and whose predicted function takes the same form as the underlying target function. For example, as we shall see in the next chapter, a linear model imposes a linear relationship between its features in order to compose the output. This restrictive assumption means that, no matter what training method we use, how much data we have, and how much computational power we throw in, if the features aren't linearly related in the real world, then our model will necessarily produce an error for at least some possible observations. By contrast, an example of an irreducible error arises when trying to build a model with an insufficient feature set. This is typically the norm and not the exception. Often, discovering what features to use is one of the most time-consuming activities of building an accurate model. Sometimes, we may not be able to directly measure a feature that we know is important. At other times, collecting the data for too many features may simply be impractical or too costly. Furthermore, the solution to this problem is not simply a question of adding as many features as possible. Adding more features to a model makes it more complex and we run the risk of adding a feature that is unrelated to the output, thus introducing noise in our model. This also means that our model function will have more inputs and will, therefore, be a function in a higher dimensional space. Some of the potential practical consequences of adding more features to a model include increasing the time it will take to train the model, making convergence on a final solution harder, and actually reducing model accuracy under certain circumstances, such as with highly correlated features. Finally, another source of an irreducible error that we must live with is the error in measuring our features so that the data itself may be noisy. Reducible errors can be minimized not only through selecting the right model, but also by ensuring that the model is trained correctly. Thus, reducible errors can also come from not finding the right specific function to use, given the model assumptions. For example, even when we have correctly chosen to train a linear model, there are infinitely many linear combinations of the features that we could use. Choosing the model parameters correctly, which in this case would be the
  • 49.
    coefficients of thelinear model, is also an aspect of minimizing the reducible error. Of course, a large part of training a model correctly involves using a good optimization procedure to fit the model. In this book, we will at least give a high- level intuition of how each model that we study is trained. We generally avoid delving deeply into the mathematics of how optimization procedures work, but we do give pointers to the relevant literature for the interested reader to find out more.
  • 50.
    Another Random Documenton Scribd Without Any Related Topics
  • 51.
    name, or alterthe body of the cheque. In many commercial houses the body of the cheque is filled up by the confidential clerk and taken to the head of the firm, who signs it. These forgeries are sometimes for a small sum, at other times for a large amount. Several cases of uttering forged cheques were lately tried before the police-courts. A respectable-looking young woman, who described herself as a domestic servant, was brought before the Lord Mayor, charged with uttering a cheque for 5l. 18s., purporting to be signed by Mr. W. P. Bennett, with intent to defraud a banking firm in London. She had recently been on a visit to London, and had been lent a small sum of money by another servant in town, along with some dresses, amounting to 10s. 6d. On the 30th October the latter young woman received a letter from the prisoner, enclosing a forged cheque, and at the same time stating that a young man with whom she had been keeping company had died, and had given her this cheque to get cashed. If the servant could not get away to get the cheque cashed, the prisoner wished her to lend her what she was able, to go to the young man’s funeral. On presenting the cheque at the banker’s the forgery was discovered. It appeared from the evidence that the prisoner had been lodging in the same house with Mr. Bennett, whose signature she forged. A young man of respectable appearance residing in the neighbourhood of Fleet Street, was tried at Guildhall lately, charged with uttering a cheque for 6l., well knowing the same to be a forgery. He had gone to the landlord of a public-house in Essex Street, Bouverie Street, and asked him to cash it. It was drawn by Josiah Evans in favour of C. B. Bennett, Esq., and indorsed by the latter. The cheque was on Sir Benjamin Hayward, Bart., & Co., of Manchester. When presented at the bank, it was returned with a note stating that no such person had an account there, and they did
  • 52.
    not know anyof the names. The criminal was then arrested, and committed for trial. Forged Acceptance.—A bill of exchange is a mercantile contract written on a slip of paper, whereby one person requests another to pay money on his account to a third person at the time therein specified. The person who draws the bill is termed the drawer, the party to whom it is addressed before acceptance is called the drawee—afterwards the acceptor. The party for whom it is drawn is termed the payee, who indorses the bill, and is then styled the indorser, and the party to whom he transfers it is called the indorsee. The person in possession of the bill is termed the holder. An acceptance is an engagement to pay the bill, the person writing the word accepted across the bill with his name under it. This may be absolute or qualified. An absolute acceptance is an engagement to pay the bill according to its request. A qualified acceptance undertakes to do it conditionally. Bills are either inland or foreign. The inland bill is on one piece of paper; foreign bills generally consist of three parts called a “set;” so that should the bearer lose one, he may receive payment for the other. Each part contains a condition that it shall be paid provided the others are unpaid. These bills require to have a stamp of proper value to make them valid. Forgeries of bills seldom consist of the whole bill, but either the acceptor’s signature, or that of the drawer, or the indorser. Sometimes the contents of the bill is altered to make it payable earlier. These forgeries are not so numerous, and are frequently done by parties who get the bills in a surreptitious way. It often happens that one party draws the bill in another name, forging the acceptance, and passes it to a third party who is innocent of the forgery. If the person who forged the acceptance, pays the money to the bank where the bill is payable when it is due, the forgery is not detected. When he is not able to pay in the money it is discovered. It happens
  • 53.
    in this way:A B and C are commercial men, A stands well in the commercial world; B draws a bill in his name, and without his knowledge. The name of A being good, the bill passes to C without any suspicion. If B can meet it at the time it is due, A does not know that his name has been used. If the bill is not paid at the proper time, C takes it to A, and thus discovers the forgery. Forged Wills.—A will is a written document in which the testator disposes of his property after his death. It is not necessary that it should be written on stamped paper, as no stamp duty is required till the death of the testator, when the will is proved in court in the district where he resided. The essentials are that it should be legible, and so intelligible, that the testator’s intention can be clearly understood. If the will is not signed by the testator, it must be signed by some other person by his direction, and in his presence; two or more witnesses being present who must attest that the will was signed, and the signature acknowledged by the testator in their presence. No will is valid unless signed at the foot of the page, or at the end by the testator, or by some other person in his presence, and by his direction. Marriage revokes a will previously made. A codicil is a supplement, or addition to the will, altering some part, or making an addition. It may be written on the same document, or on another paper, and folded up with the original instrument. There can only be one will, yet there may be a number of codicils attached to it, and the last is equally binding as the first, if they are not contradictory. Forgeries of wills are generally done by relations, who get a fictitious will prepared in their favour contrary to the genuine will. On the death of the supposed testator, the forged will is put forth as the genuine one, and the other is destroyed. All parties expecting property on the death of a relative or friend, and finding none, should be careful to have the signatures of the
  • 54.
    witnesses examined, totest whether they are genuine; and also the signature of the testator. Every will can be seen at the district court, where they are proved, on the payment of a shilling. Such an examination is the only likely method of detecting the forgery. There are several other classes of forgery in addition to those already noticed, such as forging certificates of character, and bills of lading. A case of the latter kind was recently tried at Guildhall. A merchant, near the Haymarket, and an artist also in the West-end, were arraigned with having feloniously forged and altered certain bills of lading; one of these represented ten casks of alkali amounting to the value of 84l., and another, twenty-six casks of alkali worth 140l., with the intention of defrauding certain merchants in London. All the bills of lading were with one exception to a certain extent genuine, that is, were filled up in the first instance. But after being signed by the wharfinger, they were altered by the introduction of words and figures, to represent a larger quantity of goods than had been shipped. The prisoners were committed for trial. Number of cases of forgery in the metropolitan districts for the year 1860 27 Ditto ditto in the City 20 47 Amount of loss thereby in the metropolitan districts£254 Ditto ditto in the City 736 £990
  • 55.
    CHEATS. Embezzlers. This is thecrime of a servant appropriating to his own use the money or goods received by him on account of his master, and is perpetrated in the metropolis by persons both in inferior and superior positions. Were a party to advance money or goods to an acquaintance or friend, for which the latter did not give a proper return, the case would be different, and require to be sued for in a civil action. Embezzlement is often committed by journeymen bakers entrusted by their employers with quantities of bread to distribute to customers in different parts of the metropolis, by brewer’s draymen delivering malt liquors, by carmen and others engaged in their various errands. A case of this kind occurred recently. A carman in the service of a coal merchant in the West-end was charged with embezzling 6l. 1s. 6d. He had been in the habit of going out with coals to customers, and was empowered to receive the money, but had gone into a public-house on his return, got intoxicated, and lost the whole of his cash. He was tried at Westminster Police Court, and sentenced to pay a fine of 10l. with costs. This crime is frequent among this class. The chief inducements which lead to it are the habits of drinking, prevalent among them, gambling in beer-shops, attending music-saloons, such as the Mogul, Drury Lane, and Paddy’s Goose, Ratcliffe Highway, and attending running matches. Their pay is not sufficient to enable them to indulge in those habits, and this leads them to commit the crime of embezzlement. Persons in trade frequently send out their shopmen to receive orders, and obtain payment for goods supplied to families at their residence,
  • 56.
    and are occasionallyentrusted with goods on stalls. In June, 1861, a respectable-looking young man, was placed at the bar of the Southwark Police Court, charged with having embezzled 39l., the property of a bookselling firm in the Strand. He had been entrusted with a stall where he sold books and newspapers, and was called to account for the receipts daily. One day he neglected to send 8l., the receipts of the previous Saturday, and for other seven days he had given no proper count and reckoning. He admitted the neglect, and confessed he had appropriated the money. He was paid at the rate of 1l. 10s. a month, which with commission amounted to about 6l. or 7l. A clerk and salesman in the service of a draper in Camberwell, was charged with embezzling various sums of money belonging to his employer. It was his duty each night to account for the goods he disposed of, and the money he received. One morning he went out with a quantity of goods, and did not return at the proper time, when his employer found him in a beershop in the Blackfriars Road. On asking him what had become of the goods, he replied he had left them at a public-house in the Borough, which was untrue. In the account-book found upon him it was ascertained that he had received several sums of money he had not accounted for. A robbery by a young man of this class was very ingeniously detected a few weeks ago, and brought before the Marlborough Police Court. A shopman to a cheesemonger in Oxford Street was charged with stealing money from the till. He had been in his employer’s service for ten months, and served at the counter along with three other shopmen. The cheesemonger having found a considerable deficiency in his receipts suspected his honesty, especially as he was in the habit of attending places of amusement, and indulging in other extravagances he knew were beyond his means. He marked three half-crowns, and put them in the till to which the young man had access. Soon after he saw the latter put in his hand, and take out a piece of money. He made an excuse to send the shopman out for a moment, and on examining the till, missed one of the marked pieces of money. He thereupon gave information to the police, and again placed money in the till similarly marked, leaving a police-officer on the watch. The shopman was again detected, he was then arrested, and taken to the police-station.
  • 57.
    Many young menof this class are wretchedly paid by their employers, and have barely enough to maintain them and keep them in decent clothing. Many of them spend their money foolishly on extravagant dress, or associating with girls, attending music-saloons, such as Weston’s, in Holborn; the Pavilion, near the Haymarket; Canterbury Hall; the Philharmonic, Islington; and others. Some frequent the Grecian Theatre, City Road, and other gay resorts, and are led into crime. In one season eighteen girls were known to have been seduced by fast young men, and to become prostitutes through attending music- saloons in the neighbourhood of Tottenham Court Road. Embezzlements are occasionally committed by females of various classes. Some of them, by fraudulent representations, obtain goods from various tradesmen, consisting of candles, soap, sugar, as on account of their customers. Some women of a higher class, such as dressmakers, and others, are entrusted with merinos, silks, satins, and other drapery goods which they embezzle. A young married woman was lately tried at Guildhall, on a charge of disposing of a quantity of silk entrusted to her. It appeared from the evidence of the salesman of the silk manufacturer, that this female applied to him for work, at same time producing a written recommendation, purporting to come from a person known by the firm. Materials to the value of 5l. 15s. were given her to be wrought up into an article of dress. On applying for it at the proper time, he found she had sold the materials, and had left her lodging. While the work was supposed to be in progress, the firm had also given her 2l. 13s., on partial payment. She pleaded poverty as the cause of her embezzling the goods. Parties connected with public societies occasionally embezzle the money committed to their charge. The secretary of a friendly society in the east-end, was brought before the Thames Police Court, charged with embezzling various sums of money he had received on account of the society. The secretary of another friendly society on the Surrey side, was lately charged at Southwark Police Court with embezzling upwards of 100l. This society has branches in all parts of the kingdom, but the central office is in the metropolis. The secretary had been in their service for upwards of two years, at a fixed salary. It was his duty to
  • 58.
    receive contributions fromthe country, and town members; and to account for the same to the treasurer. He recently absconded, when large defalcations were discovered amounting to upwards of 100l. A considerable number of embezzlements are committed by commercial travellers, and by clerks in lawyers’ offices, banks, commercial firms, and government offices. Some of them of great and serious amounts. Tradesmen and others in the middle class, and some respectable labouring men, and mechanics, place their sons in counting-houses, or other establishments superior to their own position; these foolishly try to maintain the appearance of their fellow-clerks who have ampler pecuniary means. This often leads to embezzling the property of the employer or firm. Crimes of this class are occasionally committed by lawyers’ clerks, who are in many cases wretchedly paid, as well as by some who have handsome salaries. Numerous embezzlements are also perpetrated in commercial firms, by their servants; some of them to the value of many thousand pounds. A commercial traveller was lately brought up at the Mansion House, charged with embezzlement. It appears he travelled for a firm in the City, and had been above ten years in their service at a salary of 1l. 1s. per day. It was his duty to take orders and collect accounts as they became due. Some days he received from the customers certain sums and afterwards paid a less amount to the firm, keeping the rest of the money in his hands, which he appropriated. Another day he received a sum of money he never accounted for. He was committed for trial. An embezzlement was committed by a cashier to a commercial firm in the City. It appeared from the evidence, he had been in the service of his employers for ten years, and kept the petty cash-book; with an account of all sums paid. He had to account for the amounts given him as petty cash, and for disbursements whenever he should be called. From the extravagant style in which he was living, which reached the ear of the firm, their suspicions were aroused, and one of them asked him to bring his books into the counting-house, and render the customary account of the petty cash. His employer discovered the balance of some of the pages did not correspond with the balance
  • 59.
    brought forward, andasked the cashier to account for it; when he acknowledged that he had appropriated the difference to his own use. Several items were then pointed out, ranging over a number of months, in which he had plundered his employers of several hundred pounds. This was effected in a very simple way; by carrying the balance of the cash in hand to the top of next page 100l. less than it was on the preceding page, and by calling the disbursements when his employers checked the accounts, 100l. more than they really were. The books of commercial firms are frequently falsified in other modes, to effect embezzlements. These defalcations often arise from fast life, extravagant habits, and gambling. Many fashionable clerks in lawyers’ offices, banks, and Government offices, frequent the Oxford and Alhambra music halls, the West-end theatres, concerts, and operas. They attend the Holborn Assembly-room and the Argyle Rooms, and are frequently to be seen at masked balls, and at Cremorne Gardens during the season. They occasionally indulge in midnight carousals in the Turkish divans and supper-rooms. Some Government clerks have high salaries, and keep a mistress in fashionable style, with brougham and coachman, and footman; others maintain their family in a style their salary is unable to support, all of which lead them step by step to embezzlement and ruin. Number of cases of embezzlement in the Metropolitan districts for 1860 223 Ditto ditto in the City 70 293 Value of money and property abstracted thereby in the Metropolitan districts— £5,271 Ditto ditto in the City 2,660 £7,931 Magsmen, or Sharpers.
  • 60.
    This is apeculiar class of unprincipled men, who play tricks with cards, skittles, &c. &c., and lay wagers with the view of cheating those strangers who may have the misfortune to be in their company. Their mode of operation is this: There are generally three of them in a gang—seldom or never less. They go out together, but do not walk beside each other when they are at work. One may be on the one side of the street, and the other two arm-in-arm on the other. They generally dress well, and in various styles, some are attired as gentlemen, others as country farmers. In one gang, a sharper is dressed as a coachman in livery, and in another they have a confederate attired as a parson, and wearing green spectacles. Many of them start early in the morning from the bottom of Holborn Hill, and branch off in different directions in search of dupes. They frequent Fleet Street, Oxford Street, Strand, Regent Street, Shoreditch, Whitechapel, Commercial Road, the vicinity of the railway stations, and the docks. They are generally to be seen wandering about the streets till four o’clock in the afternoon, unless they have succeeded in picking up a stranger likely to be a victim. They visit the British Museum, St. Paul’s, Westminster Abbey, and the Crystal Palace, &c., and on market days attend the fairs. The person who walks the street in front of the gang, is generally the most engaging and social; the other two keep in sight, and watch his movements. As the former proceeds along he keenly observes the persons passing. If he sees a countryman or a foreigner pass who appears to have money, or a person loitering by a shop-window, he steps up to him and probably enters into conversation regarding some object in sight. For instance, in passing Somerset House in the Strand, he will go up to him and ask what noble building that is, hinting at the same time that he is a stranger in London. It frequently occurs that the individual he addresses is also a stranger in London. Having entered into conversation, the first object he has in view is to learn from the person the locality to which he belongs. The sharp informs him he has some relation there, or knows some person in the town or district. (Many of the magsmen have travelled a good deal, and are acquainted with
  • 61.
    many localities, someof them speak several foreign languages.) He may then represent that he has a good deal of property, and is going back to this village to give so much money to the poor. It sometimes occurs in the course of conversation he proposes to give the stranger a sum of money to distribute among the poor of his district, as he is specially interested in them, and may at the same time produce his pocket-book, with a bundle of flash notes. This may occur in walking along the street. He will then propose to enter a beer-shop, or gin- palace to have a glass of ale or wine. They go in accordingly. When standing at the bar, or seated in the parlour, one of his confederates, enters, and calls for a glass of liquor. This party appears to be a total stranger to his companion. He soon enters as it were casually into conversation, and they possibly speak of their bodily strength. A bet is made that one of them cannot throw a weight as many yards as the other. They make a wager, and the stranger is asked to go with them as a referee, to decide the bet. They may call a cab, and adjourn to some well-known skittle-alley. On going there they find another confederate, who also pretends to be unacquainted with the others. One of the two who made the wager as to throwing the weight may pace the skittle-ground to find its dimensions, and pretend it is not long enough. They will then possibly propose to have a game at skittles, and will bet with each other that they will throw down the pins in so many throws. The sharp who introduced the stranger, and assumes to be his friend, always is allowed to win, perhaps from 5s. to 10s., or more, as the case may be. He plays well, and the other is not so good. Up to this time the intended victim has no hand in the game. Another bet is made, and the stranger is possibly induced to join in it with his agreeable companion, and it is generally arranged that he wins the first time. He is persuaded to bet for a higher amount by himself, and not in partnership, which he loses, and continues to do so every time till he has lost all he possessed. He is invariably called out to the bar by the man who introduced him to the house, when they have a glass together, and in the meantime the others escape.
  • 62.
    The sharp willsay to the victim after staying there a short time, “I believe these men not to be honest; I’ll go and see where they have gone, and try and get your money back.” He goes out with the pretence of looking after them, and walks off. The victim proceeds in search of them, and finds they have decamped leaving him penniless. They have a very ingenious mode of finding out if the person they accost has money in his pocket. This is done after he is introduced into the public-house when getting a glass of ale. The second confederate comes in invariably. The two magsmen begin to converse as to the money they have with them. One pretends he has so much money, which the other will dispute. They possibly appear to get very angry, and one of them makes a bet that he can produce more money than any in the company. They then take out their cash, and induce the stranger to do so, to find which of them has got the highest amount. They thus learn how much money he has in his possession. When they find he has a sufficient sum, they adjourn to a house they are accustomed to use for the purpose of paying the sum lost by the wager. It generally happens the stranger has most, and wins the bet. On arriving at this house they wish a stamped receipt for the cash. Being a stranger he is asked as a security to leave something as a deposit till he returns. At the same time this sharp takes out a bag of money containing medals instead of sovereigns, or a pocket-book with flash notes. He soon comes back with a receipt stamp, but a dispute invariably arises whether it will do. He suggests that some one else should go and get one. The stranger is urged to go for one. In the same manner he leaves money on the table as a security that he will return. He may not know where to get the receipt stamp, and one of them proposes to accompany him. They walk along some distance together, when this man will say, “I don’t much like these two men you have left your money with; do you know them?” He will then advise him to go back, and see if his cash is all right. On his return he finds them both gone, and his money has also disappeared. We shall now notice several of the tricks they practise to delude their victims.
  • 63.
    LIBERATION OF PRISONERSFROM COLDBATH FIELDS HOUSE OF CORRECTION. The Card tricks.—These are not often practised in London but generally at racecourses and country fairs, or where any pastime is going on. Only three cards are used. There is one picture card along with two others. They play with them generally on the ground or on their knee. There are always several persons in a gang at this game. One works the cards, shuffling them together, and then deals them on the ground. They bet two to one no one will find the picture card (the Knave, King, or Queen). One of the confederates makes a bet that he can find it, and throws down a sovereign or half-sovereign, as the case may be. He picks up one of the cards, which will be the picture card, or the one they propose to find. The sharp dealing the cards bets that no one will find the same card again. Some simpleton in the crowd will possibly bet from 1l. to 10l. that he can find it. He picks up a card, which is not the
  • 64.
    picture card andcannot be, as it has been secretly removed from the pack, and another card has been substituted in its place. Skittles.—They generally depend on the ability of one of their gang when engaged in this game, so that he shall be able to take the advantage when wanted. When they bet and find their opponent is expert, he is expected to be able to beat him. In every gang there is generally one superior player. He may pretend to play indifferently for a time, but has generally superior skill, and wins the bet. Thimble and Pea.—It is done in this way. There are three thimbles and a pea. These are generally worked by a man dressed as a countryman, with a smock-frock, at country fairs, race-courses, and other places without the metropolitan police district. They commence by working the pea from one thimble to another, similar to the card trick, and bet in the same way until some person in the company—not a confederate—will bet that he can find the pea. He lifts up one of the thimbles and ascertains that it is not there. Meantime the pea has been removed. It is secreted under the thumb nail of the sharp, and is not under either of the thimbles. The Lock.—While the sharps are seated in a convenient house with their dupe, a man, a confederate of theirs, may come in, dressed as a hawker, offering various articles for sale. He will produce a lock which can be easily opened by a key in their presence. He throws the lock down on the table and bets any one in the room they cannot open it. One of his companions will make a bet that he can open it. He takes it up, opens it easily, and wins the wager. He will show the stranger how it is opened; after which, by a swift movement of his hand, he substitutes another similar lock in its place which cannot be opened. The former is induced possibly to bet that he is able to open it. The lock is handed to him; he thinks it is the same and tries to open it, but does not succeed, and loses his wager. There are various other tricks somewhat of a similar character, on which they lay wagers and plunder their dupes. They have a considerable number of moves with cards, and are ever inventing new dodges or “pulls” as they term them.
  • 65.
    They chiefly confinethemselves on most occasions to the tricks we have noticed. Sometimes, however, they play at whist, cribbage, roulette, loo, and other card games, and manage to get the advantage in many ways. One of them will look at the cards of his opponent when playing, and will telegraph to some of the others by various signs and motions, understood among themselves, but unintelligible to a stranger. The same sharpers who walk the streets of London attend country fairs and race-courses, in different dress and appearance, as if they had no connexion with each other. It often happens one of them is arrested for these offences and is remanded. Before the expiry of the time his confederates generally manage to see the dupe, and restore his property on the condition he shall keep out of the way and allow the case to drop. The female who cohabits with him, or possibly his wife, may call on him for this purpose, and give him part or the whole of his money. Their ages average from twenty to sixty years. Many of them are married and have families; others cohabit with well-dressed women— pickpockets and shoplifters. Some are in better condition than others. They are occasionally shabbily dressed and in needy condition; at other times in most respectable attire—some appear as men of fashion. They are generally very heartless in plundering their dupes. Not content with stripping him of the money he may have on his person— sometimes a large sum—they try to get the cash he has deposited in the bank, and strip him of his watch and chain, leaving him without a shilling in his pocket. There is no formal association between the several gangs, yet from their movements there appears to be an understanding between them. For example, if a certain gang has plundered a victim in Oxford Street, it will likely remove to another district for a time, and another party of magsmen will take their place. Magsmen are of various grades. Some are broken-down tradesmen, others have been brokers and publicans and french-polishers, while part of their number are convicted felons. Numbers of them are betting-men
  • 66.
    and attend races;indeed most of them are connected with this disreputable class. Many of them reside in the neighbourhood of Waterloo Road and King’s Cross, and in quiet streets over the metropolis. They are frequently brought before the police-courts, charged with conspiracy with intent to defraud; but the matter is in general secretly arranged with the prosecutor, and the case is allowed to drop. Sometimes when the sharps cannot manage to defraud the strangers they meet with, they snatch their money from them with violence. In the beginning of November, 1861, two sharps were brought before the Croydon police-court, charged with being concerned, with others not in custody, in stealing 116l., the property of a baker, residing in the country. As the prosecutor, a young man, was going along a country road he met one of the sharps and a man not in custody. At this time there were four men on the road playing cards. He remained for a few minutes looking at them. The man who was the companion of the sharp asked him to accompany him to a railway hotel, and ordered a glass of ale for himself. A man not in custody then asked a sharp to lend him some money, saying he would get him good security; upon which the latter offered to lend him the sum of 50l. at five per cent. interest. On the stranger being represented to this person as a friend, he offered to lend him as large a sum of money as he could produce himself, to show that he was a respectable and substantial person. The sharp then told the baker to go home and get 100l. and he would lend him that sum. He did so, one of the sharps accompanying him nearly all the way to his house. The dupe returned with a 10l. note. They told him it was not enough, and wished him to leave it in their hands and to bring 100l. He went out leaving the 10l. on the table as security for his coming back with more money. He returned with 100l. in bank notes and gold and counted it out on the table. The sharp pretended then to be willing to lend 100l. at five per cent., but added that he must have a stamped receipt. The dupe left his money on the table covered with his handkerchief, and went out
  • 67.
    to get astamp, and on his return found the sharps and his money had disappeared. A few days after, the victim happening to be in London, saw one of them in the street, and gave him into custody. A few weeks ago three skittle-sharps, well-dressed men, were brought before the Southwark police court, charged with robbing a country waiter of 40l. in Bank of England notes. It appeared from the evidence, that the prosecutor met a man in High Street, Southwark, on an afternoon, who offered to show him the way to the Borough Road. They entered a public-house on the way, when the other prisoners came in. One of them pulled out a number of notes, and said he had just come into possession of a fortune. It was suggested, in the course of conversation, they should go to another house to throw a weight, and the prosecutor was to go and see they had fair play. They accordingly went to another house, but instead of throwing the weight, skittles were introduced, and they played several games. The prosecutor lost a sovereign, which was all the money he had with him. One of the sharps bet 20l. that the waiter could not produce 60l. within three hours. He accepted the bet and went with two of them to Blackheath, and returned to the public house with the money, amounting to 40l. in bank notes and 20l. in gold. They went to the skittle-ground, when one of them snatched the notes out of his hand, and they all decamped. They were apprehended that night by Mr. Jones, detective at Tower Street station. The statistics of this class of crime will be given when we come to treat of swindlers. Swindlers. Swindling is carried on very extensively in the metropolis in different classes of society, from the young man who strolls into a coffeehouse in Shoreditch or Bishopsgate, and decamps without paying his night’s
  • 68.
    lodging, to thefashionable rogue who attends the brilliant assemblies in the West-end. It occurs in private life and in the commercial world in different departments of business. Large quantities of goods are sent from the provinces to parties in London, who give orders and are entirely unknown to those who send them, and fictitious references are given, or references to confederates in town connected with them. We select a few illustrations of various modes of swindling which prevail over the metropolis. A young man calls at a coffeehouse, or hotel, or a private lodging, and represents that he is the son of a gentleman in good position, or that he is in possession of certain property, left him by his friends, or that he has a situation in the neighbourhood, and after a few days or weeks decamps without paying his bill, perhaps leaving behind him an empty carpet bag, or a trunk, containing a few articles of no value. An ingenious case of swindling occurred in the City some time since. A fashionably attired young man occupied a small office in White Lion Court, Cornhill, London. It contained no furniture, except two chairs and a desk. He obtained a number of bracelets from different jewellers, and quantities of goods from different tradesmen to a considerable amount, under false pretences. He was apprehended and tried before the police court, and sentenced to twelve months’ imprisonment with hard labour. At the time of his arrest he had obtained possession of a handsome residence at Abbey Wood, Kent, which was evidently intended as a place of reference, where no doubt he purposed to carry on a profitable system of swindling. Swindlers have many ingenious modes of obtaining goods, sometimes to a very considerable amount, from credulous tradesmen, who are too often ready to be duped by their unprincipled devices. For example, some of them of respectable or fashionable appearance may pretend they are about to be married, and wish to have their house furnished. They give their name and address, and to avoid suspicion may even arrange particulars as to the manner in which the money is to be paid. A case of this kind occurred in Grove Terrace, where a furniture-dealer was requested to call on a swindler by a person who pretended to be
  • 69.
    his servant, andreceived directions to send him various articles of furniture. The goods were accordingly sent to the house. On a subsequent day the servant called on him at his premises, with a well- dressed young lady, whom she introduced as the intended wife of her employer, and said they had called to select some more goods. They selected a variety of articles, and desired they should be added to the account. One day the tradesman called for payment, and was told the gentleman was then out of town, but would call on him as soon as he returned. Soon after he made another call at the house, which he found closed up, and that he had been heartlessly duped. The value of the goods amounted to 58l. 18s. 4d. Swindling is occasionally carried on in the West-end in a bold and brilliant style by persons of fashionable appearance and elegant address. A lady-like person who assumed the name of Mrs. Gordon, and sometimes Mrs. Major Gordon, and who represented her husband to be in India, succeeded in obtaining goods from different tradesmen and mercantile establishments at the West-end to a great amount, and gave references to a respectable firm as her agents. Possessing a lady-like appearance and address, she easily succeeded in obtaining a furnished residence at St. John’s Wood, and applied to a livery stable-keeper for the loan of a brougham, hired a coachman, and got a suit of livery for him, and appeared in West-end assemblies as a lady of fashion. After staying about a fortnight at St. John’s Wood she left suddenly, without settling with any of her creditors. She addressed a letter to each of them, requesting that their account should be sent to her agents, and payment would be made as soon as Captain Gordon’s affairs were settled. She expressed regret that she had been called away so abruptly on urgent business. She was usually accompanied by a little girl, about eleven years of age, her daughter, and by an elderly woman, who attended to domestic duties. She was afterwards convicted at Marylebone police court, under the name of Mrs. Helen Murray, charged with obtaining large quantities of goods from West-end tradesmen by fraudulent means.
  • 70.
    A considerable trafficin commercial swindling in various forms is carried on in London. Sometimes fraudulently under the name of another well- known firm; at other times under the name of a fictitious firm. A case of this kind was tried at the Liverpool assizes, which illustrates the fraudulent system we refer to. Charles Howard and John Owen were indicted for obtaining goods on false pretences. In other counts of their indictment they were charged with having conspired with another man named Bonar Russell—not in custody—with obtaining goods under false pretences. The prosecutor Thomas Parkenson Luthwaite, a currier at Barton in Westmoreland, received an order by letter from John Howard and Co. of Droylesden, near Manchester, desiring him to send them a certain quantity of leather, and reference was given as to their respectability. The prosecutor sent the leather and a letter by post containing the invoice. The leather duly arrived at Droylesden; but the police having received information gave notice to the railway officials to detain it, until they got further knowledge concerning them. Howard and Russell went to the station, but were told they could not get the leather, as there was no such firm as Howard and Co. at Droylesden. Howard replied that there was—that he lived there. It was subsequently arranged that the goods should be delivered, on the party producing a formal order. On the next day, Owen came with a horse and cart to Droylesden station, and asked for the goods, at the same time producing his order. They were delivered to him, when he put them in his cart and drove off. Two officers of police in plain clothes accosted him, and asked for a ride in his cart which he refused. The officers followed him, and found he did not go to Droylesden, but to a house at Hulme near Manchester, as he had been directed. This house was searched, and Howard and Russell were arrested. Howard having been admitted to bail, did not appear at the trial. On farther inquiries it was found there was no such firm as John Howard and Co. at Droylesden, but that Howard and Russell had taken a house there which was not furnished, and where they went occasionally to receive letters addressed to Howard and Co., Droylesden. Owen was acquitted; Howard was found guilty of conspiracy with intent to defraud.
  • 71.
    A number ofcases occur where swindlers attempt to cheat different societies in various ways. Two men were tried at the police court a few days ago for unlawfully attempting to cheat and defraud a loan society to obtain 5l. The prisoners formed part of a gang of swindlers, who operated in this way:—Some of them took a house for the purpose of giving references to others, who applied to loan societies for an advance of money, and produced false receipts for rent and taxes. They had carried on this system for years, and many of them had been convicted. Some of the gang formerly had an office in Holborn, where they defrauded young men in search of situations by getting them to leave a sum of money as security. They were tried and convicted on this charge. There is another heartless system of base swindling perpetrated by a class of cheats, who pretend to assist parties in getting situations, and hold out flaming inducements through advertisements in the newspapers to working men, servants, clerks, teachers, clergymen, and others; and contrive to get a large income by duping the public. A swindler contrived to obtain sums of 5s. each in postage stamps, or post-office orders, from a large number of people, under pretence of obtaining situations for them as farm bailiffs. An advertisement was inserted in the newspaper, and in reply to the several applicants, a letter was returned, stating that although the applicant was among the leading competitors another party had secured the place. At the same time another attempt was made to inveigle the dupe, under the pretence of paying another fee of 5s., with the hope of obtaining a similar situation in prospect. The swindler intimated that the only interest he had in the matter was the agent’s fee, charged alike to the employer and the employed, and generally paid in advance. He desired that letters addressed to him should be directed to 42, Sydney Street, Chorlton-upon-Medlock. He had an empty house there, taken for the purpose, with the convenience of a letter-box in the door into which the postman dropped letters twice a day. A woman came immediately after each post and took them away. On arresting the woman, the officers found in her basket 87 letters, 44 of them containing 5s. in postage stamps, or a post-office order payable to the swindler himself. Nearly all the others were letters from persons
  • 72.
    at a distancefrom a post office, who were unable to remit the 5s., but promised to send the money when they got an opportunity. On a subsequent day, 120 letters were taken out of the letter-box, most of them containing a remittance. This system had been in operation for a month. One day 190 letters were delivered by one post. It was estimated that no fewer than 3000 letters had come in during the month, most of them enclosing 5s.; and it is supposed the swindler had received about 700l., a handsome return for the price of a few advertisements in newspapers, a few lithographed circulars, a few postage-stamps, and a quarter of a year’s rent of an empty house. Another case of a similar kind, occurred at the Maidstone assizes. Henry Moreton, aged 43, a tall gentlemanly man, and a young woman aged 19 years, were indicted for conspiring to obtain goods and money by false pretences. The name given by the male prisoner was known to be an assumed one. It was stated that he was well connected and formerly in a good position in society. At the trial, a witness deposed that an advertisement had appeared in a Cornish newspaper, addressed to Cornish miners, stating they could be sent out to Australia by an English gold-mining company, and would be paid 20l. of wages per month, to commence on their arrival at the mines. The advertisement also stated that if 1s. or twelve postage stamps were sent to Mr. Henry Moreton, Chatham, a copy of the stamped agreement and full particulars as to the company, would be given. The prisoner was arrested, and 41 letters found in his possession, addressed to “Mr. H. Moreton, Chatham:” 25 of the letters contained twelve postage stamps each and some of them had 1s. inside. It was ascertained the female cohabited with him. It appeared that he had pawned 482 stamps on the 14th February, for 1l. 15s., 289 on the 21st, for 1l., and 744 on another day. Eighty-two letters came in one day chiefly from Ireland and Cornwall. On searching a box in his room they found a large quantity of Irish and Cornish newspapers, many of them containing the advertisement referred to.
  • 73.
    He was foundguilty, and was sentenced to hard labour for fifteen months. The young woman was acquitted. The judge, in passing sentence, observed that the prisoner had been convicted of swindling poor people, and his being respectably connected aggravated the case. We give the following illustration of an English swindler’s adventures on the Continent. A married couple were tried at Pau, on a charge of swindling. The husband represented himself to be the son of a colonel in the English army and of a Neapolitan princess. His wife pretended to be the daughter of an English general. They said they were allied to the families of the Dukes of Norfolk, Leinster, and Devonshire. They came in a post-chaise to the Hotel de France, accompanied by several servants, lived in the style of persons of the highest rank, and run up a bill of 6000 francs. As the landlord declined to give credit for more, they took a château, which they got fitted up in a costly way. They paid 2500 francs for rent, and were largely in debt to the butcher, tailor, grocer, and others. The lady affected to be very pious, and gave 895 francs to the abbé for masses. An English lady who came from Brussels to give evidence, stated that her husband had paid 50,000 francs to release them from a debtors’ prison at Cologne, as he believed them to be what they represented. It was shown at the trial that they had received letters from Lord Grey, the King of Holland, and other distinguished personages. They were convicted of swindling, and condemned to one year’s imprisonment, or to pay a fine of 200 francs. On hearing the sentence the woman uttered a piercing cry and fainted in her husband’s arms, but soon recovered. They were then removed to prison. The assumption of a variety of names, some of them of a high- sounding and pretentious character, is resorted to by swindlers giving orders for goods by letter from a distance—an address is also assumed of a nature well calculated to deceive: as an instance, we may mention that an individual has for a long period of time fared sumptuously upon
  • 74.
    the plunder obtainedby his fraudulent transactions, of whose aliases and pseudo residences the following are but a few:— Creighton Beauchamp Harper; the Russets, near Edenbridge. Beauchamp Harper; Albion House, Rye. Charles Creighton Beauchamp Harper; ditto. Neanberrie Harper, M. N. I.; The Broadlands, Winchelsea. Beauchamp Harper; Halden House, Lewes. R. E. Beresford; The Oaklands, Chelmsford. The majority of these residencies existed only in the imagination of this indefatigable cosmopolite. In some cases he had christened a paltry tenement let at the rent of a few shillings per week “House;” a small cottage in Albion Place, Rye, being magnified into “Albion House.” When an address is assumed having no existence, his plan is to request the postmaster of the district to send the letters, &c., to his real address— generally some little distance off—a similar notice also being given at the nearest railway station. The goods ordered are generally of such a nature as to lull suspicion, viz., a gun, as “I am going to a friend’s grounds to shoot and I want one immediately;” “a silver cornet;” “two umbrellas, one for me and one for Mrs. Harper;” “a fashionable bonnet with extra strings, young looking, for Mrs. Harper;” “white lace frock for Miss Harper, immediately;” “a violet-coloured velvet bonnet for my sister,” &c., &c., &c., ad infinitum. A person, pretending to be a German baron, some time ago ordered and received goods to a large amount from merchants in Glasgow. It was ascertained he was a swindler. He was a man of about forty years of age, 5 feet 8 inches high, and was accompanied by a lady about twenty-five years of age. They were both well-educated people, and could speak the English language fluently. A fellow, assuming the name of the Rev. Mr. Williams, pursued a romantic and adventurous career of swindling in different positions in society, and was an adept in deception. On one occasion, by means of forged credentials, he obtained an appointment as curate in Northamptonshire, where he conducted himself for some time with a
  • 75.
    most sanctimonious air.Several marriages were celebrated by him, which were apparently satisfactorily performed. He obtained many articles of jewellery from firms in London, who were deceived by his appearance and position. He wrote several modes of handwriting, and had a plausible manner of insinuating himself into the good graces of his victims. He died a very tragical death. Having been arrested for swindling he was taken to Northampton. On his arrival at the railway station there, he threw himself across the rails and was crushed to death by the train. There is a mode of extracting money from the unwary, practised by a gang of swindlers by means of mock auctions. They dispose of watches, never intended to keep time, and other spurious articles, and have confederates, or decoys, who pretend to bid for the goods at the auctions, and sometimes buy them at an under price; but they are by arrangement returned soon after, and again offered for sale. We have been favoured with some of the foregoing particulars by the officials of Stubbs’ Mercantile Offices; the courtesy of the secretary having also placed the register of that extensive establishment at our service. Number of cases of fraud and conspiracy with intent to defraud in the Metropolitan districts for 1860 325 Ditto ditto in the City 51 376 Value of property thereby abstracted in the Metropolitan district£3,443 Ditto ditto in the City 2,429 £5,872
  • 76.
    BEGGARS AND CHEATS. Inprimitive times beggars were recognised as a legitimate component part in the fabric of society. Socially, and apart from state government, there were, during the patriarchal period, three states of the community, and these were the landowners, their servants, and the dependants of both—beggars. There was no disgrace attached to the name of beggar at this time, for those who lived by charity were persons who were either too old to work or were incapacitated from work by bodily affliction. This being the condition of the beggars of the early ages, it was considered no less a sacred than a social duty to protect them and relieve their wants. Many illustrious names, both in sacred and profane history, are associated with systematic mendicancy, and the very name of “beggar” has derived a sort of classic dignity from this circumstance. Beggars are frequently mentioned with honour in the Old Testament; and in the New, one of the most touching incidents in our Lord’s history has reference to “a certain beggar named Lazarus, which was laid at the rich man’s gate.” Nor must it be forgotten that the father of poetry, the immortal Homer, was a beggar and blind, and went about singing his own verses to excite charity. The name of Belisarius is more closely associated with the begging exploits ascribed to him than with his great historical conquests. “Give a halfpenny to a poor man” was as familiar a phrase in Latin in the old world as it is to-day in the streets of London. It would be tedious to enumerate all the instances of honourable beggary which are celebrated in history, or even to glance at the most notable of them; it will be enough for the purpose we have in view if I direct attention to the aspects of beggary at a few marked periods of history.
  • 77.
    It will befound that imposture in beggary has invariably been the offspring of a high state of civilization, and has generally had its origin in large towns. When mendicancy assumes this form it becomes a public nuisance, and imperatively calls for prohibitive laws. The beggar whose poverty is not real, but assumed, is no longer a beggar in the true sense of the word, but a cheat and an impostor, and as such he is naturally regarded, not as an object for compassion, but as an enemy to the state. In all times, however, the real beggar—the poor wretch who has no means of gaining a livelihood by his labour, the afflicted outcast, the aged, the forsaken, and the weak—has invariably commanded the respect and excited the compassion of his more fortunate fellow-men. The traces of this consideration for beggars which we find in history are not a little remarkable. In the early Saxon times the relief of beggars was one of the most honourable duties of the mistress of the house. Our beautiful English word “lady” derives its origin from this practice. The mistress of a Saxon household gave away bread with her own hand to the poor, and thence she was called “lef day” or bread giver, which at a later period was rendered into lady. A well-known incident in the life of Alfred the Great shows how sacred a duty the giving of alms was regarded at that period. In early times beggary had even a romantic aspect. Poets celebrated the wanderings of beggars in so attractive a manner that great personages would sometimes envy the condition of the ragged mendicant and imitate his mode of life. James V. of Scotland was so enamoured of the life of the gaberlunzie man that he assumed his wallet and tattered garments, and wandered about among his subjects begging from door to door, and singing ballads for a supper and a night’s lodging. The beggar’s profession was held in respect at that time, for it had not yet become associated with imposture; and as the country beggars were also ballad-singers and story-tellers, their visits were rather welcome than otherwise. It must also be taken into account that beggars were not numerous at this period. It would appear that beggars first began to swarm and become troublesome and importunate shortly after the Reformation. The
  • 78.
    immediate cause ofthis was the abolition and spoliation of the monasteries and religious houses by Henry VIII. Whatever amount of evil they may have done, the monasteries did one good thing— they assisted the poor and provided for many persons who were unable to provide for themselves. When the monasteries were demolished and their revenues confiscated, these dependent persons were cast upon the world to seek bread where they could find it. As many of them were totally unaccustomed to labour, they had no resource but to beg. The result was that the country was soon overrun with beggars, many of whom exacted alms by violence and by threats. In the course of the next reign we hear of legislative enactments for the suppression of beggary. The first efforts in this direction wholly failed to abate the nuisance, and more stringent acts were passed. In the reign of Charles II. begging had become so profitable that a great many Irish came over to this country to pursue it as a trade. The evil then became so intolerable that a royal proclamation was issued, specially directed to check the importation of beggars from Ireland. It is intituled “A Proclamation for the speedy rendering away of the Irishe Beggars out of this Kingdome into their owne Countrie and for the Suppressing and Ordering of Rogues and Vagabonds according to the Laws,” which recites that: “Whereas this realme hath of late been pestered with great numbers of Irishe beggars who live here idly and dangerously, and are of ill example to the natives of this kingdome; and, whereas the multitude of English rogues and vagabonds doe much more abound than in former tymes —some wandering and begging under the colour of soldiers and mariners, others under the pretext of impotent persons, whereby they become a burthen to the good people of the land, all which happeneth by the neglect of the due execution of the lawes, formerly with great providence made, for relief of the true poore and indigent, and for the punishment of sturdy rogues and vagabonds; for the reforming therefore of soe great a mischiefe, and to prevent the many dangers which will ensue by the neglect thereof, the king, by the advice of his privy council and of his judges, commands that
  • 79.
    all the lawsand statutes now in force for the punishment of rogues and vagabonds be duly putt in execution; and more particularly that all Irishe beggars, which now are in any part of this kingdome, wandering or begging, under what pretence soever, shall forthwith depart this realme and return to their owne countries, and there abide.” And it is further directed that all such beggars “shall be conveyed from constable to constable to Bristoll, Mynhead, Barstable, Chester, Lyrepool, Milford-haven, and Workington, or such of them as shall be most convenient.” We see by this that the state of mendicancy in 1629, was very much what it is now, and that the artifices and dodges resorted to at that period were very similar to, and in many cases, exactly the same, as the more modern impostures which I shall have to expose in the succeeding pages. THE ORIGIN AND HISTORY OF THE POOR LAWS. An Act passed in 1536 (27 Henry VIII. c. 25) is the first by which voluntary charity was converted into compulsory payment. It enacts that the head officers of every parish to which the impotent or able- bodied poor may resort under the provisions of the Act of 1531, shall receive and keep them, so that none shall be compelled to beg openly. The able-bodied were to be kept to constant labour, and every parish making default, was to forfeit 20s. a month. The money required for the support of the poor, was to be collected partly by the head officers of corporate towns and the churchwardens of parishes, and partly was to be derived from collections in the churches, and on various occasions where the clergy had opportunities for exhorting the people to charity. Alms-giving beyond the town or parish was prohibited on forfeiture of ten times the amount given. A “sturdy beggar” was to be whipped the first time he was detected in begging; to have his right ear cropped for the
  • 80.
    second offence; andif again guilty of begging was to be indicted for “wandering, loitering, and idleness,” and if convicted was “to suffer execution of death as a felon and an enemy of the Commonwealth.” The severity of this act prevented its execution, and it was repealed by 1 Edward VI. c. 3 (1547). Under this statute, every able-bodied person who should not apply himself to some honest labour, or offer to serve for even meat and drink, was to be taken for a vagabond, branded on the shoulder and adjudged a slave for two years to any one who should demand him, to be fed on bread and water and refuse meat and made to work by being beaten, chained, or otherwise treated. If he ran away during the two years, he was to be branded on the cheek and adjudged a slave for life, and if he ran away again he was to suffer death as a felon. If not demanded as a slave he was to be kept to hard labour on the highway in chains. The impotent poor were to be passed to their place of birth or settlement from the hands of one parish constable to those of another. The statute was repealed three years afterwards and that of 1531 was revived. In 1551 an Act was passed which directed that a book should be kept in every parish containing the names of the householders and of the impotent poor; that collectors of alms should be appointed who should “gently ask every man and woman what they of their charity will give weekly to the relief of the poor.” If any one able to give should refuse, or discourage others from giving, the ministers and churchwardens were to exhort him, and failing of success, the bishop was to admonish him on the subject. This Act, and another made to enforce it, which was passed in 1555, were wholly ineffectual, and in 1563 it was re-enacted (5 Elizabeth c. 3), with the addition that any person able to contribute and refusing should be cited by the bishop to appear at the next sessions before the justices, where if he would not be persuaded to give, the justices were to tax him according to their discretion, and on his refusal he was to be committed to gaol until the sum taxed should be paid, with all arrears.
  • 81.
    The next statuteon the subject, which was passed in 1572 (14 Eliz. c. 5), shows how ineffectual the previous statutes had been. It enacted that all rogues, vagabonds and sturdy beggars, including in this description “all persons whole and mighty in body, able to labour, not having land or master, nor using any lawful merchandise, craft or mystery, and all common labourers, able in body, loitering and refusing to work for such reasonable wage as is commonly given,” should “for the first offence be grievously whipped and burned through the gristle of the right ear with a hot iron of the compass of an inch about;” for the second should be deemed felons; and for the third should suffer death as felons without benefit of clergy. For the relief and sustentation of the aged and impotent poor, the justices of the peace within their several districts were “by their good discretion” to tax and assess all the inhabitants dwelling therein. Any one refusing to contribute was to be imprisoned until he should comply with the assessment. By the statutes 39 of Elizabeth, c. 3 and 4 (1598), every able-bodied person refusing to work for the ordinary wages was to be “openly whipped until his body should be bloody, and forthwith sent from parish to parish, the most strait way to the parish where he was born, there to put himself to labour as a true subject ought to do.” The next Act, the 43 Elizabeth, c. 2, has been in operation from the time of its enactment in 1601 to the present day. A change in the mode of administration was, however, effected by the Poor Law Amendment Act (4 and 5 Wm. IV. c. 76) which was passed in 1834. During that long period many abuses crept into the administration of the laws relating to the poor, so that in practice their operation impaired the character of the most numerous class, and was injurious to the whole country. In its original provisions the Act of Elizabeth directed the overseers of the poor in every parish to “take order for setting to work the children of all such parents as shall not be thought able to maintain their children,” as well as all such persons as, having no means to maintain them, use no ordinary trade to get their living by. For this purpose they were empowered to
  • 82.
    Welcome to OurBookstore - The Ultimate Destination for Book Lovers Are you passionate about books and eager to explore new worlds of knowledge? At our website, we offer a vast collection of books that cater to every interest and age group. From classic literature to specialized publications, self-help books, and children’s stories, we have it all! Each book is a gateway to new adventures, helping you expand your knowledge and nourish your soul Experience Convenient and Enjoyable Book Shopping Our website is more than just an online bookstore—it’s a bridge connecting readers to the timeless values of culture and wisdom. With a sleek and user-friendly interface and a smart search system, you can find your favorite books quickly and easily. Enjoy special promotions, fast home delivery, and a seamless shopping experience that saves you time and enhances your love for reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookgate.com