1. Python Advanced Predictive Analytics Kumar
Ashish download
https://ebookbell.com/product/python-advanced-predictive-
analytics-kumar-ashish-32704500
Explore and download more ebooks at ebookbell.com
2. Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Mastering Predictive Analytics With Python Exploit The Power Of Data
In Your Business By Building Advanced Predictive Modeling Applications
With Python Joseph Babcock
https://ebookbell.com/product/mastering-predictive-analytics-with-
python-exploit-the-power-of-data-in-your-business-by-building-
advanced-predictive-modeling-applications-with-python-joseph-
babcock-10834074
Python Advanced Guide To Artificial Intelligence Expert Machine
Learning Systems And Intelligent Agents Using Python Giuseppe
Bonaccorso
https://ebookbell.com/product/python-advanced-guide-to-artificial-
intelligence-expert-machine-learning-systems-and-intelligent-agents-
using-python-giuseppe-bonaccorso-48270252
Python Advanced Advanced Techniques For Finance Pros A Comprehensive
Guide To The Application Of Python In Finance Van Der Post
https://ebookbell.com/product/python-advanced-advanced-techniques-for-
finance-pros-a-comprehensive-guide-to-the-application-of-python-in-
finance-van-der-post-55473590
Python Advanced Guide To Artificial Intelligence Rajalingappaa
Shanmugamani Armando Fandango Giuseppe Bonaccorso Rajalingappaa
Shanmugamani
https://ebookbell.com/product/python-advanced-guide-to-artificial-
intelligence-rajalingappaa-shanmugamani-armando-fandango-giuseppe-
bonaccorso-rajalingappaa-shanmugamani-23767668
3. Computer Graphics In Python Advanced Vector Graphics Using Pycairo And
Python Martin Mcbride
https://ebookbell.com/product/computer-graphics-in-python-advanced-
vector-graphics-using-pycairo-and-python-martin-mcbride-52520654
Play With Python Advanced Ak Singh
https://ebookbell.com/product/play-with-python-advanced-ak-
singh-51139256
Advanced Python Programming Accelerate Your Python Programs Using
Proven Techniques And Design Patterns 2nd Edition 2nd Quan Nguyen
https://ebookbell.com/product/advanced-python-programming-accelerate-
your-python-programs-using-proven-techniques-and-design-patterns-2nd-
edition-2nd-quan-nguyen-47888036
Advanced Python Programming Build High Performance Concurrent And
Multithreaded Apps With Python Using Proven Design Patterns Dr
Gabriele Lanaro
https://ebookbell.com/product/advanced-python-programming-build-high-
performance-concurrent-and-multithreaded-apps-with-python-using-
proven-design-patterns-dr-gabriele-lanaro-22045786
Learning Advanced Python By Studying Open Source Projects 1st Edition
Li
https://ebookbell.com/product/learning-advanced-python-by-studying-
open-source-projects-1st-edition-li-55466382
6. Table of Contents
Python: Advanced Predictive Analytics
Credits
Preface
What this learning path covers
What you need for this learning path
Who this learning path is for
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Module 1
1. Getting Started with Predictive Modelling
Introducing predictive modelling
Scope of predictive modelling
Ensemble of statistical algorithms
Statistical tools
Historical data
Mathematical function
Business context
Knowledge matrix for predictive modelling
Task matrix for predictive modelling
Applications and examples of predictive modelling
LinkedIn's "People also viewed" feature
What it does?
How is it done?
Correct targeting of online ads
How is it done?
Santa Cruz predictive policing
How is it done?
Determining the activity of a smartphone user using accelerometer
data
How is it done?
Sport and fantasy leagues
How was it done?
Python and its packages – download and installation
Anaconda
Standalone Python
Installing a Python package
Installing pip
Installing Python packages with pip
Python and its packages for predictive modelling
IDEs for Python
Summary
2. Data Cleaning
7. Reading the data – variations and examples
Data frames
Delimiters
Various methods of importing data in Python
Case 1 – reading a dataset using the read_csv method
The read_csv method
Use cases of the read_csv method
Passing the directory address and filename as variables
Reading a .txt dataset with a comma delimiter
Specifying the column names of a dataset from a list
Case 2 – reading a dataset using the open method of Python
Reading a dataset line by line
Changing the delimiter of a dataset
Case 3 – reading data from a URL
Case 4 – miscellaneous cases
Reading from an .xls or .xlsx file
Writing to a CSV or Excel file
Basics – summary, dimensions, and structure
Handling missing values
Checking for missing values
What constitutes missing data?
How missing values are generated and propagated
Treating missing values
Deletion
Imputation
Creating dummy variables
Visualizing a dataset by basic plotting
Scatter plots
Histograms
Boxplots
Summary
3. Data Wrangling
Subsetting a dataset
Selecting columns
Selecting rows
Selecting a combination of rows and columns
Creating new columns
Generating random numbers and their usage
Various methods for generating random numbers
Seeding a random number
Generating random numbers following probability distributions
Probability density function
Cumulative density function
Uniform distribution
Normal distribution
Using the Monte-Carlo simulation to find the value of pi
Geometry and mathematics behind the calculation of pi
Generating a dummy data frame
Grouping the data – aggregation, filtering, and transformation
Aggregation
Filtering
Transformation
8. Miscellaneous operations
Random sampling – splitting a dataset in training and testing datasets
Method 1 – using the Customer Churn Model
Method 2 – using sklearn
Method 3 – using the shuffle function
Concatenating and appending data
Merging/joining datasets
Inner Join
Left Join
Right Join
An example of the Inner Join
An example of the Left Join
An example of the Right Join
Summary of Joins in terms of their length
Summary
4. Statistical Concepts for Predictive Modelling
Random sampling and the central limit theorem
Hypothesis testing
Null versus alternate hypothesis
Z-statistic and t-statistic
Confidence intervals, significance levels, and p-values
Different kinds of hypothesis test
A step-by-step guide to do a hypothesis test
An example of a hypothesis test
Chi-square tests
Correlation
Summary
5. Linear Regression with Python
Understanding the maths behind linear regression
Linear regression using simulated data
Fitting a linear regression model and checking its efficacy
Finding the optimum value of variable coefficients
Making sense of result parameters
p-values
F-statistics
Residual Standard Error
Implementing linear regression with Python
Linear regression using the statsmodel library
Multiple linear regression
Multi-collinearity
Variance Inflation Factor
Model validation
Training and testing data split
Summary of models
Linear regression with scikit-learn
Feature selection with scikit-learn
Handling other issues in linear regression
Handling categorical variables
Transforming a variable to fit non-linear relations
Handling outliers
Other considerations and assumptions for linear regression
Summary
9. 6. Logistic Regression with Python
Linear regression versus logistic regression
Understanding the math behind logistic regression
Contingency tables
Conditional probability
Odds ratio
Moving on to logistic regression from linear regression
Estimation using the Maximum Likelihood Method
Likelihood function:
Log likelihood function:
Building the logistic regression model from scratch
Making sense of logistic regression parameters
Wald test
Likelihood Ratio Test statistic
Chi-square test
Implementing logistic regression with Python
Processing the data
Data exploration
Data visualization
Creating dummy variables for categorical variables
Feature selection
Implementing the model
Model validation and evaluation
Cross validation
Model validation
The ROC curve
Confusion matrix
Summary
7. Clustering with Python
Introduction to clustering – what, why, and how?
What is clustering?
How is clustering used?
Why do we do clustering?
Mathematics behind clustering
Distances between two observations
Euclidean distance
Manhattan distance
Minkowski distance
The distance matrix
Normalizing the distances
Linkage methods
Single linkage
Compete linkage
Average linkage
Centroid linkage
Ward's method
Hierarchical clustering
K-means clustering
Implementing clustering using Python
Importing and exploring the dataset
Normalizing the values in the dataset
Hierarchical clustering using scikit-learn
10. K-Means clustering using scikit-learn
Interpreting the cluster
Fine-tuning the clustering
The elbow method
Silhouette Coefficient
Summary
8. Trees and Random Forests with Python
Introducing decision trees
A decision tree
Understanding the mathematics behind decision trees
Homogeneity
Entropy
Information gain
ID3 algorithm to create a decision tree
Gini index
Reduction in Variance
Pruning a tree
Handling a continuous numerical variable
Handling a missing value of an attribute
Implementing a decision tree with scikit-learn
Visualizing the tree
Cross-validating and pruning the decision tree
Understanding and implementing regression trees
Regression tree algorithm
Implementing a regression tree using Python
Understanding and implementing random forests
The random forest algorithm
Implementing a random forest using Python
Why do random forests work?
Important parameters for random forests
Summary
9. Best Practices for Predictive Modelling
Best practices for coding
Commenting the codes
Defining functions for substantial individual tasks
Example 1
Example 2
Example 3
Avoid hard-coding of variables as much as possible
Version control
Using standard libraries, methods, and formulas
Best practices for data handling
Best practices for algorithms
Best practices for statistics
Best practices for business contexts
Summary
A. A List of Links
2. Module 2
1. From Data to Decisions – Getting Started with Analytic Applications
Designing an advanced analytic solution
Data layer: warehouses, lakes, and streams
Modeling layer
11. Deployment layer
Reporting layer
Case study: sentiment analysis of social media feeds
Data input and transformation
Sanity checking
Model development
Scoring
Visualization and reporting
Case study: targeted e-mail campaigns
Data input and transformation
Sanity checking
Model development
Scoring
Visualization and reporting
Summary
2. Exploratory Data Analysis and Visualization in Python
Exploring categorical and numerical data in IPython
Installing IPython notebook
The notebook interface
Loading and inspecting data
Basic manipulations – grouping, filtering, mapping, and pivoting
Charting with Matplotlib
Time series analysis
Cleaning and converting
Time series diagnostics
Joining signals and correlation
Working with geospatial data
Loading geospatial data
Working in the cloud
Introduction to PySpark
Creating the SparkContext
Creating an RDD
Creating a Spark DataFrame
Summary
3. Finding Patterns in the Noise – Clustering and Unsupervised Learning
Similarity and distance metrics
Numerical distance metrics
Correlation similarity metrics and time series
Similarity metrics for categorical data
K-means clustering
Affinity propagation – automatically choosing cluster numbers
k-medoids
Agglomerative clustering
Where agglomerative clustering fails
Streaming clustering in Spark
Summary
4. Connecting the Dots with Models – Regression Methods
Linear regression
Data preparation
Model fitting and evaluation
Statistical significance of regression outputs
Generalize estimating equations
12. Mixed effects models
Time series data
Generalized linear models
Applying regularization to linear models
Tree methods
Decision trees
Random forest
Scaling out with PySpark – predicting year of song release
Summary
5. Putting Data in its Place – Classification Methods and Analysis
Logistic regression
Multiclass logistic classifiers: multinomial regression
Formatting a dataset for classification problems
Learning pointwise updates with stochastic gradient descent
Jointly optimizing all parameters with second-order methods
Fitting the model
Evaluating classification models
Strategies for improving classification models
Separating Nonlinear boundaries with Support vector machines
Fitting and SVM to the census data
Boosting – combining small models to improve accuracy
Gradient boosted decision trees
Comparing classification methods
Case study: fitting classifier models in pyspark
Summary
6. Words and Pixels – Working with Unstructured Data
Working with textual data
Cleaning textual data
Extracting features from textual data
Using dimensionality reduction to simplify datasets
Principal component analysis
Latent Dirichlet Allocation
Using dimensionality reduction in predictive modeling
Images
Cleaning image data
Thresholding images to highlight objects
Dimensionality reduction for image analysis
Case Study: Training a Recommender System in PySpark
Summary
7. Learning from the Bottom Up – Deep Networks and Unsupervised
Features
Learning patterns with neural networks
A network of one – the perceptron
Combining perceptrons – a single-layer neural network
Parameter fitting with back-propagation
Discriminative versus generative models
Vanishing gradients and explaining away
Pretraining belief networks
Using dropout to regularize networks
Convolutional networks and rectified units
Compressing Data with autoencoder networks
Optimizing the learning rate
13. The TensorFlow library and digit recognition
The MNIST data
Constructing the network
Summary
8. Sharing Models with Prediction Services
The architecture of a prediction service
Clients and making requests
The GET requests
The POST request
The HEAD request
The PUT request
The DELETE request
Server – the web traffic controller
Application – the engine of the predictive services
Persisting information with database systems
Case study – logistic regression service
Setting up the database
The web server
The web application
The flow of a prediction service – training a model
On-demand and bulk prediction
Summary
9. Reporting and Testing – Iterating on Analytic Systems
Checking the health of models with diagnostics
Evaluating changes in model performance
Changes in feature importance
Changes in unsupervised model performance
Iterating on models through A/B testing
Experimental allocation – assigning customers to experiments
Deciding a sample size
Multiple hypothesis testing
Guidelines for communication
Translate terms to business values
Visualizing results
Case Study: building a reporting service
The report server
The report application
The visualization layer
Summary
Bibliography
Index
18. Preface
Social Media and the Internet of Things have resulted in
an avalanche of data. Data is powerful but not in its raw
form - It needs to be processed and modeled, and
Python is one of the most robust tools out there to do so.
It has an array of packages for predictive modeling and a
suite of IDEs to choose from. Using the Python
programming language, analysts can use these
sophisticated methods to build scalable analytic
applications to deliver insights that are of tremendous
value to their organizations.This course is your guide to
getting started with Predictive Analytics using Python.
You will see how to process data and make predictive
models from it. We balance both statistical and
mathematical concepts, and implement them in Python
using libraries such as pandas, scikit-learn, and numpy.
Later you will learn the process of turning raw data into
powerful insights. Through case studies and code
examples using popular open-source Python libraries,
this course illustrates the complete development process
for analytic applications and how to quickly apply these
methods to your own data to create robust and scalable
prediction services. Covering a wide range of algorithms
for classification, regression, clustering, as well as
cutting-edge techniques such as deep learning, this book
illustrates not only how these methods work, but how to
implement them in practice. You will learn to choose the
right approach for your problem and how to develop
19. engaging visualizations to bring the insights of predictive
modeling to life. Finally, you will see the best practices in
predictive modeling, as well as the different applications
of predictive modeling in the modern world.
What this learning path
covers
Module 1, Learning Predictive Analytics with Python, is
your guide to getting started with Predictive Analytics
using Python. You will see how to process data and
make predictive models from it. It is the perfect balance
of both statistical and mathematical concepts, and
implementing them in Python using libraries such as
pandas, scikit-learn, and numpy.
Module 2, Mastering Predictive Analytics with Python,
will show you the process of turning raw data into
powerful insights. Through case studies and code
examples using popular open-source Python libraries,
this course illustrates the complete development process
for analytic applications and how to quickly apply these
methods to your own data to create robust and scalable
prediction services.
20. What you need for this
learning path
Module 1:
In order to make the best use of this module, you will
require the following:
All the datasets that have been used to illustrate the concepts in
various chapters. These datasets can be downloaded from this
URL: https://goo.gl/zjS4C6. There is a sub-folder containing
required datasets for each chapter.
Your computer should have any of the Python distribution installed.
The examples in the module have been worked upon in IPython
Notebook. Following the examples will be much easier if you use
IPython Notebook.This comes with Anaconda distribution that can
be installed from https://www.continuum.io/downloads.
The Python packages which are used widely, for example, pandas,
matplotlib, scikit-learn, NumPy, and so on, should be installed. If
you install Anaconda these packages will come pre-installed.
One of the best ways to use this module will be to take the dataset
used to illustrate concepts and flow along with the chapter. The
concepts will be easier to understand if the reader works hands on
the examples.
A basic aptitude for mathematics is expected. It is beneficial to
understand the mathematics behind the algorithms before applying
them.
Prior experience or knowledge of coding will be an added
advantage. But, it is not a pre-requisite at all.
Similarly, knowledge of statistics and some algorithms will be
beneficial, but it is not a pre-requisite.
An open mind curious to learn the tips and tricks of a subject that is
21. going to be an indispensable skillset in the coming future.
Module 2:
You'll need latest Python version and PySpark version
installed, along with the Jupyter notebook.
22. Who this learning path is
for
This course is designed for business analysts, BI
analysts, data scientists, or junior level data analysts
who are ready to move from a conceptual understanding
of advanced analytics to an expert in designing and
building advanced analytics solutions using Python. If
you are familiar with coding in Python (or some other
programming/statistical/scripting language) but have
never used or read about Predictive Analytics
algorithms, this course will also help you.
23. Reader feedback
Feedback from our readers is always welcome. Let us
know what you think about this course—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
course'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.
24. Customer support
Now that you are the proud owner of a Packt course, 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 course
from your account at http://www.packtpub.com. If you
purchased this course 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 course in the Search box.
5. Select the course for which you're looking to download the code
files.
6. Choose from the drop-down menu where you purchased this
course from.
7. Click on Code Download.
You can also download the code files by clicking on the
Code Files button on the course's webpage at the Packt
Publishing website. This page can be accessed by
entering the course's name in the Search box. Please
25. 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 course is also hosted on GitHub
at https://github.com/PacktPublishing/Python-Advanced-
Predictive-Analytics. We also have other code bundles
from our rich catalog of books, videos, and courses
available at https://github.com/PacktPublishing/. Check
them out!
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 courses—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 course. If you find any errata, please
report them by visiting http://www.packtpub.com/submit-
errata, selecting your course, 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
26. 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 course 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 <[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.
Questions
If you have a problem with any aspect of this course, you
can contact us at <[email protected]>, and
we will do our best to address the problem.
27. Part 1. Module 1
Learning Predictive Analytics with Python
Gain practical insights into predictive modelling by
implementing Predictive Analytics algorithms on public
datasets with Python
28. Chapter 1. Getting Started
with Predictive Modelling
Predictive modelling is an art; its a science of unearthing
the story impregnated into silos of data. This chapter
introduces the scope and application of predictive
modelling and shows a glimpse of what could be
achieved with it, by giving some real-life examples.
In this chapter, we will cover the following topics in detail:
Introducing predictive modelling
Applications and examples of predictive modelling
Installing and downloading Python and its packages
Working with different IDEs for Python
Introducing predictive
modelling
Did you know that Facebook users around the world
share 2,460,000 pieces of content every minute of the
day? Did you know that 72-hours worth of new video
content is uploaded on YouTube in the same time and,
brace yourself, did you know that everyday around 2.5
exabytes (10^18) of data is created by us humans? To
give you a perspective on how much data that is, you will
need a million 1 TB (1000 GB) hard disk drives every
29. day to store that much data. In a year, we will outgrow
the US population and will be north of five times the UK
population and this estimation is by assuming the fact
that the rate of the data generation will remain the same,
which in all likelihoods will not be the case.
The breakneck speed at which the social media and
Internet of Things have grown is reflected in the huge
silos of data humans generate. The data about where we
live, where we come from, what we like, what we buy,
how much money we spend, where we travel, and so on.
Whenever we interact with a social media or Internet of
Things website, we leave a trail, which these websites
gleefully log as their data. Every time you buy a book at
Amazon, receive a payment through PayPal, write a
review on Yelp, post a photo on Instagram, do a check-in
on Facebook, apart from making business for these
websites, you are creating data for them.
Harvard Business Review (HBR) says "Data is the new
oil" and that "Data Scientist is the sexiest job of the 21st
century". So, why is the data so important and how can
we realize the full potential of it? There are broadly two
ways in which the data is used:
Retrospective analytics: This approach helps us analyze history
and glean out insights from the data. It allows us to learn from
mistakes and adopt best practices. These insights and learnings
become the torchbearer for the purpose of devising better strategy.
Not surprisingly, many experts have been claiming that data is the
new middle manager.
Predictive analytics: This approach unleashes the might of data.
In short, this approach allows us to predict the future. Data science
30. algorithms take historical data and spit out a statistical model, which
can predict who will buy, cheat, lie, or die in the future.
Let us evaluate the comparisons made with oil in detail:
Data is as abundant as oil used to be, once upon a time, but in
contrast to oil, data is a non-depleting resource. In fact, one can
argue that it is reusable, in the sense that, each dataset can be
used in more than one way and also multiple number of times.
It doesn't take years to create data, as it takes for oil.
Oil in its crude form is worth nothing. It needs to be refined through
a comprehensive process to make it usable. There are various
grades of this process to suit various needs; it's the same with data.
The data sitting in silos is worthless; it needs to be cleaned,
manipulated, and modelled to make use of it. Just as we need
refineries and people who can operate those refineries, we need
tools that can handle data and people who can operate those tools.
Some of the tools for the preceding tasks are Python, R, SAS, and
so on, and the people who operate these tools are called data
scientists.
A more detailed comparison of oil and data is provided in
the following table:
Data Oil
It's a non-depleting resource and
also reusable.
It's a depleting resource and non-
reusable.
Data collection requires some
infrastructure or system in place.
Once the system is in place, the data
generation happens seamlessly.
Drilling oil requires a lot of
infrastructure. Once the
infrastructure is in place, one can
keep drawing the oil until the stock
dries up.
It needs to be cleaned and modelled. It needs to be cleaned and
processed.
The time taken to generate data
varies from fractions of second to
months and years.
It takes decades to generate.
31. The worth and marketability of
different kinds of data is different.
The worth of crude oil is same
everywhere. However, the price and
marketability of different end
products of refinement is different.
The time horizon for monetization of
data is smaller after getting the data.
The time horizon for monetizing oil
is longer than that for data.
Scope of predictive modelling
Predictive modelling is an ensemble of statistical
algorithms coded in a statistical tool, which when applied
on historical data, outputs a mathematical function (or
equation). It can in-turn be used to predict outcomes
based on some inputs (on which the model operates)
from the future to drive a goal in business context or
enable better decision making in general.
To understand what predictive modelling entails, let us
focus on the phrases highlighted previously.
ENSEMBLE OF STATISTICAL
ALGORITHMS
Statistics are important to understand data. It tells
volumes about the data. How is the data distributed? Is it
centered with little variance or does it varies widely? Are
two of the variables dependent on or independent of
each other? Statistics helps us answer these questions.
This book will expect a basic understanding of basic
statistical terms, such as mean, variance, co-variance,
and correlation. Advanced terms, such as hypothesis
testing, Chi-Square tests, p-values, and so on will be
explained as and when required. Statistics are the cog in
32. the wheel called model.
Algorithms, on the other hand, are the blueprints of a
model. They are responsible for creating mathematical
equations from the historical data. They analyze the
data, quantify the relationship between the variables,
and convert it into a mathematical equation. There is a
variety of them: Linear Regression, Logistic Regression,
Clustering, Decision Trees, Time-Series Modelling,
Naïve Bayes Classifiers, Natural Language Processing,
and so on. These models can be classified under two
classes:
Supervised algorithms: These are the algorithms wherein the
historical data has an output variable in addition to the input
variables. The model makes use of the output variables from
historical data, apart from the input variables. The examples of such
algorithms include Linear Regression, Logistic Regression,
Decision Trees, and so on.
Un-supervised algorithms: These algorithms work without an
output variable in the historical data. The example of such
algorithms includes clustering.
The selection of a particular algorithm for a model
depends majorly on the kind of data available. The focus
of this book would be to explain methods of handling
various kinds of data and illustrating the implementation
of some of these models.
STATISTICAL TOOLS
There are a many statistical tools available today, which
are laced with inbuilt methods to run basic statistical
chores. The arrival of open-source robust tools like R
33. and Python has made them extremely popular, both in
industry and academia alike. Apart from that, Python's
packages are well documented; hence, debugging is
easier.
Python has a number of libraries, especially for running
the statistical, cleaning, and modelling chores. It has
emerged as the first among equals when it comes to
choosing the tool for the purpose of implementing
preventive modelling. As the title suggests, Python will
be the choice for this book, as well.
HISTORICAL DATA
Our machinery (model) is built and operated on this oil
called data. In general, a model is built on the historical
data and works on future data. Additionally, a predictive
model can be used to fill missing values in historical data
by interpolating the model over sparse historical data. In
many cases, during modelling stages, future data is not
available. Hence, it is a common practice to divide the
historical data into training (to act as historical data) and
testing (to act as future data) through sampling.
As discussed earlier, the data might or might not have an
output variable. However, one thing that it promises to be
is messy. It needs to undergo a lot of cleaning and
manipulation before it can become of any use for a
modelling process.
MATHEMATICAL FUNCTION
34. Most of the data science algorithms have underlying
mathematics behind them. In many of the algorithms,
such as regression, a mathematical equation (of a
certain type) is assumed and the parameters of the
equations are derived by fitting the data to the equation.
For example, the goal of linear regression is to fit a linear
model to a dataset and find the equation parameters of
the following equation:
The purpose of modelling is to find the best values for
the coefficients. Once these values are known, the
previous equation is good to predict the output. The
equation above, which can also be thought of as a linear
function of Xi's (or the input variables), is the linear
regression model.
Another example is of logistic regression. There also we
have a mathematical equation or a function of input
variables, with some differences. The defining equation
for logistic regression is as follows:
Here, the goal is to estimate the values of a and b by
fitting the data to this equation. Any supervised algorithm
will have an equation or function similar to that of the
model above. For unsupervised algorithms, an
underlying mathematical function or criterion (which can
35. be formulated as a function or equation) serves the
purpose. The mathematical equation or function is the
backbone of a model.
BUSINESS CONTEXT
All the effort that goes into predictive analytics and all its
worth, which accrues to data, is because it solves a
business problem. A business problem can be anything
and it will become more evident in the following
examples:
Tricking the users of the product/service to buy more from you by
increasing the click through rates of the online ads
Predicting the probable crime scenes in order to prevent them by
aggregating an invincible lineup for a sports league
Predicting the failure rates and associated costs of machinery
components
Managing the churn rate of the customers
The predictive analytics is being used in an array of
industries to solve business problems. Some of these
industries are, as follows:
Banking
Social media
Retail
Transport
Healthcare
Policing
Education
Travel and logistics
36. E-commerce
Human resource
By what quantum did the proposed solution make life
better for the business, is all that matters. That is the
reason; predictive analytics is becoming an
indispensable practice for management consulting.
In short, predictive analytics sits at the sweet spot where
statistics, algorithm, technology and business sense
intersect. Think about it, a mathematician, a
programmer, and a business person rolled in one.
Knowledge matrix for predictive
modelling
As discussed earlier, predictive modelling is an
interdisciplinary field sitting at the interface and requiring
knowledge of four disciplines, such as Statistics,
Algorithms, Tools, Techniques, and Business Sense.
Each of these disciplines is equally indispensable to
perform a successful task of predictive modelling.
These four disciplines of predictive modelling carry equal
weights and can be better represented as a knowledge
matrix; it is a symmetric 2 x 2 matrix containing four
equal-sized squares, each representing a discipline.
37. Fig. 1.1: Knowledge matrix: four
disciplines of predictive modelling
Task matrix for predictive modelling
The tasks involved in predictive modelling follows the
Pareto principle. Around 80% of the effort in the
modelling process goes towards data cleaning and
wrangling, while only 20% of the time and effort goes into
implementing the model and getting the prediction.
However, the meaty part of the modelling that is rich with
almost 80% of results and insights is undoubtedly the
implementation of the model. This information can be
better represented as a matrix, which can be called a
task matrix that will look something similar to the
following figure:
38. Fig. 1.2: Task matrix: split of time spent on
data cleaning and modelling and their final
contribution to the model
Many of the data cleaning and exploration chores can be
automated because they are alike most of the times,
irrespective of the data. The part that needs a lot of
human thinking is the implementation of a model, which
is what makes the bulk of this book.
39. Applications and
examples of predictive
modelling
In the introductory section, data has been compared with
oil. While oil has been the primary source of energy for
the last couple of centuries and the legends of OPEC,
Petrodollars, and Gulf Wars have set the context for the
oil as a begrudged resource; the might of data needs to
be demonstrated here to set the premise for the
comparison. Let us glance through some examples of
predictive analytics to marvel at the might of data.
LinkedIn's "People also viewed"
feature
If you are a frequent LinkedIn user, you might be familiar
with LinkedIn's "People also viewed" feature.
WHAT IT DOES?
Let's say you have searched for some person who works
at a particular organization and LinkedIn throws up a list
of search results. You click on one of them and you land
up on their profile. In the middle-right section of the
screen, you will find a panel titled "People Also Viewed";
it is essentially a list of people who either work at the
same organization as the person whose profile you are
40. currently viewing or the people who have the same
designation and belong to same industry.
Isn't it cool? You might have searched for these people
separately if not for this feature. This feature increases
the efficacy of your search results and saves your time.
HOW IS IT DONE?
Are you wondering how LinkedIn does it? The rough
blueprint is as follows:
LinkedIn leverages the search history data to do this. The model
underneath this feature plunges into a treasure trove of search
history data and looks at what people have searched next after
finding the correct person they were searching for.
This event of searching for a particular second person after
searching for a particular first person has some probability. This will
be calculated using all the data for such searches. The profiles with
the highest probability of being searched (based on the historical
data) are shown in the "People Also Viewed" section.
This probability comes under the ambit of a broad set of rules called
Association Rules. These are very widely used in Retail Analytics
where we are interested to know what a group of products will sell
together. In other words, what is the probability of buying a
particular second product given that the consumer has already
bought the first product?
Correct targeting of online ads
If you browse the Internet, which I am sure you must be
doing frequently, you must have encountered online ads,
both on the websites and smartphone apps. Just like the
ads in the newspaper or TV, there is a publisher and an
advertiser for online ads too. The publisher in this case is
41. the website or the app where the ad will be shown while
the advertiser is the company/organization that is posting
that ad.
The ultimate goal of an online ad is to be clicked on.
Each instance of an ad display is called an impression.
The number of clicks per impression is called Click
Through Rate and is the single most important metric
that the advertisers are interested in. The problem
statement is to determine the list of publishers where the
advertiser should publish its ads so that the Click
Through Rate is the maximum.
HOW IS IT DONE?
The historical data in this case will consist of information about
people who visited a certain website/app and whether they clicked
the published ad or not. Some or a combination of classification
models, such as Decision Trees, and Support Vector Machines are
used in such cases to determine whether a visitor will click on the
ad or not, given the visitor's profile information.
One problem with standard classification algorithms in such cases
is that the Click Through Rates are very small numbers, of the order
of less than 1%. The resulting dataset that is used for classification
has a very sparse positive outcome. The data needs to be
downsampled to enrich the data with positive outcomes before
modelling.
The logistical regression is one of the most standard
classifiers for situations with binary outcomes. In
banking, whether a person will default on his loan or not
can be predicted using logistical regression given his
credit history.
42. Santa Cruz predictive policing
Based on the historical data consisting of the area and
time window of the occurrence of a crime, a model was
developed to predict the place and time where the next
crime might take place.
HOW IS IT DONE?
A decision tree model was created using the historical data. The
prediction of the model will foretell whether a crime will occur in an
area on a given date and time in the future.
The model is consistently recalibrated every day to include the
crimes that happened during that day.
The good news is that the police are using such
techniques to predict the crime scenes in advance so
that they can prevent it from happening. The bad news is
that certain terrorist organizations are using such
techniques to target the locations that will cause the
maximum damage with minimal efforts from their side.
The good news again is that this strategic behavior of
terrorists has been studied in detail and is being used to
form counter-terrorist policies.
Determining the activity of a
smartphone user using
accelerometer data
The accelerometer in a smartphone measures the
acceleration over a period of time as the user indulges in
various activities. The acceleration is measured over the
three axes, X, Y, and Z. This acceleration data can then
43. be used to determine whether the user is sleeping,
walking, running, jogging, and so on.
HOW IS IT DONE?
The acceleration data is clustered based on the acceleration values
in the three directions. The values of the similar activities cluster
together.
The clustering performs well in such cases if the columns
contributing the maximum to the separation of activities are also
included while calculating the distance matrix for clustering. Such
columns can be found out using a technique called Singular Value
Decomposition.
Sport and fantasy leagues
Moneyball, anyone? Yes, the movie. The movie where a
statistician turns the fortunes of a poorly performing
baseball team, Oak A, by developing an algorithm to
select players who were cheap to buy but had a lot of
latent potential to perform.
HOW WAS IT DONE?
Bill James, using historical data, concluded that the older metrics
used to rate a player, such as stolen balls, runs batted in, and
batting average were not very useful indicators of a player's
performance in a given match. He rather relied on metrics like on-
base percentage and sluggish percentage to be a better predictor
of a player's performance.
The chief statistician behind the algorithms, Bill James, compiled
the data for performance of all the baseball league players and
sorted them for these metrics. Surprisingly, the players who had
high values for these statistics also came at cheaper prices.
This way, they gathered an unbeatable team that didn't
44. have individual stars who came at hefty prices but as a
team were an indomitable force. Since then, these
algorithms and their variations have been used in a
variety of real and fantasy leagues to select players. The
variants of these algorithms are also being used by
Venture Capitalists to optimize and automate their due
diligence to select the prospective start-ups to fund.
45. Python and its packages –
download and installation
There are various ways in which one can access and
install Python and its packages. Here we will discuss a
couple of them.
Anaconda
Anaconda is a popular Python distribution consisting of
more than 195 popular Python packages. Installing
Anaconda automatically installs many of the packages
discussed in the preceding section, but they can be
accessed only through an IDE called Spyder (more on
this later in this chapter), which itself is installed on
Anaconda installation. Anaconda also installs IPython
Notebook and when you click on the IPython Notebook
icon, it opens a browser tab and a Command Prompt.
NOTE
NOTE
Anaconda can be downloaded and installed from the following web address:
http://continuum.io/downloads
Download the suitable installer and double click on the
.exe file and it will install Anaconda. Two of the features
that you must check after the installation are:
IPython Notebook
Spyder IDE
46. Search for them in the "Start" icon's search, if it doesn't
appear in the list of programs and files by default. We will
be using IPython Notebook extensively and the codes in
this book will work the best when run in IPython
Notebook.
IPython Notebook can be opened by clicking on the icon.
Alternatively, you can use the Command Prompt to open
IPython Notebook. Just navigate to the directory where
you have installed Anaconda and then write ipython
notebook, as shown in the following screenshot:
Fig. 1.3: Opening IPython Notebook
NOTE
NOTE
On the system used for this book, Anaconda was installed in the C:Usersashish
directory. One can open a new Notebook in IPython by clicking on the New Notebook
button on the dashboard, which opens up. In this book, we have used IPython Notebook
extensively.
Standalone Python
You can download a Python version that is stable and is
compatible to the OS on your system. The most stable
version of Python is 2.7.0. So, installing this version is
highly recommended. You can download it from
https://www.python.org/ and install it.
There are some Python packages that you need to
47. install on your machine before you start predictive
analytics and modelling. This section consists of a demo
of installation of one such library and a brief description
of all such libraries.
Installing a Python package
There are several ways to install a Python package. The
easiest and the most effective is the one using pip. As
you might be aware, pip is a package management
system that is used to install and manage software
packages written in Python. To be able to use it to install
other packages, pip needs to be installed first.
INSTALLING PIP
The following steps demonstrate how to install pip.
Follow closely!
1. Navigate to the webpage shown in the following screenshot. The
URL address is https://pypi.python.org/pypi/pip:
Downloading pip from the Python's official website
2. Download the pip-7.0.3.tar.gz file and unzip in the folder
where Python is installed. If you have Python v2.7.0 installed, this
folder should be C:Python27:
48. Unzipping the .zar file for pip in the correct folder
3. On unzipping the previously mentioned file, a folder called pip-
7.0.3 is created. Opening that folder will take you to the screen
similar to the one in the preceding screenshot.
4. Open the CMD on your computer and change the current directory
to the current directory in the preceding screenshot that is
C:Python27pip-7.0.3 using the following command:
cd C:Python27pip-7.0.3.
5. The result of the preceding command is shown in the following
screenshot:
Navigating to the directory where pip is installed
6. Now, the current directory is set to the directory where setup file for
pip (setup.py) resides. Write the following command to install
pip:
python setup.py install
7. The result of the preceding command is shown in the following
screenshot:
49. Installing pip using a command line
Once pip is installed, it is very easy to install all the
required Python packages to get started.
INSTALLING PYTHON PACKAGES WITH
PIP
The following are the steps to install Python packages
using pip, which we just installed in the preceding
section:
1. Change the current directory in the command prompt to the
directory where the Python v2.7.0 is installed that is:
C:Python27.
2. Write the following command to install the package:
pip install package-name
3. For example, to install pandas, you can proceed as follows:
Installing a Python package using a command line and pip
4. Finally, to confirm that the package has installed successfully, write
the following command:
python -c "import pandas"
5. The result of the preceding command is shown in the following
screenshot:
50. Checking whether the package has installed correctly or not
If this doesn't throw up an error, then the package has
been installed successfully.
51. Python and its packages
for predictive modelling
In this section, we will discuss some commonly used
packages for predictive modelling.
pandas: The most important and versatile package that
is used widely in data science domains is pandas and it
is no wonder that you can see import pandas at the
beginning of any data science code snippet, in this book,
and anywhere in general. Among other things, the
pandas package facilitates:
The reading of a dataset in a usable format (data frame in case of
Python)
Calculating basic statistics
Running basic operations like sub-setting a dataset,
merging/concatenating two datasets, handling missing data, and so
on
The various methods in pandas will be explained in this
book as and when we use them.
NOTE
NOTE
To get an overview, navigate to the official page of pandas here:
http://pandas.pydata.org/index.html
NumPy: NumPy, in many ways, is a MATLAB equivalent
in the Python environment. It has powerful methods to
do mathematical calculations and simulations. The
52. following are some of its features:
A powerful and widely used a N-d array element
An ensemble of powerful mathematical functions used in linear
algebra, Fourier transforms, and random number generation
A combination of random number generators and an N-d array
elements is used to generate dummy datasets to demonstrate
various procedures, a practice we will follow extensively, in this
book
NOTE
NOTE
To get an overview, navigate to official page of NumPy at http://www.NumPy.org/
matplotlib: matplotlib is a Python library that easily
generates high-quality 2-D plots. Again, it is very similar
to MATLAB.
It can be used to plot all kind of common plots, such as histograms,
stacked and unstacked bar charts, scatterplots, heat diagrams, box
plots, power spectra, error charts, and so on
It can be used to edit and manipulate all the plot properties such as
title, axes properties, color, scale, and so on
NOTE
NOTE
To get an overview, navigate to the official page of matplotlib at: http://matplotlib.org
IPython: IPython provides an environment for interactive
computing.
It provides a browser-based notebook that is an IDE-
cum-development environment to support codes, rich
media, inline plots, and model summary. These
notebooks and their content can be saved and used later
to demonstrate the result as it is or to save the codes
53. separately and execute them. It has emerged as a
powerful tool for web based tutorials as the code and the
results flow smoothly one after the other in this
environment. At many places in this book, we will be
using this environment.
NOTE
NOTE
To get an overview, navigate to the official page of IPython here http://ipython.org/
Scikit-learn: scikit-learn is the mainstay of any
predictive modelling in Python. It is a robust collection of
all the data science algorithms and methods to
implement them. Some of the features of scikit-
learn are as follows:
It is built entirely on Python packages like pandas, NumPy, and
matplotlib
It is very simple and efficient to use
It has methods to implement most of the predictive modelling
techniques, such as linear regression, logistic regression,
clustering, and Decision Trees
It gives a very concise method to predict the outcome based on the
model and measure the accuracy of the outcomes
NOTE
NOTE
To get an overview, navigate to the official page of scikit-learn here: http://scikit-
learn.org/stable/index.html
Python packages, other than these, if used in this book,
will be situation based and can be installed using the
method described earlier in this section.
54. IDEs for Python
The IDE or the Integrated Development Environment is a
software that provides the source-code editor cum
debugger for the purpose of writing code. Using these
software, one can write, test, and debug a code snippet
before adding the snippet in the production version of the
code.
IDLE: IDLE is the default Integrated Development
Environment for Python that comes with the default
implementation of Python. It comes with the following
features:
Multi-window text-editor with auto-completion, smart-indent, syntax,
and keyword highlighting
Python shell with syntax highlighting
IDLE is widely popular as an IDE for beginners; it is
simple to use and works well for simple tasks. Some of
the issues with IDLE are bad output reporting, absence
of line numbering options, and so on. As a result,
advanced practitioners move on to better IDEs.
IPython Notebook: IPython Notebook is a powerful
computational environment where code, execution,
results, and media can co-exist in one single document.
There are two components of this computing
environment:
56. While the war was going on in the west and centre of France, the
League was strengthening its organisation and perfecting its plans.
It had become more and more hostile to Henry III., and had become
a secret revolutionary society. It drafted a complete programme for
the immediate future. The cities and districts of France which felt
themselves specially threatened by the Huguenots were to beseech
the King to raise levies for their protection. If he refused or
procrastinated, they were to raise the troops themselves, to be
commanded by officers in whom the League had confidence. They
could then compel the King to place himself at the head of this army
of the Leaguers, or show himself to be their open enemy by
refusing. If the King died childless, the partisans of the League were
to gather at Orléans and Paris, and were there to elect the Cardinal
de Bourbon as the King of France. The Pope and the King of Spain
were to be at once informed, when it had been arranged that His
Holiness would send his benediction, and that His Majesty would
assist them with troops and supplies. A new form of oath was
imposed on all the associates of the League. They were to swear
allegiance to the King so long as he should show himself to be a
good Catholic and refrained from favouring heretics. These
instructions were sent down from the mother-society in Paris to the
provinces, and the affiliated societies were recommended to keep in
constant communication with Paris. Madame de Montpensier, sister
to the Guises, at the same time directed the work of a band of
preachers whose business it was to inflame the minds of the people
in the capital and the provinces against the King and the Huguenots.
She boasted that she did more work for the cause than her brothers
were doing by the sword.
The Guises, with this force behind them, tried to force the King to
make new concessions—to publish the decisions of the Council of
Trent in France (a thing that had not been done); to establish the
Inquisition in France; to order the execution of all Huguenot
prisoners who would not promise to abjure their religion; and to
remove from the armies all officers of whom the League did not
approve. The mother-society in Paris prepared for his refusal by
57. organising a secret revolutionary government for the city. It was
called “The Sixteen,” being one for each of the sixteen sections of
Paris. This government was under the orders of Guise, who
communicated with them through an agent of his called Mayneville.
Plot after plot was made to get possession of the King’s person; and
but for the activity and information of Nicholas Poulain, an officer of
police who managed to secure private information, they would have
been successful.
§ 18. The Day of Barricades.[225]
The King redoubled his guards, and ordered four thousand Swiss
troops which he had stationed at Lagny into the suburbs of Paris.
The Parisian Leaguers in alarm sent for the Duke of Guise; and
Guise, in spite of a prohibitive order from the King, entered the city.
When he was recognised he was received with acclamations by the
Parisian crowd. The Queen-Mother induced the King to receive him,
which he did rather ungraciously. Officers and men devoted to the
League crowded into Paris. The King, having tried in vain to prevent
the entry of all suspected persons, at last ordered the Swiss into
Paris (May 12th, 1588). The citizens flew to arms, and converted
Paris into a stronghold. It was “the day of Barricades.” Chains were
stretched across the streets, and behind them were piled beams,
benches, carts, great barrels filled with stones or gravel. Houses
were loop-holed and windows protected. Behind these defences men
were stationed with arquebuses; and the women and children were
provided with heaps of stones. Guise had remained in his house, but
his officers were to be seen moving through the crowds and
directing the defence. The Swiss troops found themselves caught in
a trap, and helpless. Henry III. was compelled to ask Guise to
interfere in order to save his soldiers. The King had to undergo
further humiliation. The citizens proposed to attack the Louvre and
seize the King’s person. Guise had to be appealed to again. He had
an interview with the King on the 13th, at which Henry III. was
forced to agree to all the demands of the League, and to leave the
58. conduct of the war against the Huguenots in the hands of the leader
of the League. After the interview the King was able to escape
secretly from Paris.
The day of the “Barricades” had proved to Henry III. that the
League was master in his capital. The meeting of the States General
at Blois (Oct. 1588) was to show him that the country had also
turned against him.
The elections had been looked after by the Guises, and had taken
place while the impression produced by the revolt of Paris was at its
height. The League commanded an immense majority in all the
three Estates. The business before them was grave. The finances of
the kingdom were in disorder; favouritism had not been got rid of;
and no one could trust the King’s word. Above all, the religious
question was embittering every mind. The Estates met under the
influence of a religious exaltation fanned by the priests. On the 9th
of Oct. representatives of the three Estates went to Mass together.
During the communion the assistant clergy chanted the well-known
hymns,—Pange lingua gloriosi, O salutaris Hostia, Ave verum Corpus
natum,—and the excitement was immense. The members of the
Estates had never been so united.
Yet the King had a moment of unwonted courage. He had resolved
to denounce the League as the source of the disorders in the
kingdom. He declared that he would not allow a League to exist
within the realm. He only succeeded in making the leaders furious.
His bravado soon ceased. The Cardinal de Bourbon compelled him to
omit from the published version of his speech the objectionable
expressions. The Estates forced him to swear that he would not
permit any religion within the kingdom but the Roman. This done, he
was received with cries of Vive le Roi, and was accompanied to his
house with acclamations. But he was compelled to see the Duke of
Guise receive the office of Lieutenant-General, which placed the
army under his command; and he felt that he would never be
“master in his own house” until that man had been removed from
his path.
59. The news of the completeness of the destruction of the Armada had
been filtering through France; the fear of Spain was to some extent
removed, and England might help the King if he persisted in a policy
of tolerating his Protestant subjects. It is probable that he confided
his project of getting rid of Guise to some of his more intimate
councillors, and that they assured him that it would be impossible to
remove such a powerful subject by legal means. The Duke and his
brother the Cardinal of Guise were summoned to a meeting of the
Council. They had scarcely taken their seats when they were asked
to see the King in his private apartments. There Guise was
assassinated, and the Cardinal arrested, and slain the next day.[226]
The Cardinal de Bourbon and the young Prince de Joinville (now
Duke of Guise by his father’s death) were arrested and imprisoned.
Orders were given to arrest the Duchess of Nemours (Guise’s
mother), the Duke and Duchess of Elbœuf, the Count de Brissac,
and other prominent Leaguers. The King’s guards invaded the
sittings of the States General to carry out these orders. The bodies
of the two Guises were burnt, and the ashes thrown into the Loire.
The news of the assassination raised the wildest rage in Paris. The
League proclaimed itself a revolutionary society. The city organised
itself in its sections. A council was appointed for each section to
strengthen the hands of the “Sixteen.” Preachers caused their
audiences to swear that they would spend the last farthing in their
purses and the last drop of blood in their bodies to avenge the
slaughtered princes. The Sorbonne in solemn conclave declared that
the actions of Henry III. had absolved his subjects from their
allegiance. The “Sixteen” drove from Parlement all suspected
persons; and, thus purged, the Parlement of Paris ranged itself on
the side of the revolution. The Duke of Mayenne, the sole surviving
brother of Henry of Guise, was summoned to Paris. An assembly of
the citizens of the capital elected a Council General of the Union of
Catholics to manage the affairs of the State and to confer with all
the Catholic towns and provinces of France. Deputies sent by these
towns and provinces were to be members of the Council. The Duke
of Mayenne was appointed by the Council the Lieutenant-General of
60. the State and Crown of France. The new Government had its seal—
the Seal of the Kingdom of France. The larger number of the great
towns of France adhered to this provisional and revolutionary
Government.
In the midst of these tumults Catherine de’ Medici died (Jan. 5th,
1589).
§ 19. The King takes refuge with the
Huguenots.
The miserable King had no resource left but to throw himself upon
the protection of the Protestants. He hesitated at first, fearing
threatened papal excommunication. Henry of Navarre’s bearing
during these months of anxiety had been admirable. After the
meeting of the States General at Blois, he had issued a stirring
appeal to the nation, pleading for peace—the one thing needed for
the distracted and fevered country. He now assured the King of his
loyalty, and promised that he would never deny to Roman Catholics
that liberty of conscience and worship which he claimed. A treaty
was arranged, and the King of Navarre went to meet Henry III. at
Tours. He arrived just in time. Mayenne at the head of an avenging
army of Leaguers had started as soon as the provisional government
had been established in Paris. He had taken by assault a suburb of
the town, and was about to attack the city of Tours itself, when he
found the Protestant vanguard guarding the bridge over the Loire,
and had to retreat. He was slowly forced back towards Paris. The
battle of Senlis, in which a much smaller force of Huguenots routed
the Duke d’Aumale, who had been reinforced by the Parisian militia,
opened the way to Paris. The King of Navarre pressed on. Town after
town was taken, and the forces of the two kings, increased by
fourteen thousand Swiss and Germans, were soon able to seize the
bridge of St. Cloud and invest the capital on the south and west
(July 29th, 1589). An assault was fixed for Aug. 2nd.
61. Since the murder of the Guises, Paris had been a caldron of seething
excitement. The whole population, “avec douleur et gemissements
bien grands,” had assisted at the funeral service for “the Martyrs,”
and the baptism of the posthumous son of the slaughtered Duke had
been a civic ceremony. The Bull “monitory” of Pope Sixtus V., posted
up in Rome on May 24th, which directed Henry III. on pain of
excommunication to release the imprisoned prelates within ten days,
and to appear either personally or by proxy within sixty days before
the Curia to answer for the murder of a Prince of the Church, had
fanned the excitement. Almost every day the Parisians saw
processions of students, of women, of children, defiling through their
streets. They marched from shrine to shrine, with naked feet, clad
only in their shirts, defying the cold of winter. Parishioners dragged
their priests out of bed to head nocturnal processions. The hatred of
Henry III. became almost a madness. The Cordeliers decapitated his
portraits. Parish priests made images of the King in wax, placed
them on their altars, and practised on them magical incantations, in
the hope of doing deadly harm to the living man. Bands of children
carried lighted candles, which they extinguished to cries of, “God
extinguish thus the race of the Valois.”
Among the most excited members of this fevered throng was a
young Jacobin monk, Jacques Clément, by birth a peasant, of scanty
intelligence, and rough, violent manners. His excitement grew with
the perils of the city. He consulted a theologian in whom he had
confidence, and got from him a guarded answer that it might be
lawful to slay a tyrant. He prayed, fasted, went through a course of
maceration of the body. He saw visions. He believed that he heard
voices, and that he received definite orders to give his life in order to
slay the King. He confided his purpose to friends, who approved of it
and helped his preparations. He was able to leave the city, to pass
through the beleaguering lines, and to get private audience of the
King. He presented a letter, and while Henry was reading it stabbed
him in the lower part of the body. The deed done, the monk raised
himself to his full height, extended his arms to form himself into a
62. crucifix, and received without flinching his deathblow from La Guesle
and other attendants (Aug. 1st, 1589).[227]
The King lingered until the following morning, and then expired,
commending Henry of Navarre to his companions as his legitimate
successor.
The news of the assassination was received in Paris with wild
delight. The Duchess de Nemours, the mother of the Guises, and the
Duchess de Montpensier, their sister, went everywhere in the streets
describing “the heroic act of Jacques Clément.” The former mounted
the steps of the High Altar in the church of the Cordeliers to
proclaim the news to the people. The citizens, high and low, brought
out their tables into the streets, and they drank, sang, shouted and
danced in honour of the news. They swore that they would never
accept a Protestant king[228] and the Cardinal de Bourbon, still a
prisoner, was proclaimed as Charles x.
At Tours, on the other hand, the fact that the heir to the throne was
a Protestant, threw the Roman Catholic nobles into a state of
perplexity. They had no sympathy with the League, but many felt
that they could not serve a Protestant king. They pressed round the
new King, beseeching him to abjure his faith at once. Henry refused
to do what would humiliate himself, and could not be accepted as an
act of sincerity. On the other hand, the nobles of Champagne,
Picardy, and the Isle of France sent assurances of allegiance; the
Duke of Montpensier, the husband of the Leaguer Duchess, promised
his support; and the Swiss mercenaries declared that they would
serve for two months without pay.
§ 20. The Declaration of Henry IV.[229]
Thus encouraged, Henry published his famous declaration (Aug. 4th,
1589). He promised that the Roman Catholic would remain the
religion of the realm, and that he would attempt no innovations. He
declared that he was willing to be instructed in its tenets, and that
63. within six months, if it were possible, he would summon a National
Council. The Roman Catholics would be retained in their
governments and charges; the Protestants would keep the
strongholds which were at present in their hands; but all fortified
places when reduced would be entrusted to Roman Catholics and
none other. This declaration was signed by two Princes of the Blood,
the Prince of Conti and the Duke of Montpensier; by three Dukes
and Peers, Longueville, Luxembourg-Piney, and Rohan-Montbazon;
by two Marshals of France, Biron and d’Aumont; and by several
great officers. Notwithstanding, the defections were serious; all the
Parlements save that of Bordeaux thundered against the heretic
King; all the great towns save Tours, Bordeaux, Châlons, Langres,
Compiègne, and Clermont declared for the League. The greater part
of the kingdom was in revolt. The royalist troops dwindled away. It
was hopeless to think of attacking Paris, and Henry IV. marched for
Normandy with scarcely seven thousand men. He wished to be on
the sea coast in hope of succour from England.
The Duke of Mayenne followed him with an army of thirty thousand
men. He had promised to the Parisians to throw the “Bearnese” into
the sea, or to bring him in chains to Paris, But it was not so easy to
catch the “Bearnese.” In the series of marches, countermarches, and
skirmishes which is known as the battle of Arques, the advantage
was on the side of the King; and when Mayenne attempted to take
Dieppe by assault, he was badly defeated (Sept. 24th, 1589). Then
followed marches and countermarches; the King now threatening
Paris and then retreating, until at last the royalist troops and the
Leaguers met at Ivry. The King had two thousand cavalry and eight
thousand infantry to meet eight thousand cavalry and twelve
thousand infantry (including seventeen hundred Spanish troops sent
by the Duke of Parma) under the command of Mayenne. The battle
resulted in a surprising and decisive victory for the King. Mayenne
and his cousin d’Aumale escaped only by the swiftness of their
horses (March 14th, 1590).
It is needless to say much about the war or about the schemes of
parties. Henry invested Paris, and had almost starved it into
64. surrender, when it was revictualled by an army led from the Low
Countries by the Duke of Parma. Henry took town after town, and
gradually isolated the capital. In 1590 (May 10th) the old Cardinal
Bourbon (Charles X.) died, and the Leaguers lost even the
semblance of a legitimate king. The more fanatical members of the
party, represented by the “Sixteen” of Paris, would have been
content to place France under the dominion of Spain rather than see
a heretic king. The Duke of Mayenne had long cherished dreams
that the crown might come to him. But the great mass of the
influential people of France who had not yet professed allegiance to
Henry IV. (and many who had) had an almost equal dread of
Spanish domination and of a heretic ruler.
§ 21. Henry IV. becomes a Roman Catholic.
Henry at last resolved to conform to the Roman Catholic religion as
the only means of giving peace to his distracted kingdom. He
informed the loyalist Archbishop of Bourges of his intention to be
instructed in the Roman Catholic religion with a view to conversion.
The Archbishop was able to announce this at the conference of
Suresnes, and the news spread instantly over France. With his usual
tact, Henry wrote with his own hand to several of the parish priests
of Paris announcing his intention, and invited them to meet him at
Mantes to give him instruction. At least one of them had been a
furious Leaguer, and was won to be an enthusiastic loyalist.
The ceremony of the reception of Henry IV. into the Roman Catholic
Church took place at Saint Denis, about four and a half miles to the
north of Paris. The scene had all the appearance of some popular
festival. The ancient church in which the Kings of France had for
generations been buried, in which Jeanne d’Arc had hung up her
arms, was decked with splendid tapestries, and the streets leading
to it festooned with flowers. Multitudes of citizens had come from
rebel Paris to swell the throng and to shout Vive le Roi! as Henry,
escorted by a brilliant procession of nobles and guards, passed
slowly to the church. The clergy, headed by the Archbishop of
65. Bourges, met him at the door. The King dismounted, knelt, swore to
live and die in the catholic apostolic and Roman religion, and
renounced all the heresies which it condemned. The Archbishop
gave him absolution, took him by the hand and led him into the
church. There, kneeling before the High Altar, the King repeated his
oath, confessed, and communicated. France had now a Roman
Catholic as well as a legitimate King. Even if it be admitted that
Henry IV. was not a man of any depth of religious feeling, the act of
abjuration must have been a humiliation for the son of Jeanne
d’Albret. He never was a man who wore his heart on his sleeve, and
his well-known saying, that “Paris was well worth a Mass,” had as
much bitterness in it as gaiety. He had paled with suppressed
passion at Tours (1589) when the Roman Catholic nobles had urged
him to become a Romanist. Had the success which followed his arms
up to the battle of Ivry continued unbroken, it is probable that the
ceremony at Saint Denis would never have taken place. But Parma’s
invasion of France, which compelled the King to raise the siege of
Paris, was the beginning of difficulties which seemed
insurmountable. The dissensions of parties within the realm, and the
presence of foreigners on the soil of France (Walloon, Spanish,
Neapolitan, and Savoyard), were bringing France to the verge of
dissolution. Henry believed that there was only one way to end the
strife, and he sacrificed his convictions to his patriotism.
With Henry’s change of religion the condition of things changed as if
by magic. The League seemed to dissolve. Tenders of allegiance
poured in from all sides, from nobles, provinces, and towns. Rheims
was still in possession of the Guises, and the anointing and crowning
took place at Chartres (Feb. 27th, 1594). The manifestations of
loyalty increased.
On the evening of the day on which Henry had been received into
the Roman Catholic Church at Saint Denis, he had recklessly ridden
up to the crest of the height of Montmartre and looked down on
Paris, which was still in the hands of the League. The feelings of the
Parisians were also changing. The League was seamed with
dissensions; Mayenne had quarrelled with the “Sixteen,” and the
66. partisans of these fanatics of the League had street brawls with the
citizens of more moderate opinions. Parlement took courage and
denounced the presence of Spanish soldiers within the capital. The
loyalists opened the way for the royal troops, Henry entered Paris
(March 22nd), and marched to Notre Dame, where the clergy
chanted the Te Deum. From the cathedral he rode to the Louvre
through streets thronged with people, who pressed up to his very
stirrups to see their King, and made the tall houses re-echo with
their loyalist shoutings. Such a royal entry had not been seen for
generations, and took everyone by surprise. Next day the foreign
troops left the city. The King watched their departure from an open
window in the Louvre, and as their chiefs passed he called out gaily,
“My compliments to your Master. You need not come back.”
With the return of Paris to fealty, almost all signs of disaffection
departed; and the King’s proclamation of amnesty for all past
rebellions completed the conquest of his people. France was again
united after thirty years of civil war.
§ 22. The Edict of Nantes.
The union of all Frenchmen to accept Henry IV. as their King had not
changed the legal position of the Protestants. The laws against them
were still in force; they had nothing but the King’s word promising
protection to trust to. The war with Spain delayed matters, but when
peace was made the time came for Henry to fulfil his pledges to his
former companions. They had been chafing under the delay. At a
General Assembly held at Mantes (October 1593-January 1594), the
members had renewed their oath to live and to die true to their
confession of faith, and year by year a General Assembly met to
discuss their political disabilities as well as to conduct their
ecclesiastical business. They had divided France into nine divisions
under provincial synods, and had the appearance to men of that
century of a kingdom within a kingdom. They demanded equal civic
rights with their Roman Catholic fellow-subjects, and guarantees for
their protection. At length, in 1597, four delegates were appointed
67. with full powers to confer with the King. Out of these negotiations
came the Edict of Nantes, the Charter of French Protestantism.
This celebrated edict was drawn up in ninety-five more general
articles, which were signed on April 13th, and in fifty-six more
particular articles which were signed on May 2nd (1598). Two
Brevets, dated 13th and 30th of April, were added, dealing with the
treatment of Protestant ministers, and with the strongholds given to
the Protestants. The Articles were verified and registered by
Parlements; the Brevets were guaranteed simply by the King’s word.
The Edict of Nantes codified and enlarged the rights given to the
Protestants of France by the Edict of Poitiers (1577), the Convention
of Nérac (1578), the treaty of Fleix (1580), the Declaration of Saint-
Cloud (1589), the Edict of Mantes (1591), the Articles of Mantes
(1593), and the Edict of Saint-Germain (1594).
It secured complete liberty of conscience everywhere within the
realm, to the extent that no one was to be persecuted or molested
in any way because of his religion, nor be compelled to do anything
contrary to its tenets; and this carried with it the right of private or
secret worship. The full and free right of public worship was granted
in all places in which it existed during the years 1596 and 1597, or
where it had been granted by the Edict of Poitiers interpreted by the
Convention of Nérac and the treaty of Fleix (some two hundred
towns); and, in addition, in two places within every bailliage and
sénéchaussée in the realm. It was also permitted in the principal
castles of Protestant seigneurs hauts justiciers (some three
thousand), whether the proprietor was in residence or not, and in
their other castles, the proprietor being in residence; to nobles who
were not hauts justiciers, provided the audience did not consist of
more than thirty persons over and above relations of the family.
Even at the Court the high officers of the Crown, the great nobles,
all governors and lieutenants-general, and captains of the guards,
had the liberty of worship in their apartments provided the doors
were kept shut and there was no loud singing of psalms, noise, or
open scandal.
68. Protestants were granted full civil rights and protection, entry into all
universities, schools, and hospitals, and admission to all public
offices. The Parlement of Paris admitted six Protestant councillors.
And Protestant ministers were granted the exemptions from military
service and such charges as the Romanist clergy enjoyed. Special
Chambers (Chambres d’Édit) were established in the Parlements to
try cases in which Protestants were interested. In the Parlement of
Paris this Chamber consisted of six specially chosen Roman Catholics
and one Protestant; in other Parlements, the Chambers were
composed of equal numbers of Romanists and Protestants (mi-
parties). The Protestants were permitted to hold their ecclesiastical
assemblies—consistories, colloquies, and synods, national and
provincial; they were even allowed to meet to discuss political
questions, provided they first secured the permission of the King.
They remained in complete control of two hundred towns, including
La Rochelle, Montauban, and Montpellier, strongholds of exceptional
strength. They were to retain these places until 1607, but the right
was prolonged for five years more. The State paid the expenses of
the troops which garrisoned these Protestant fortified places; it paid
the governors, who were always Protestants. When it is remembered
that the royal army in time of peace did not exceed ten thousand
men, and that the Huguenots could raise twenty-five thousand
troops, it will be seen that Henry IV. did his utmost to provide
guarantees against a return to a reign of intolerance.
Protected in this way, the Huguenot Church of France speedily took
a foremost place among the Protestant Churches of Europe.
Theological colleges were established at Sedan, Montauban, and
Saumur. Learning and piety flourished, and French theology was
always a counterpoise to the narrow Reformed Scholastic of
Switzerland and of Holland.
69. CHAPTER V.
THE REFORMATION IN THE NETHERLANDS.
[230]
§ 1. The Political Situation.
It was not until 1581 that the United Provinces took rank as a
Protestant nation, notwithstanding the fact that the Netherlands
furnished the first martyrs of the Reformation in the persons of
Henry Voes and John Esch, Augustinian monks, who were burnt at
Antwerp (July 31st, 1523).
“As they were led to the stake they cried with a loud voice that
they were Christians; and when they were fastened to it, and
the fire was kindled, they rehearsed the twelve articles of the
Creed, and after that the hymn Te Deum laudamus, which each
of them sang verse by verse alternately until the flames
deprived them both of voice and life.”[231]
The struggle for religious liberty, combined latterly with one for
national independence from Spain, lasted therefore for almost sixty
years.
When the lifelong duel between Charles the Bold of Burgundy and
Louis XI. of France ended with the death of the former on the
battlefield under the walls of Nancy (January 4th, 1477), Louis was
able to annex to France a large portion of the heterogeneous
possessions of the Dukes of Burgundy, and Mary of Burgundy carried
the remainder as her marriage portion (May 1477) to Maximilian of
Austria, the future Emperor. Speaking roughly, and not quite
accurately, those portions of the Burgundian lands which had been
70. fiefs of France went to Louis, while Mary and Maximilian retained
those which were fiefs of the Empire. The son of Maximilian and
Mary, Philip the Handsome, married Juana (August 1496), the
second daughter and ultimate heiress of Isabella and Ferdinand of
Spain, and their son was Charles V., Emperor of Germany (b.
February 24th, 1500), who inherited the Netherlands from his father
and Spain from his mother, and thus linked the Netherlands to Spain.
Philip died in 1506, leaving Charles, a boy of six years of age, the
ruler of the Netherlands. His paternal aunt, Margaret, the daughter
of the Emperor Maximilian, governed in the Netherlands during his
minority, and, owing to Juana’s illness (an illness ending in
madness), mothered her brother’s children. Margaret’s regency
ended in 1515, and the earlier history of the Reformation in the
Netherlands belongs either to the period of the personal rule of
Charles or to that of the Regents whom he appointed to act for him.
The land, a delta of great rivers liable to overflow their banks, or a
coast-line on which the sea made continual encroachment, produced
a people hardy, strenuous, and independent. Their struggles with
nature had braced their faculties. Municipal life had struck its roots
deeply into the soil of the Netherlands, and its cities could vie with
those of Italy in industry and intelligence. The southern provinces
were the home of the Trouvères.[232] Jan van-Ruysbroec, the most
heart-searching of speculative Mystics, had been a curate of St.
Gudule’s in Brussels. His pupil, Gerard Groot, had founded the lay-
community of the Brethren of the Common Lot for the purpose of
spreading Christian education among the laity; and the schools and
convents of the Brethren had spread through the Netherlands and
central Germany. Thomas à Kempis, the author of the Imitatio
Christi, had lived most of his long life of ninety years in a small
convent at Zwolle, within the territories of Utrecht. Men who have
been called “Reformers before the Reformation,” John Pupper of
Goch and John Wessel, both belonged to the Netherlands. Art
flourished there in the fifteenth century in the persons of Hubert and
Jan van Eyck and of Hans Memling. The Chambers of Oratory
(Rederijkers) to begin with probably unions for the performance of
71. miracle plays or moralities, became confraternities not unlike the
societies of meistersänger in Germany, and gradually acquired the
character of literary associations, which diffused not merely culture,
but also habits of independent thinking among the people.
Intellectual life had become less exuberant in the end of the
fifteenth century; but the Netherlands, nevertheless, produced
Alexander Hegius, the greatest educational reformer of his time, and
Erasmus the prince of the Humanists. Nor can the influence of the
Chambers of Oratory have died out, for they had a great effect on
the Reformation movement.[233]
When Charles assumed the government of the Netherlands, he
found himself at the head of a group of duchies, lordships, counties,
and municipalities which had little appearance of a compact
principality, and he applied himself, like other princes of his time in
the same situation, to give them a unity both political and territorial.
He was so successful that he was able to hand over to his son, Philip
II. of Spain, an almost thoroughly organised State. The divisions
which Charles largely overcame reappeared to some extent in the
revolt against Philip and Romanism, and therefore in a measure
concern the history of the Reformation. How Charles made his
scattered Netherland inheritance territorially compact need not be
told in detail. Friesland was secured (1515); the acquisition of
temporal sovereignty over the ecclesiastical province of Utrecht
(1527) united Holland with Friesland; Gronningen and the lands
ruled by that turbulent city placed themselves under the government
of Charles (1536); and the death of Charles of Egmont (1538),
Count of Gueldres, completed the unification of the northern and
central districts. The vague hold which France kept in some of the
southern portions of the country was gradually loosened. Charles
failed in the south-east. The independent principality of Lorraine lay
between Luxemburg and Franche-Comté, and the Netherland
Government could not seize it by purchase, treaty, or conquest. One
and the same system of law regulated the rights and the duties of
the whole population; and all the provinces were united into one
72. principality by the reorganisation of a States General, which met
almost annually, and which had a real if vaguely defined power to
regulate the taxation of the country.
But although political and geographical difficulties might be more or
less overcome, others remained which were not so easily disposed
of. One set arose from the fact that the seventeen provinces were
divided by race and by language. The Dutchmen in the north were
different in interests and in sentiment from the Flemings in the
centre; and both had little in common with the French-speaking
provinces in the south. The other was due to the differing
boundaries of the ecclesiastical and civil jurisdictions. When Charles
began to rule in 1515, the only territorial see was Arras. Tournai,
Utrecht, and Cambrai became territorial before the abdication of
Charles. But the confusion between civil and ecclesiastical
jurisdiction may be seen at a glance when it is remembered that a
great part of the Frisian lands were subject to the German Sees of
Münster, Minden, Paderborn, and Osnabrück; and that no less than
six bishops, none of them belonging to the Netherlands, divided the
ecclesiastical rule over Luxemburg. Charles’ proposals to establish six
new bishoprics, plans invariably thwarted by the Roman Curia, were
meant to give the Low Countries a national episcopate.
§ 2. The Beginnings of the Reformation.
The people of the Netherlands had been singularly prepared for the
great religious revival of the sixteenth century by the work of the
Brethren of the Common Lot and their schools. It was the aim of
Gerard Groot, their founder, and also of Florentius Radevynszoon, his
great educational assistant, to see “that the root of study and the
mirror of life must, in the first place, be the Gospel of Christ.” Their
pupils were taught to read the Bible in Latin, and the Brethren
contended publicly for translations of the Scriptures in the vulgar
tongues. There is evidence to show that the Vulgate was well known
in the Netherlands in the end of the fifteenth century, and a
translation of the Bible into Dutch was published at Delft in
73. 1477[234]. Small tracts against Indulgences, founded probably on
the reasonings of Pupper and Wessel, had been in circulation before
Luther had nailed his Theses to the door of All Saints’ church in
Wittenberg. Hendrik of Zutphen, Prior of the Augustinian Eremite
convent at Antwerp, had been a pupil of Staupitz, a fellow student
with Luther, and had spread Evangelical teaching not only among his
order, but throughout the town.[235] It need be no matter for
surprise, then, that Luther’s writings were widely circulated in the
Netherlands, and that between 1513 and 1531 no fewer than
twenty-five translations of the Bible or of the New Testament had
appeared in Dutch, Flemish, and French.
When Aleander was in the Netherlands, before attending the Diet of
Worms he secured the burning of eighty Lutheran and other books
at Louvain;[236] and when he came back ten months later, he had
regular literary auto-da-fés. On Charles’ return from the Diet of
Worms, he issued a proclamation to all his subjects in the
Netherlands against Luther, his books and his followers, and
Aleander made full use of the powers it gave. Four hundred
Lutheran books were burnt at Antwerp, three hundred of them
seized by the police in the stalls of the booksellers, and one hundred
handed over by the owners; three hundred were burnt at Ghent,
“part of them printed here and part in Germany,” says the Legate;
and he adds that “many of them were very well bound, and one
gorgeously in velvet.” About a month later he is forced to confess
that these burnings had not made as much impression as he had
hoped, and that he wishes the Emperor would “burn alive half a
dozen Lutherans and confiscate their property.” Such a proceeding
would make all see him to be the really Christian prince that he is.
[237]
Next year (1522) Charles established the Inquisition within the
seventeen provinces. It was a distinctively civil institution, and this
was perhaps due to the fact that there was little correspondence
between the civil and ecclesiastical jurisdictions in the Netherlands;
but it must not be forgotten that the Kings of Spain had used the
74. Holy Office for the purpose of stamping out political and local
opposition, and also that the civil courts were usually more energetic
and more severe than the ecclesiastical. The man appointed was
unworthy of any place of important trust. Francis van de Hulst,
although he had been the Prince’s counsellor in Brabant, was a man
accused both of bigamy and murder, and was hopelessly devoid of
tact. He quarrelled violently with the High Court of Holland; and the
Regent, Margaret of Austria, who had resumed her functions, found
herself constantly compromised by his continual defiance of local
privileges. He was a “wonderful enemy to learning,” says Erasmus.
His colleague, Nicolas van Egmont, a Carmelite monk, is described
by the same scholar as “a madman with a sword put into his hand
who hates me worse than he does Luther.” The two men discredited
the Inquisition from its beginning. Erasmus affected to believe that
the Emperor could not know what they were doing.
The first victim was Cornelius Graphæus, town clerk of Antwerp, a
poet and Humanist, a friend of Erasmus; and his offence was that he
had published an edition of John Pupper of Goch’s book, entitled the
Liberty of the Christian Religion, with a preface of his own. The
unfortunate man was set on a scaffold in Brussels, compelled to
retract certain propositions which were said to be contained in the
preface, and obliged to throw the preface itself into a fire kindled on
the scaffold for the purpose. He was dismissed from his office,
declared incapable of receiving any other employment, compelled to
repeat his recantation at Antwerp, imprisoned for two years, and
finally banished.[238]
The earliest deaths were those of Henry Voes and John Esch, who
have already been mentioned. Their Prior, Hendrik of Zutphen,
escaped from the dungeon in which he had been confined. Luther
commemorated them in a long hymn, entitled A New Song of the
two Martyrs of Christ burnt at Brussels by the Sophists of Louvain:
“Der erst recht wol Johannes heyst,
So reych an Gottes hulden
Seyn Bruder Henrch nach dem geyst,
75. Eyn rechter Christ on schulden:
Vonn dysser welt gescheyden synd,
Sye hand die kron erworben,
Recht wie die frumen gottes kind
Fur seyn wort synd gestorben,
Sein Marter synd sye worden.”[239]
Charles issued proclamation after proclamation, each of increasing
severity. It was forbidden to print any books unless they had been
first examined and approved by the censors (April 1st, 1524). “All
open and secret meetings in order to read and preach the Gospel,
the Epistles of St. Paul, and other spiritual writings,” were forbidden
(Sept. 25th, 1525), as also to discuss the Holy Faith, the
Sacraments, the Power of the Pope and Councils, “in private houses
and at meals.” This was repeated on March 14th, 1526, and on July
17th there was issued a long edict, said to have been carefully
drafted by the Emperor himself, forbidding all meetings to read or
preach about the Gospel or other holy writings in Latin, Flemish, or
Walloon. In the preamble it is said that ignorant persons have begun
to expound Scripture, that even regular and secular clergy have
presumed to teach the “errors and sinister doctrines of Luther and
his adherents,” and that heresies are increasing in the land. Then
followed edicts against unlicensed books, and against monks who
had left their cloisters (Jan. 28th, 1528); against the possession of
Lutheran books, commanding them upon pain of death to be
delivered up (Oct. 14th, 1529); against printing unlicensed books—
the penalties being a public whipping on the scaffold, branding with
a red-iron, or the loss of an eye or a hand, at the discretion of the
judge (Dec. 7th, 1530); against heretics “who are more numerous
than ever,” against certain books of which a long list is given, and
against certain hymns which increase the zeal of the heretics (Sept.
22nd, 1540); against printing and distributing unlicensed books in
the Italian, Spanish, or English languages (Dec. 18th, 1544);
warning all schoolmasters about the use of unlicensed books in their
schools, and giving a list of those only which are permitted (July
31st, 1546). The edict of 1546 was followed by a long list of
76. prohibited books, among which are eleven editions of the Vulgate
printed by Protestant firms, six editions of the Bible and three of the
New Testament in Dutch, two editions of the Bible in French, and
many others. Lastly, an edict of April 29th, 1550, confirmed all the
previous edicts against heresy and its spread, and intimated that the
Inquisitors would proceed against heretics “notwithstanding any
privileges to the contrary, which are abrogated and annulled by this
edict.” This was a clear threat that the terrible Spanish Inquisition
was to be established in the Netherlands, and provoked such
remonstrances that the edict was modified twice (Sept. 25th, Nov.
5th) before it was finally accepted as legal within the seventeen
provinces.
All these edicts were directed against the Lutheran or kindred
teaching. They had nothing to do with the Anabaptist movement,
which called forth a special and different set of edicts. It seems
against all evidence to say that the persecution of the Lutherans had
almost ceased during the last years of Charles’ rule in the
Netherlands, and Philip II. could declare with almost perfect truth
that his edicts were only his father’s re-issued.
The continuous repetition and increasing severity of the edicts
revealed not merely that persecution did not hinder the spread of
the Reformed faith, but that the edicts themselves were found
difficult to enforce. What Charles would have done had he been able
to govern the country himself it is impossible to say. He became
harder and more intolerant of differences in matters of doctrine as
years went on, and in his latest days is said to have regretted that
he had allowed Luther to leave Worms alive; and he might have
dealt with the Protestants of the seventeen provinces as his son
afterwards did. His aunt, Margaret of Austria, who was Regent till
1530, had no desire to drive matters to an extremity; and his sister
Mary, who ruled from 1530 till the abdication of Charles in 1555, was
suspected in early life of being a Lutheran herself. She never openly
joined the Lutheran Church as did her sister the Queen of Denmark,
but she confessed her sympathies to Charles, and gave them as a
reason for reluctance to undertake the regency of the Netherlands.
77. It may therefore be presumed that the severe edicts were not
enforced with undue stringency by either Margaret of Austria or by
the widowed Queen of Hungary. There is also evidence to show that
these proclamations denouncing and menacing the unfortunate
Protestants of the Netherlands were not looked on with much favour
by large sections of the population. Officials were dilatory,
magistrates were known to have warned suspected persons to
escape before the police came to arrest them; even to have given
them facilities for escape after sentence had been delivered. Passive
resistance on the part of the inferior authorities frequently
interposed itself between the Emperor and the execution of his
bloodthirsty proclamations. Yet the number of Protestant martyrs
was large, and women as well as men suffered torture and death
rather than deny their faith.
The edicts against conventicles deterred neither preachers nor
audience. The earliest missioners were priests and monks who had
become convinced of the errors of Romanism. Later, preachers were
trained in the south German cities and in Geneva, that nursery of
daring agents of the Reformed propaganda. But if trained teachers
were lacking, members of the congregation took their place at the
peril of their lives. Brandt relates how numbers of people were
accustomed to meet for service in a shipwright’s yard at Antwerp to
hear a monk who had been “proclaimed”:
“The teacher, by some chance or other, could not appear, and one of
the company named Nicolas, a person well versed in Scripture,
thought it a shame that such a congregation, hungering after the
food of the Word, should depart without a little spiritual
nourishment; wherefore, climbing the mast of a ship, he taught the
people according to his capacity; and on that account, and for the
sake of the reward that was set upon the preacher, he was seized by
two butchers and delivered to the magistrates, who caused him to
be put into a sack and thrown into the river, where he was
drowned.”[240]
78. § 3. The Anabaptists.
The severest persecutions, however, before the rule of Philip II.,
were reserved for those people who are called the Anabaptists.[241]
We find several edicts directed against them solely. In February 1532
it was forbidden to harbour Anabaptists, and a price of 12 guilders
was offered to informants. Later in the same year an edict was
published which declared “that all who had been rebaptized, were
sorry for their fault, and, in token of their repentance, had gone to
confession, would be admitted to mercy for that time only, provided
they brought a certificate from their confessor within twenty-four
days of the date of the edict; those who continued obdurate were to
be treated with the utmost rigour of the laws” (Feb. 1533).
Anabaptists who had abjured were ordered to remain near their
dwelling-places for the space of a year, “unless those who were
engaged in the herring fishery” (June 1534). In 1535 the severest
edict against the sect was published. All who had “seduced or
perverted any to this sect, or had rebaptized them,” were to suffer
death by fire; all who had suffered themselves to be rebaptized, or
who had harboured Anabaptists, and who recanted, were to be
favoured by being put to death by the sword; women were “only to
be buried alive.”[242]
To understand sympathetically that multiform movement which was
called in the sixteenth century Anabaptism, it is necessary to
remember that it was not created by the Reformation, although it
certainly received an impetus from the inspiration of the age. Its
roots can be traced back for some centuries, and its pedigree has at
least two stems which are essentially distinct, and were only
occasionally combined. The one stem is the successions of the
Brethren, a mediæval, anti-clerical body of Christians whose history
is written only in the records of Inquisitors of the mediæval Church,
where they appear under a variety of names, but are universally said
to prize the Scriptures and to accept the Apostles’ Creed.[243] The
other existed in the continuous uprisings of the poor—peasants in
79. Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com