Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Python AI Programming: Navigating

fundamentals of ML, deep learning,


NLP, and reinforcement learning in
practice Patrick J
Visit to download the full and correct content document:
https://ebookmeta.com/product/python-ai-programming-navigating-fundamentals-of-m
l-deep-learning-nlp-and-reinforcement-learning-in-practice-patrick-j/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Deep Reinforcement Learning Aske Plaat

https://ebookmeta.com/product/deep-reinforcement-learning-aske-
plaat/

Cambridge IGCSE and O Level History Workbook 2C - Depth


Study: the United States, 1919-41 2nd Edition Benjamin
Harrison

https://ebookmeta.com/product/cambridge-igcse-and-o-level-
history-workbook-2c-depth-study-the-united-states-1919-41-2nd-
edition-benjamin-harrison/

Foundations of Deep Reinforcement Learning Theory and


Practice in Python Addison Wesley Data Analytics Series
1st Edition Laura Graesser Wah Loon Keng

https://ebookmeta.com/product/foundations-of-deep-reinforcement-
learning-theory-and-practice-in-python-addison-wesley-data-
analytics-series-1st-edition-laura-graesser-wah-loon-keng/

The Art of Reinforcement Learning: Fundamentals,


Mathematics, and Implementations with Python 1st
Edition Michael Hu

https://ebookmeta.com/product/the-art-of-reinforcement-learning-
fundamentals-mathematics-and-implementations-with-python-1st-
edition-michael-hu-2/
The Art of Reinforcement Learning: Fundamentals,
Mathematics, and Implementations with Python 1st
Edition Michael Hu

https://ebookmeta.com/product/the-art-of-reinforcement-learning-
fundamentals-mathematics-and-implementations-with-python-1st-
edition-michael-hu/

Learning Deep Learning Theory and Practice of Neural


Networks Computer Vision NLP and Transformers using
TensorFlow 1st Edition Ekman Magnus

https://ebookmeta.com/product/learning-deep-learning-theory-and-
practice-of-neural-networks-computer-vision-nlp-and-transformers-
using-tensorflow-1st-edition-ekman-magnus/

Deep Reinforcement Learning with Python: With PyTorch,


TensorFlow and OpenAI Gym 1st Edition Nimish Sanghi

https://ebookmeta.com/product/deep-reinforcement-learning-with-
python-with-pytorch-tensorflow-and-openai-gym-1st-edition-nimish-
sanghi-3/

Deep Reinforcement Learning with Python With PyTorch


TensorFlow and OpenAI Gym 1st Edition Nimish Sanghi

https://ebookmeta.com/product/deep-reinforcement-learning-with-
python-with-pytorch-tensorflow-and-openai-gym-1st-edition-nimish-
sanghi/

Deep Reinforcement Learning with Python With PyTorch


TensorFlow and OpenAI Gym 1st Edition Nimish Sanghi

https://ebookmeta.com/product/deep-reinforcement-learning-with-
python-with-pytorch-tensorflow-and-openai-gym-1st-edition-nimish-
sanghi-2/
Prologue
Welcome to "Python AI Programming," an opening into the
transformational world of Artificial Intelligence as seen through the
prism of Python, the language that has come to be synonymous with
modern AI development. This book was written with the goal of
taking you, the aspiring AI developer, on an illuminating trip through
the fundamental aspects of AI, all articulated in the versatile and
intuitive language of Python.
Our adventure starts with a detailed overview of Python's principles,
revealing how this language is the ideal toolkit for aspiring AI
practitioners. As we progress, the domains of Machine Learning and
Deep Learning unveil themselves, illustrating how Python's libraries
and frameworks are crucial in pioneering advances in these fields.
Each chapter advances your AI learning curve, from the
fundamentals of data management to the complexity of neural
networks.
When you dive into the complexities of Natural Language Processing
(NLP), you'll discover Python's strength in parsing human language,
a talent that's critical in today's data-driven world. The story then
takes you through the intriguing worlds of Computer Vision and
Reinforcement Learning, where Python's skills shine in training
machines to visually understand the world and make intelligent
decisions.
However, as we welcome these technical marvels, we must be
mindful of AI ethics. This book teaches you to think ethically as well
as code, ensuring that the AI you design is responsible and useful to
all.
Remember that this book is more than simply a technical book as
you turn each page; it is a companion on your journey to becoming
an AI developer. It's about understanding the 'why' as much as the
'how,' about seeing a future in which technology boosts human
capacities, fueled by your newfound skills and insights.
PYTHON AI
PROGRAMMING
Navigating fundamentals of ML, deep
learning, NLP, and reinforcement
learning in practice

Patrick J
Copyright © 2024 by GitforGits
All rights reserved. This book is protected under copyright laws and
no part of it may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying, recording,
or by any information storage and retrieval system, without the prior
written permission of the publisher. Any unauthorized reproduction,
distribution, or transmission of this work may result in civil and
criminal penalties and will be dealt with in the respective jurisdiction
at anywhere in India, in accordance with the applicable copyright
laws.
Published by: GitforGits
Publisher: Sonal Dhandre
www.gitforgits.com
support@gitforgits.com
Printed in India
First Printing: January 2024
ISBN: 978-8119177639
Cover Design by: Kitten Publishing
For permission to use material from this book, please contact
GitforGits at support@gitforgits.com.
Content
Preface
Chapter 1: Introduction to Artificial Intelligence
Historical Perspective of AI
Transition to AI Era
AI in Modern World
AI in Daily Life
AI in Business Operations
AI for Decision Making
AI in Innovation and Product Development
AI and Data Analytics
AI in Automation and Efficiency
AI in Healthcare
Key Concepts in Artificial Intelligence
Understanding Machine Learning
Deep Learning
Applications of Deep Learning
Python for AI
NumPy and Pandas for Data Handling
Matplotlib and Seaborn for Data Visualization
Scikit-Learn for Machine Learning
TensorFlow and PyTorch for Deep Learning
Keras for Neural Networks
Setting up Python and AI Environment
Installing and Configuring Python on Windows
Installing TensorFlow and Keras
Coffee Preference Prediction App Overview
App Functionalities
Dataset for Coffee Model
Generating Dataset
Understanding AI Project Lifecycle
Idea and Conceptualization
Data Collection and Preparation
Choosing Right Tools and Technologies
Designing the AI Model
Training the AI Model
Model Optimization and Tuning
Integration and Deployment
Testing and Quality Assurance
Ethical Considerations and Compliance
Summary
Chapter 2: Python for AI
Python Basics
Python Data Structures
Functions for Modularity
Loops
Conditional Statements
Error Handling
File Handling
Data Analysis Overview
Pandas at a Glance
Data Analysis with Pandas
Introduction to NumPy
Numerical Computations with NumPy
Sample Program: Using Numpy and Pandas
Data Visualization Overview
Introduction to Matplotlib
Introduction to Seaborn
Setting Up Matplotlib and Seaborn
Basic Line Plot using Matplotlib
Creating a Heatmap using Seaborn
Bar Plot using Seaborn
Pair Plot using Seaborn
Error Handling in Python
Common Errors
Best Practices
Summary
Chapter 3: Data as Fuel for AI
Role of Data
Quality and Diversity of Data
Data in AI Applications
Future Landscape of Data
Data Collection for AI
Traditional Data Collection Methods
Digital Data Collection Methods
Advanced Data Collection Techniques
Automated Data Collection
Implementing Automated Data Collection
Understanding Data Cleaning
Steps in Data Cleaning
Handling Missing Values
Correcting Inconsistencies
Removing Duplicates
Dealing with Outliers
Error Correction
Data Transformation
Preprocessing Methods
Purpose of Data Preprocessing
Methods of Data Preprocessing
Data Preprocessing on Coffee App Data
Exploratory Data Analysis
Importance of EDA
Performing EDA
Data Transformation
Data Transformation Techniques
Feature Engineering
Importance of Feature Engineering
Techniques in Feature Engineering
Summary
Chapter 4: Machine Learning Foundations
Machine Learning Overview
Machine Learning's Contribution to AI
The Impact of Machine Learning
Supervised Learning Process
Exploring Unsupervised Learning
Understanding Unsupervised Learning
Unsupervised Learning Process
Unsupervised Learning in Practice
ML Algorithms Overview
Decision Trees
K-Means Clustering
Sample Program: Applying K-Means Clustering
Decision Trees vs. K-Means Clustering
Model Training
Understanding Model Training
Training K-Means Model on Coffee Data
Sample Program: Visualize Training of K-Means
Overfitting and Underfitting
Understanding Overfitting
Understanding Underfitting
Significance of Overfitting and Underfitting
Cross-Validation Technique
Understanding Cross-Validation
Types of Cross-Validation
Practical Application on K-Means Model
Hyperparameter Tuning
Overview
Hyperparameters in K-Means Clustering
Applying Hyperparameters
Summary
Chapter 5: Essentials of Deep Learning
Overview
Neural Networks
What Are Neural Networks?
How Do Neural Networks Work?
Types of Neural Networks
Building Neurons and Layers
Understanding Layers and Neurons in Neural Networks
Sample Program: Building Neural Network
Neural Network Components
Activation Functions
Loss Functions
Optimizers
Coding Activation Functions, Loss Function, and Optimizer
Exploring CNNs
Understanding Convolutional Neural Networks (CNNs)
Designing a CNN
Explore RNNs
Understanding Recurrent Neural Networks (RNNs)
Designing an RNN
Train Neural Nets (NNs)
Training Deep Learning Model
Coffee Cup Image Classification using CNN
Training Word Prediction using RNN
Fine-tuning Models
Number of Hidden Layers
Number of Neurons per Hidden Layer
Learning Rate
Batch Size
Sample Program: Fine Tuning CNN Model
Summary
Chapter 6: NLP and Computer Vision
Natural Language Processing Overview
NLP Dataset
Defining the NLP Dataset
Generating Dataset
Text Preprocessing
Tokenization
Lowercasing
Removing Punctuation and Special Characters
Removing Stop Words
Stemming and Lemmatization
Performing Preprocessing on the Dataset
Tokenization
Understanding Tokenization
Process of Tokenization
Tokenizing Dataset
Vectorization Approach
One-Hot Encoding
Bag of Words (BoW)
Bag of N-Grams
Term Frequency-Inverse Document Frequency (TF-IDF)
Sample Program: Applying BoW and TF-IDF
Word Embeddings
Understanding Word Embeddings
Popular Word Embedding Models
Sample Program: Applying Word Embeddings
Visualize Word Embeddings
Introduction to Computer Vision
Brief Understanding
Applications of Computer Vision
Computer Vision Model
Image Processing
Overview
Image Processing Procedure
Sample Program: Using OpenCV
Using CNN for Image Processing
Summary
Chapter 7: Hands-on Reinforcement Learning
Introduction
Sequential Decision Making
Key Components of Sequential Decision Making
Action Values and Estimation Algorithm
Action Values
Estimation Algorithms for Action Values
Q-Learning
Markov Decision Process (MDP)
Translating a Problem into MDP
Sample Program: Creating an MDP
Rewards and Tasks
Overview
Michael Littman's Hypothesis on Reward
Continuing Tasks
Episodic Tasks
Reinforcement Learning Policies
Concept of Policy
Specifying Policies
Values and Bellman Equation
What are Value Functions?
The Bellman Equation
Dynamic Programming (DP)
What is DP?
Dynamic Programming Algorithms
Sample Program: Policy Evaluation
Constructing Algorithm
Value Iteration Algorithm Overview
Sample Program: Implement Value Iteration
Summary
Chapter 8: Ethics to AI
Ethics in Technology
AI Ethical Framework (EAAI)
Bias
Fairness
Transparency
Responsibility
Interpretability
Responsible AI
Pillars of Responsible AI
Impact of Responsible AI
Trustworthy AI
Understanding Concept
Trustworthy AI vs. Responsible AI
Enabling Trustworthy AI
Impact/Value for Businesses
Summary
Index

Preface
This book aspires young graduates and programmers to become AI
engineers and enter the world of artificial intelligence by combining
powerful Python programming with artificial intelligence. Beginning
with the fundamentals of Python programming, the book gradually
progresses to machine learning, where readers learn to implement
Python in developing predictive models. The book provides a clear
and accessible explanation of machine learning, incorporating
practical examples and exercises that strengthen understanding.
We go deep into deep learning, another vital component of AI.
Readers gain a thorough understanding of how Python's frameworks
and libraries can be used to create sophisticated neural networks
and algorithms, which are required for tasks such as image and
speech recognition. Natural Language Processing is also covered in
the book, with fundamental concepts and techniques for interpreting
and generating human-like language covered. The book's focus on
computer vision and reinforcement learning is distinctive, presenting
these cutting-edge AI fields in an approachable manner.
Readers will learn how to use Python's intuitive programming
paradigm to create systems that interpret visual data and make
intelligent decisions based on environmental interactions. The book
focuses on ethical AI development and responsible programming,
emphasizing the importance of developing AI that is fair,
transparent, and accountable.
In this book you will learn how to:
Explore Python basics and AI integration for real-world
application and career advancement.
Experience the power of Python in AI with practical
machine learning techniques.
Practice Python's deep learning tools for innovative AI
solution development.
Dive into NLP with Python to revolutionize data
interpretation and communication strategies.
Simple yet practical understanding of reinforcement
learning for strategic AI decision-making.
Uncover ethical AI development and frameworks, and
concepts of responsible and trustworthy AI.
Harness Python's capabilities for creating AI applications
with a focus on fairness and bias.

Each chapter is designed to improve learning by including practical


examples, case studies, and exercises that provide hands-on
experience. This book is an excellent starting point for anyone
interested in becoming an AI engineer, providing the necessary
foundational knowledge and skills to delve into the fascinating world
of artificial intelligence.
GitforGits
Prerequisites
Knowing simple python scripting and basics of data science is
sufficient to enter the world of artificial intelligence. This book will
aspire to make you an eligible professional to enter the world of AI
Engineers and Data Scientist.

Codes Usage
Are you in need of some helpful code examples to assist you in your
programming and documentation? Look no further! Our book offers
a wealth of supplemental material, including code examples and
exercises.

Not only is this book here to aid you in getting your job done, but
you have our permission to use the example code in your programs
and documentation. However, please note that if you are
reproducing a significant portion of the code, we do require you to
contact us for permission.

But don't worry, using several chunks of code from this book in your
program or answering a question by citing our book and quoting
example code does not require permission. But if you do choose to
give credit, an attribution typically includes the title, author,
publisher, and ISBN. For example, "Python AI Programming by
Patrick J".

If you are unsure whether your intended use of the code examples
falls under fair use or the permissions outlined above, please do not
hesitate to reach out to us at support@gitforgits.com .

We are happy to assist and clarify any concerns.


CHAPTER 1:
INTRODUCTION TO
ARTIFICIAL INTELLIGENCE
Historical Perspective of AI
Remember the old days when we didn't have smartphones
constantly in our hands? That is a bit what it was like before AI. We
had computers, but they were more like calculators on steroids.
They could crunch numbers, follow instructions, but that is about it.
No learning, no adapting – pretty basic, right? Think about those
massive computers in the '60s and '70s – room-sized giants with less
power than your smartphone. They did specific tasks, and to make
them do something, you had to feed them a precise set of
instructions. There was no "Hey Computer, learn this," it was all
about programming every single detail.
Imagine writing a recipe for someone who doesn't know anything
about cooking. You'd have to explain every step, right? That is how
software was before AI. It couldn't think for itself. Programmers had
to spell out everything. If there was a task you didn't foresee, well,
the software wouldn't know what to do. We've had data for ages,
way before AI. But back then, it was like having a goldmine and not
knowing how to mine gold. We stored data in huge databases,
mostly using it for record-keeping. It was like having a library of
books but never reading them. We didn't have the tools to dig
deeper and really understand what all that data could tell us.
We will discuss and understand about work life pre-AI. It was a lot
more manual, even with computers. For example, think about a
bank in the '80s. They had computers, but a lot of the work, like
customer service or data analysis, was done by people, tediously
sifting through information. There was a lot of potential for human
error, and things took longer.
And then, there is the internet, or rather, the lack of it. The early
internet was like a small town – everyone knew each other, and
there wasn’t much happening. We didn't have the vast ocean of
online data and connectivity we have now. It's hard to imagine,
right?
Lastly, think about AI back then. It was more a subject of sci-fi
novels and movies than real life. People dreamt of intelligent
machines, but it was just that – a dream. The technology, the data
processing capabilities, they just weren't there yet.
It's wild to think about how different things were, isn't it? Just like
looking back at how we lived without smartphones or streaming
services. But, this background sets the perfect stage for the entry of
AI – a game changer that took all these limitations and turned them
on their head. It opened up a world of possibilities that we're still
exploring today.
Transition to AI Era
So, we're looking at this fascinating shift from a world without AI to
one where it's starting to take root. Imagine this period as the dawn
of a new age. You know, like when people first saw airplanes and
thought, “Wow, we can actually fly!” That is the kind of awe and
wonder the early stages of AI brought along.
Before AI became a household name, technology and computing
were progressing, but there was a missing piece – the ability for
machines to learn and think, at least in a very basic sense.
Computers were great at following orders, but they couldn't adapt or
learn from their experiences. They were extremely efficient but very
limited assistants. Then, slowly, things began to change. We started
seeing computers not just as tools for specific tasks but as potential
'learners'. The idea was brewing that maybe, just maybe, we could
teach computers to learn from data, to recognize patterns, and
maybe even make decisions based on that learning. It was a big
'what if' that started turning the wheels of innovation.
This change didn’t happen overnight. It was a gradual process,
fueled by advancements in both hardware and software. On the
hardware front, computers were becoming more powerful and
affordable. They were no longer these room-sized behemoths but
were getting smaller, faster, and more accessible. This meant more
people could experiment, innovate, and push the boundaries of what
was possible.
On the software side, we started developing more sophisticated
algorithms. These weren't your standard, run-of-the-mill instructions
but complex sets of rules that could take in data, process it, and
learn from it. The early versions of these learning algorithms were
pretty basic by today's standards, but back then, they were
revolutionary. And, crucially, we had more data than ever before.
The rise of the internet and digitization meant that data was being
generated at an unprecedented scale. This was the fuel that AI
needed – vast amounts of data to learn from.
So, picture this as the stage being set for AI’s grand entrance. The
tech was evolving, the algorithms were getting smarter, and the
world was producing data in massive quantities. It was only a matter
of time before all these elements came together, sparking the AI
revolution we're part of today. It's quite a journey, isn't it? From
basic computing to the cusp of AI – it sets the stage for some
exciting developments. In our next section, we can explore how
these elements converged to give birth to modern AI. What do you
think about this transition period? It's like watching the pieces of a
puzzle coming together, leading us to where we are now.
AI in Modern World
AI in Daily Life
Imagine waking up in the morning to your smart alarm, which
analyzes your sleep patterns and wakes you up at the optimal time.
You grab your phone, and there is your AI-powered news app,
curating a news feed based on your interests. Even the mundane
task of driving to work is transformed by AI with traffic predictions
and route optimizations from your navigation app. And we will not
forget about personal assistants like Siri or Alexa, which have
become household names, helping us with everything from setting
reminders to controlling smart home devices.
This is just the tip of the iceberg. Healthcare is seeing revolutionary
changes with AI-driven diagnostics and personalized treatment
plans. Retail experiences are more customized than ever, thanks to
AI analyzing shopping habits. Even in education, AI provides
personalized learning experiences, adapting to each student's unique
learning curve.

AI in Business Operations
Consider switching gears to the business world. Companies of all
sizes are harnessing AI for a competitive edge. One of the most
significant impacts is on customer service. Chatbots and virtual
assistants, powered by AI, are handling customer inquiries 24/7,
providing instant, personalized responses. This not only improves
customer experience but also reduces operational costs.
In marketing, AI is a game-changer. It's analyzing consumer
behavior, market trends, and social media to tailor marketing
strategies. This level of analysis was unthinkable a decade ago. AI is
also revolutionizing supply chain management by predicting demand,
optimizing inventory, and reducing delivery times.
Then there is the financial sector. AI-driven algorithms are used for
everything from fraud detection to personalized financial advice. The
precision and efficiency AI brings to these areas significantly
enhance both security and customer experience.

AI for Decision Making


One of the most exciting aspects of AI is its role in decision-making.
Gone are the days of solely relying on human intuition for business
decisions. AI algorithms analyze vast amounts of data, uncovering
insights and patterns that humans might overlook. This data-driven
approach leads to more informed, strategic decisions.
The impact of AI in decision-making is particularly evident in sectors
like manufacturing and healthcare, where precision and efficiency
are paramount. In manufacturing, the application of AI for predictive
maintenance is a game-changer. These sophisticated AI systems can
predict potential machinery malfunctions before they happen. This
foresight allows for timely maintenance, significantly reducing
unexpected downtime and associated costs. It's a proactive
approach, transforming maintenance from a reactive task to a
strategic function that enhances productivity and longevity of
equipment.
In healthcare, AI's role is nothing short of transformative. Healthcare
professionals are now supported by AI systems that provide
comprehensive analyses of patient data. These systems are
designed to process vast amounts of patient information, from
medical history to current symptoms, and suggest treatment plans.
This is especially crucial in scenarios where time is of the essence,
and the margin for error is minimal. AI assists in making critical life-
saving decisions, offering recommendations that are data-driven and
thus, potentially more accurate and effective.
AI in Innovation and Product
Development
Product development has been transformed by AI. Companies are
using AI to analyze market trends and consumer feedback, guiding
them in developing products that meet precise market needs. AI
even plays a role in the design process, with algorithms suggesting
design modifications and improvements.
In software development, AI's role is increasingly pivotal. Quality
assurance and testing, traditionally time-consuming phases in
software development, are being revolutionized by AI. AI algorithms
can swiftly identify potential issues, bugs, and areas for
improvement in software, doing so with a precision and speed
unattainable by manual testing. This capability significantly shortens
the development cycle, enabling faster rollouts of more polished,
user-friendly software products. It also allows human developers to
focus on more complex, creative tasks, pushing the boundaries of
what's possible in software development.

AI and Data Analytics


The heart of AI's impact lies in data analytics. With the exponential
growth of data, AI is the key to unlocking its potential. Businesses
use AI to analyze customer data, gaining insights into preferences
and behaviors. This data is then used to personalize products and
services, enhancing customer satisfaction.
In sports, AI offers coaches and athletes insights that are pivotal for
optimizing training regimens and developing game strategies. By
examining vast amounts of data on player performance, including
physical fitness, skill levels, and in-game tactics, AI algorithms can
identify areas for improvement and strengths to capitalize on. This
personalized approach ensures that athletes are trained more
effectively, leading to enhanced performance and better outcomes in
competitions.
In agriculture, farmers are utilizing AI to make informed decisions
about crop management, significantly improving agricultural
productivity. AI systems can predict the most favorable planting
times, considering factors like weather patterns, soil conditions, and
historical crop performance. This precision farming approach helps in
maximizing yield and reducing waste. Furthermore, AI is
instrumental in monitoring soil health, using sensors and data
analytics to provide real-time information on soil moisture, nutrient
levels, and other critical factors. This information enables farmers to
adjust their cultivation practices proactively, ensuring optimal growth
conditions for their crops.

AI in Automation and Efficiency


AI's proficiency in handling routine and repetitive tasks has been a
significant boon, marking a new era of efficiency and productivity.
This automation frees human resources from mundane tasks,
allowing them to focus on more creative, strategic, and complex
activities. The value of AI in business automation is not confined to
simple tasks; its impact is profound in automating intricate processes
across various domains.
In fields like law and finance, AI is transforming operations by
automating complex tasks such as document analysis and data
processing. These sectors deal with vast amounts of data, where
precision and speed are crucial. AI algorithms can sift through
documents, extract relevant information, and analyze data with a
level of speed and accuracy that is simply unattainable by humans.
This capability not only accelerates the workflow but also minimizes
errors, leading to more reliable and efficient outcomes. It allows
professionals in these fields to focus on more nuanced aspects of
their work, like strategy and client relations, while AI handles the
data-intensive tasks.
The manufacturing sector is witnessing a similar revolution with the
integration of AI. AI-powered robots are increasingly being employed
in factories, working alongside human workers. This collaboration
has enhanced efficiency and safety in manufacturing processes. AI
robots can perform high-precision tasks, handle hazardous materials,
and operate in environments that are unsafe for humans. This not
only boosts productivity but also significantly reduces the risk of
accidents and injuries. The human workers, in turn, can focus on
supervisory roles, quality control, and other critical aspects that
require human judgment and creativity.

AI in Healthcare
Healthcare deserves special mention. AI is revolutionizing this field in
profound ways. From early diagnostics of diseases like cancer to
robotic surgeries, AI is enhancing the quality and accessibility of
healthcare. It's also personalizing patient care, with AI algorithms
suggesting customized treatment plans based on individual patient
data.
While the benefits of AI are immense, it's important to consider the
ethical implications. Issues like data privacy, bias in AI algorithms,
and the impact on employment are areas of active discussion and
regulation. Ensuring that AI is used responsibly and ethically is
crucial.
As we look to the future, the possibilities of AI are boundless. We're
talking about AI collaborating with humans in creative fields like art
and music, AI in environmental conservation, and even in space
exploration. The convergence of AI with other emerging
technologies like quantum computing and the Internet of Things
(IoT) is set to create innovations we can't even imagine yet.
Key Concepts in Artificial
Intelligence
Understanding Machine Learning
Machine Learning is the cornerstone of modern AI, fundamentally
altering how we build software. In traditional programming, we code
explicit rules. With ML, we feed data into algorithms, and they learn
from this data. Think of it as teaching a child through examples. We
show the child several pictures of cats and dogs, and over time, they
learn to distinguish between the two. Similarly, we feed an ML
algorithm lots of data (like pictures of cats and dogs), and it learns
to recognize patterns in this data.
ML breaks down into three main types:

Supervised Learning
Supervised Learning is akin to a guided learning process. In this
approach, the algorithm is trained on a labeled dataset. This dataset
contains input-output pairs, where the desired output (label) is
known. The algorithm's job is to learn a mapping between the inputs
and outputs. Think of it like teaching a child with flashcards. Each
card has a picture (input) and a name (output). Over time, the child
learns to associate pictures with names. Similarly, a supervised
learning algorithm learns to predict the output from new inputs.
Supervised learning excels in classification (categorizing data into
classes) and regression (predicting continuous values) tasks. It's
used in facial recognition systems (classifying faces), in predicting
housing prices (regression), and even in medical diagnoses where
symptoms are inputs and diseases are outputs.

Unsupervised Learning
Unsupervised Learning involves training the algorithm on data
without any labels. The goal is to discover hidden patterns or
structures within the data. It's like giving someone a mixed jigsaw
puzzle and asking them to find patterns or groupings. The algorithm
might identify clusters of similar data points (cluster analysis) or find
the underlying structure (dimensionality reduction).
Unsupervised learning is crucial in market segmentation, where
businesses identify different customer groups. It's also used in
anomaly detection, like identifying fraudulent transactions in
banking.

Reinforcement Learning
Reinforcement Learning is unique. An agent learns to make decisions
by performing actions in an environment and receiving feedback in
the form of rewards or penalties. It's similar to training a pet. When
the pet performs a desirable action, it gets a treat (reward);
otherwise, it might receive a mild reprimand (penalty). The pet
learns to repeat actions that lead to treats.
Reinforcement Learning is at the heart of AI in gaming and robotics.
It's used in training algorithms to play complex games like Go or
Chess and for developing autonomous vehicles, where the vehicle
learns to navigate and make driving decisions.
Each of the aforementioned types serves a distinct purpose.
Supervised learning is highly effective for tasks involving
classification and regression. Unsupervised learning is well-suited for
uncovering latent patterns in data. Reinforcement learning is
employed in situations where an autonomous entity, such as a robot
or a self-driving car, needs to make decisions. The impact of Machine
Learning is extensive and diverse. ML algorithms are utilized in
healthcare to facilitate disease diagnosis and forecast patient
outcomes. Within the realm of finance, these tools are employed for
the purpose of detecting fraudulent activities and evaluating
potential risks. Machine learning (ML) is utilized in marketing to gain
insights into consumer behavior and tailor advertisements to
individual preferences. Machine learning has a pervasive influence on
various aspects of our lives, encompassing everything from the
personalized recommendations we receive on streaming platforms to
the management of online customer service chats.

Deep Learning
Deep Learning, a subset of Machine Learning, has taken AI to new
heights. Inspired by the structure and function of the human brain,
Deep Learning uses artificial neural networks. These networks,
composed of layers of interconnected nodes (or 'neurons'), can learn
and make intelligent decisions.
Neural Networks, particularly in Deep Learning, are inspired by the
human brain's structure and function.
● Layers and Neurons: A typical neural network has an input
layer, several hidden layers, and an output layer. Each layer
consists of units (neurons) that perform computations. Data is
fed into the input layer, processed through hidden layers (each
layer extracting features and patterns), and the final output is
generated.
● Learning Process: Neural networks learn by adjusting the
weights of connections between neurons. This learning occurs
during the training process, where the network iteratively
adjusts these weights to minimize the difference between its
predictions and the actual outcomes.
Deep Learning shines in handling vast amounts of unstructured data.
For instance, consider image recognition. Traditional ML algorithms
struggle here, but Deep Learning excels. By processing data through
its multiple layers, a Deep Learning model can identify and
understand complex patterns in images.

Applications of Deep Learning


Deep Learning's applications are groundbreaking. In autonomous
vehicles, Deep Learning algorithms process and interpret the sensory
input needed to navigate safely. In language processing, models like
GPT (from OpenAI) use Deep Learning to understand and generate
human-like text. Deep Learning is also pivotal in medical image
analysis, helping to detect diseases like cancer more accurately and
earlier than ever before.
Deep Learning has spurred numerous breakthroughs across various
fields:
● Computer Vision: From facial recognition systems to medical
imaging analysis, deep learning algorithms excel at interpreting
and understanding visual data.
● Natural Language Processing (NLP): Tools like translation
services, voice recognition systems, and chatbots leverage
deep learning for understanding and generating human
language.
● Autonomous Vehicles: Deep Learning is crucial in processing
and interpreting the vast amounts of sensory data required for
self-driving cars.
● Personalized Recommendations: Streaming services like
Netflix use deep learning to analyze your viewing habits and
recommend shows you might like.
The future of ML and Deep Learning holds immense promise. We are
progressing towards the adoption of increasingly efficient and
powerful models that necessitate a reduced amount of data and
offer enhanced interpretability. This advancement will persist in
transforming industries such as healthcare, automotive, finance, and
beyond.
Another random document with
no related content on Scribd:
were unsatisfactory to several of the concerted Powers, and
were sharply criticised in the British and German press. The
German government, especially, was disposed to insist upon
stern and strenuous measures in dealing with that of China,
and it addressed the following circular note, on the 18th of
September, to all the Powers:

"The Government of the Emperor holds as preliminary to


entering upon diplomatic relations with the Chinese Government
that those persons must be delivered up who have been proved
to be the original and real instigators of the outrages
against international law which have occurred at Peking. The
number of those who were merely instruments in carrying out
the outrages is too great. Wholesale executions would be
contrary to the civilized conscience, and the circumstances of
such a group of leaders cannot be completely ascertained. But
a few whose guilt is notorious should be delivered up and
punished. The representatives of the powers at Peking are in a
position to give or bring forward convincing evidence. Less
importance attaches to the number punished than to their
character as chief instigators or leaders. The Government
believes it can count on the unanimity of all the Cabinets in
regard to this point, insomuch as indifference to the idea of
just atonement would be equivalent to indifference to a
repetition of the crime. The Government proposes, therefore,
that the Cabinets concerned should instruct their
representatives at Peking to indicate those leading Chinese
personages from whose guilt in instigating or perpetrating
outrages all doubt is excluded."

The British government was understood to be not unwilling to


support this demand from Germany, but little encouragement
seems to have been officially given to it from other quarters,
and the government of the United States was most emphatic in
declining to approve it. The reply of the latter to the German
circular note was promptly given, September 21, as follows:
"The government of the United States has, from the outset,
proclaimed its purpose to hold to the uttermost accountability
the responsible authors of any wrongs done in China to
citizens of the United States and their interests, as was
stated in the Government's circular communication to the
Powers of July 3 last. These wrongs have been committed not
alone in Peking, but in many parts of the Empire, and their
punishment is believed to be an essential element of any
effective settlement which shall prevent a recurrence of such
outrages and bring about permanent safety and peace in China.
It is thought, however, that no punitive measures can be so
effective by way of reparation for wrongs suffered and as
deterrent examples for the future as the degradation and
punishment of the responsible authors by the supreme Imperial
authority itself, and it seems only just to China that she
should be afforded in the first instance an opportunity to do
this and thus rehabilitate herself before the world.

"Believing thus, and without abating in anywise its deliberate


purpose to exact the fullest accountability from the
responsible authors of the wrongs we have suffered in China,
the Government of the United States is not disposed, as a
preliminary condition to entering into diplomatic negotiations
with the Chinese Government, to join in a demand that said
Government surrender to the Powers such persons as, according
to the determination of the Powers themselves, may be held to
be the first and real perpetrators of those wrongs. On the
other hand, this Government is disposed to hold that the
punishment of the high responsible authors of these wrongs,
not only in Peking, but throughout China, is essentially a
condition to be embraced and provided for in the negotiations
for a final settlement.
{139}
It is the purpose of this Government, at the earliest
practicable moment, to name its plenipotentiaries for
negotiating a settlement with China, and in the mean time to
authorize its Minister in Peking to enter forthwith into
conference with the duly authorized representatives of the
Chinese Government, with a view of bringing about a
preliminary agreement whereby the full exercise of the
Imperial power for the preservation of order and the
protection of foreign life and property throughout China,
pending final negotiations with the Powers, shall be assured."

On the same day on which the above note was written the
American government announced its recognition of Prince Ching
and Li Hung-chang, as plenipotentiaries appointed to represent
the Emperor of China, in preliminary negotiations for the
restoration of the imperial authority at Peking and for a
settlement with the foreign Powers.

Differences between the Powers acting together in China, as to


the preliminary conditions of negotiation with the Chinese
government, and as to the nature and range of the demands to
be made upon it, were finally adjusted on the lines of a
proposal advanced by the French Foreign Office, in a note
dated October 4, addressed to the several governments, as
follows:

"The intention of the Powers in sending their forces to China


was, above all, to deliver the Legations. Thanks to their
union and the valour of their troops this object has been
attained. The question now is to obtain from the Chinese
Government, which has given Prince Ching and Li Hung-chang
full powers to negotiate and to treat in its name, suitable
reparation for the past and serious guarantees for the future.
Penetrated with the spirit which has evoked the previous
declarations of the different Governments, the Government of
the Republic has summarized its own sentiments in the
following points, which it submits as a basis for the
forthcoming negotiations after the customary verification of
powers:

(1) The punishment of the chief culprits, who will be


designated by the representatives of the Powers in Peking.
(2) The maintenance of the embargo on the importation of arms.

(3) Equitable indemnity for the States and for private


persons.

(4) The establishment in Peking of a permanent guard for the


Legations.

(5) The dismantling of the Ta-ku forts.

(6) The military occupation of two or three points on the


Tien-tsin-Peking route, thus assuring complete liberty of
access for the Legations should they wish to go to the coast
and to forces from the sea-board which might have to go up to
the capital.

It appears impossible to the Government of the Republic that


these so legitimate conditions, if collectively presented by
the representatives of the Powers and supported by the
presence of the international troops, will not shortly be
accepted by the Chinese Government."

On the 17th of October, the French Embassy at Washington


announced to the American government that "all the interested
powers have adhered to the essential principles of the French
note," and added: "The essential thing now is to show the
Chinese Government, which has declared itself ready to
negotiate, that the powers are animated by the same spirit;
that they are decided to respect the integrity of China and
the independence of its Government, but that they are none the
less resolved to obtain the satisfaction to which they have a
right. In this regard it would seem that if the proposition
which has been accepted as the basis of negotiations were
communicated to the Chinese plenipotentiaries by the Ministers
of the powers at Peking, or in their name by their Dean, this
step would be of a nature to have a happy influence upon the
determinations of the Emperor of China and of his Government."
The government of the United States approved of this
suggestion from France, and announced that it had "instructed
its Minister in Peking to concur in presenting to the Chinese
plenipotentiaries the points upon which we are agreed." Other
governments, however, seem to have given different
instructions, and some weeks were spent by the foreign
Ministers at Peking in formulating the joint note in which
their requirements were to be presented to Prince Ching and
Earl Li.

The latter, meantime, had submitted, on their own part, to the


allied plenipotentiaries, a draft of what they conceived to be
the just preliminaries of a definitive treaty. They prefaced
it with a brief review of what had occurred, and some remarks,
confessing that "the throne now realizes that all these
calamities have been caused by the fact that Princes and high
Ministers of State screened the Boxer desperados, and is
accordingly determined to punish severely the Princes and
Ministers concerned in accordance with precedent by handing
them over to their respective Yamêns for the determination of
a penalty." The "draft clauses" then submitted were as
follows:

"The siege of the Legations was a flagrant violation of the


usages of international law and an utterly unpermissible act.
China admits the gravity of her error and undertakes that
there shall be no repetition of the occurrence. China admits
her liability to pay an indemnity, and leaves it to the Powers
to appoint officers who shall investigate the details and make
out a general statement of claims to be dealt with
accordingly.

"With regard to the subsequent trade relations between China


and the foreign Powers, it will be for the latter to make
their own arrangements as to whether former treaties shall be
adhered to in their entirety, modified in details, or
exchanged for new ones. China will take steps to put the
respective proposals into operation accordingly.

"Before drawing up a definitive treaty it will be necessary


for China and the Powers to be agreed as to general
principles. Upon this agreement being arrived at, the
Ministers of the Powers will remove the seals which have been
affixed to the various departments of the Tsung-li-Yamên and
proceed to the Yamên for the despatch of business in matters
relating to international questions exactly as before.

"So soon as a settlement of matters of detail shall have been


agreed upon between China and the various nations concerned in
accordance with the requirements of each particular nation,
and so soon as the question of the payment of an indemnity
shall have been satisfactorily settled, the Powers will
respectively withdraw their troops. The despatch of troops to
China by the Powers was undertaken with the sole object of
protecting the Ministers, and so soon as peace negotiations
between China and the Powers shall have been opened there
shall be a cessation of hostilities.

{140}

"The statement that treaties will be made with each of the


Powers in no way prejudices the fact that with regard to the
trade conventions mentioned the conditions vary in accordance
with the respective powers concerned. With regard to the
headings of a definitive treaty, questions of nomenclature and
precedence affecting each of the Powers which may arise in
framing the treaty can be adjusted at personal conferences."
Great Britain and Germany were now acting in close accord,
having, apparently, been drawn together by a common distrust
of the intentions of Russia. On the 16th of October, Lord
Salisbury and Count Hatzfeldt signed the following agreement,
which was made known at once to the other governments
concerned, and its principles assented to by all:

"Her Britannic Majesty's Government and the Imperial German


Government, being desirous to maintain their interests in
China and their rights under existing treaties, have agreed to
observe the following principles in regard to their mutual policy
in China:—

"1. It is a matter of joint and permanent international


interest that the ports on the rivers and littoral of China
should remain free and open to trade and to every other
legitimate form of economic activity for the nationals of all
countries without distinction; and the two Governments agree
on their part to uphold the same for all Chinese territory as
far as they can exercise influence.

"2. The Imperial German Government and her Britannic Majesty's


Government will not, on their part, make use of the present
complication to obtain for themselves any territorial
advantages in Chinese dominions, and will direct their policy
towards maintaining undiminished the territorial condition of
the Chinese Empire.

"3. In case of another Power making use of the complications


in China in order to obtain under any form whatever such
territorial advantages, the two Contracting Parties reserve to
themselves to come to a preliminary understanding as to the
eventual steps to be taken for the protection of their own
interests in China.

"4. The two Governments will communicate this Agreement to the


other Powers interested, and especially to Austria-Hungary,
France, Italy, Japan, Russia, and the United States of
America, and will invite them to accept the principles
recorded in it."

The assent of Russia was no less positive than that of the


other Powers. It was conveyed in the following words: "The
first point of this Agreement, stipulating that the ports
situated on the rivers and littoral of China, wherever the two
Governments exercise their influence, should remain free and
open to commerce, can be favorably entertained by Russia, as
this stipulation does not infringe in any way the 'status quo'
established in China by existing treaties. The second point
corresponds all the more with the intentions of Russia, seeing
that, from the commencement of the present complications, she
was the first to lay down the maintenance of the integrity of
the Chinese Empire as a fundamental principle of her policy in
China. As regards the third point relating to the eventuality
of an infringement of this fundamental principle, the Imperial
Government, while referring to their Circular of the 12th
(25th) August, can only renew the declaration that such an
infringement would oblige Russia to modify her attitude
according to circumstances."

On the 13th of November, while the foreign plenipotentiaries


at Peking were trying to agree in formulating the demands they
should make, the Chinese imperial government issued a decree
for the punishment of officials held responsible for the Boxer
outrages. As given the Press by the Japanese Legation at
Washington, in translation from the text received there, it
was as follows;

"Orders have been already issued for the punishment of the


officials responsible for opening hostilities upon friendly
Powers and bringing the country into the present critical
condition by neglecting to suppress and even by encouraging
the Boxers. But as Peking and its neighborhood have not yet
been entirely cleared of the Boxers, the innocent people are
still suffering terribly through the devastation of their
fields and the destruction of their houses, a state of affairs
which cannot fail to fill one with the bitterest feelings
against these officials. And if they are not severely
punished, how can the anger of the people be appeased and the
indignation of the foreign Powers allayed?

"Accordingly, Prince Tuan is hereby deprived of his title and


rank, and shall, together with Prince Chwang, who has already
been deprived of his title, be delivered to the Clan Court to
be kept in prison until the restoration of peace, when they
shall be banished to Sheng-King, to be imprisoned for life.
Princes Yi and Tsai Yung, who have both been already deprived
of their titles, are also to be delivered to the Clan Court
for imprisonment, while Prince Tsai Lien, also already
deprived of title and rank, is to be kept confined in his own
house, Duke Tsai Lan shall forfeit his ducal salary, but may
be transferred with the degradation of one rank. Chief Censor
Ying Nien shall be degraded two ranks and transferred. As to
Kang Yi, Minister of the Board of Civil Appointment, upon his
return from the commission on which he had been sent for the
purpose of making inquiries into the Boxer affair he
memorialized the Throne in an audience strongly in their
favor. He should have been severely punished but for his death
from illness, and all penalties are accordingly remitted. Chao
Shuy Yao, Minister of the Board of Punishment, who had been
sent on a mission similar to that of Kang Yi, returned almost
immediately. Though such conduct was a flagrant neglect of his
duties, still he did not make a distorted report to the
Throne, and therefore he shall be deprived of his rank, but
allowed to retain his present office. Finally, Yu Hsien,
ex-Governor of Shan-Se, allowed, while in office, the Boxers
freely to massacre the Christian missionaries and converts.
For this he deserves the severest punishment, and therefore he
is to be banished to the furthermost border of the country, and
there to be kept at hard labor for life.

{141}

"We have a full knowledge of the present trouble from the very
beginning, and therefore, though no impeachment has been brought
by Chinese officials at home or abroad against Princes Yi,
Tsai Lien and Tsai Yung, we order them to be punished in the
same manner as those who have been impeached. All who see this
edict will thus perceive our justice and impartiality in
inflicting condign penalties upon these officials," It was not
until the 20th of December that the joint note of the
plenipotentiaries of the Powers, after having been submitted
in November to the several governments represented, and
amended to remove critical objections, was finally signed and
delivered to the Chinese plenipotentiaries. The following is a
precis of the requirements set forth in it:

"(1) An Imperial Prince is to convey to Berlin the Emperor's


regret for the assassination of Baron von Ketteler, and a
monument is to be erected on the site of the murder, with an
inscription, in Latin, German, and Chinese, expressing the
regret of the Emperor for the murder.

"(2) The most severe punishment fitting their crimes is to be


inflicted on the personages designated in the Imperial decree
of September 21, whose names—not mentioned—are Princes Tuan
and Chuang and two other princes, Duke Lan, Chao Shu-chiao,
Yang-yi, Ying-hien, also others whom the foreign Ministers
shall hereafter designate. Official examinations are to be
suspended for five years in those cities where foreigners have
been assassinated or cruelly treated.

"(3) Honourable reparation is to be made to Japan for the


murder of M. Sugiyama.

"(4) Expiatory monuments are to be erected in all foreign


cemeteries where tombs have been desecrated.

"(5) The importation of arms or 'materiel' and their


manufacture are to be prohibited.

"(6) An equitable indemnity is to be paid to States,


societies, and individuals, also to Chinese who have suffered
injury because of their employment by foreigners. China will
adopt financial measures acceptable to the Powers to guarantee
the payment of the indemnity and the service of the loans.

"(7) Permanent Legation guards are to be maintained, and the


diplomatic quarter is to be fortified.

"(8) The Ta-ku forts and those between Peking and the sea are
to be razed.

"(9) There is to be a military occupation of points necessary


to ensure the safety of the communications between Peking and
the sea.

"(10) Proclamations are to be posted during two years


throughout the Empire threatening death to any person joining
an anti-foreign society and enumerating the punishment
inflicted by China upon the guilty ringleaders of the recent
outrages. An Imperial edict is to be promulgated ordering
Viceroys, Governors, and Provincial officials to be held
responsible for anti-foreign outbreaks or violations of
treaties within their jurisdiction, failure to suppress the
same being visited by the immediate cashiering of the
officials responsible, who shall never hold office again.

"(11) China undertakes to negotiate a revision of the


commercial treaties in order to facilitate commercial
relations.

"(12) The Tsung-li-Yamên is to be reformed, and the Court


ceremonial for the reception of foreign Ministers modified in
the sense indicated by the Powers.

"Until the foregoing conditions are complied with ('se


conformer à') the Powers can hold out no expectation of a
limit of time for the removal of the foreign troops now
occupying Peking and the provinces."
CHINA: A. D. 1900 (November).
Russo-Chinese agreement relating to Manchuria.

See (in this volume)


MANCHURIA.

CHINA: A. D. 1900 (December).


Russo-Chinese agreement concerning the Manchurian
province of Fêng-tien.

See (in this volume)


MANCHURIA: A. D. 1900.

CHINA: A. D. 1900-1901 (November-February).


Seizure of grounds at Peking for a large Legation Quarter.
Extensive plans of fortification.

In February, 1901, the following from a despatch written in


the previous November by Mr. Conger, the American Minister at
Peking, was given to the Press by the State Department at
Washington: "I have the honor to report that in view of the
probability of keeping large legation grounds in the future,
and because of the general desire on the part of all the
European representatives to have extensive legations, all of
the Ministers are taking possession of considerable areas
adjoining their legations—property belonging either to the
Chinese Government or to private citizens, and having been
abandoned by the owners during the siege—with the intention to
claim them as conquest, or possibly credit something for them
on their account for indemnity. I have as yet not taken formal
possession of any ground for this purpose, nor shall I without
instructions, but I shall not for the present permit any of the
owners or other persons to reoccupy any of the property
between this legation and the canal to the east of it. While
this area will be very small in comparison with the other
legations, yet it will be sufficient to make both the legation
personnel and the guard very comfortable, and will better
comport with our traditional simplicity vis-a-vis the usual
magnificence of other representatives.

"It is proposed to designate the boundaries of a legation


quarter, which shall include all the legations, and then
demand the right to put that in a state of defence when
necessary, and to prohibit the residence of Chinese there,
except by permission of the Ministers. If, therefore, these
ideas as to guards, defence, etc:., are to be carried out, a
larger legation will be an absolute necessity. In fact, it is
impossible now to accommodate the legation and staff in our
present quarters without most inconvenient crowding.

"There are no public properties inside the legation quarter


which we could take as a legation. All the proposed property
to be added, as above mentioned, to our legation, is private
ground, except a very small temple in the southeast corner,
and I presume, under our policy, if taken, will be paid for
either to the Chinese owners or credited upon account against
the Chinese Government for indemnity, although I suspect most
of the other Governments will take theirs as a species of
conquest. The plot of ground adjoining and lying to the cast
of the legation to which I have made reference is about the
size of the premises now occupied by us."

Before its adjournment on the 4th of March, 1901, the Congress


of the United States made an appropriation for the purchase of
grounds for its Legation at Peking, and instructions were sent
to make the purchase.

{142}

By telegram from Peking on the 14th of February it was


announced that a formidable plan of fortification for this
Legation Quarter had been drawn up by the Military Council of
the Powers at Peking, and that work upon it was to begin at
once. The correspondent of the "London Times" described the
plan and wrote satirically of it, as follows; "From supreme
contempt for the weakness of China armed we have swayed to
exaggerated fear of the strength of China disarmed. The
international military experts have devised a scheme for
putting the Legation quarter in a state of defence which is
equivalent to the construction of an International fortress
alongside the Imperial Palace. The plan requires the breaching
of the city wall at the Water-gate, the levelling of the Ha-ta
Mên and Chien Mên towers, the demolition of the ramparts
giving access to them, the sweeping clear of a space 150 to
300 yards wide round the entire Legation area, and the
construction of walls, glacis, moats, barbed wire defences,
with siege guns, Maxims, and barracks capable of holding 2,000
troops, with military stores and equipment sufficient to
withstand a siege of three months. All public buildings,
boards, and civil offices between the Legations and the
Imperial walls are to be levelled, while 11,000 foreign troops
are to hold the communications between Peking and the sea, so
that no Chinese can travel to Peking from the sea without the
knowledge of the foreign military authorities.

"The erection of the defences is to begin at once, before the


return of the Court to Peking. They are no doubt devised to
encourage the Court to return to Peking, it being apparently
the belief of the foreign Ministers that an Imperial Court
governing an independent empire are eager to place themselves
under the tutelage of foreign soldiers and within the reach of
foreign Maxims.

"Within the large new Legation area all the private property
of Chinese owners who years before sought the advantages of
vicinity to the Legations has been seized by the foreign
Legations. France and Germany, with a view to subsequent
commercial transactions, have annexed many acres of valuable
private property for which no compensation is contemplated,
while the Italian Legation, which boasts a staff of two
persons, carrying out the scheme of appropriation to a logical
absurdity, has, in addition to other property, grabbed the
Imperial Maritime Customs gardens and buildings occupied for
so many years by Sir Robert Hart and his staff."

CHINA: A. D. 1901 (January-February).


Famine in Shensi.

A Press telegram from Peking, late in January, announced a


fearful famine prevailing in the province of Shensi, where
thousands of natives were dying. The Chinese government was
distributing rice, and there was reported to be discrimination
against native Christians in the distribution. Mr. Conger, Sir
E. Satow, and M. Pichon protested to Prince Ching and Li
Hung-chang against such discrimination. A Court edict was
therefore issued on the 26th instant ordering all relief
officials and Chinese soldiers to treat Christians in exactly
the same way as all other Chinese throughout the Empire, under
penalty of decapitation. Another despatch, early in February,
stated: "Trustworthy reports received here from Singan-fu [the
temporary residence of the fugitive Chinese court] all agree
that the famine in the provinces of Shen-si and Shan-si is one
of the worst in the history of China. It is estimated that
two-thirds of the people are without sufficient food or the
means of obtaining it. They are also suffering from the bitter
cold. As there is little fuel in either province the woodwork
of the houses is being used to supply the want. Oxen, horses,
and dogs have been practically all sacrificed to allay hunger.
Three years of crop failures in both provinces and more or less
of famine in previous seasons had brought the people to
poverty when winter began. This year their condition has
rapidly grown worse. Prince Ching stated to Mr. Conger, the
United States Minister, that the people were reduced to eating
human flesh and to selling their women and children.
Infanticide is alarmingly common."

CHINA: A. D. 1901 (January-February).


Submission to the demands of the Powers
by the Imperial Government.
Punishments inflicted and promised.
A new Reform Edict.

With no great delay, the Chinese plenipotentiaries at Peking


were authorized by the Emperor and Empress to agree to the
demands of the Powers, which they did by formally signing the
Joint Note. Prince Ching gave his signature on the 12th of
January, 1901, and Li Hung-chang, who was seriously ill,
signed on the following day. Discussion of the punishments to
be inflicted on guilty officials was then opened, and went on
for some time. On the 5th of February, the foreign Ministers
submitted the names of twelve leading officials, against whom
formal indictments were framed, and who were considered to be
deserving of death. Three of them, however (Kang Yi, Hsu Tung,
and Li Ping Heng), were found to be already deceased. The
remaining nine were the following: Prince Chuang,
commander-in-chief of the Boxers; Prince Tuan, who was held to
be the principal instigator of the attack on foreigners; Duke
Lan, the Vice-President of Police, who admitted the Boxers to
the city; Yu Hsien, who was the governor of Shan-Si Province,
promoter of the Boxer movement there, and director of the
massacres in that province; General Tung Fu Siang, who led the
attacks on the Legations, Ying Nien, Chao Hsu Kiao, Hsu Cheng
Yu, and Chih Siu, who were variously prominent in the
murderous work. In the cases of Prince Tuan and Duke Lan, who
were related to the Imperial family, and in the case of
General Tung Fu Siang, whose military command gave him power
to be troublesome, the Chinese court pleaded such difficulties
in the way of executing a decree of death that the Ministers
at Peking were persuaded to be satisfied with sentences of
exile, or degradation in rank, or both. On the 21st of
February the Ministers received notice that an imperial edict
had been issued, condemning General Tung Fu Siang to be
degraded and deprived of his rank; Prince Tuan and Duke Lan to
be disgraced and exiled; Prince Chuang, Ying Nien and Chao Hsu
Kiao to commit suicide; Hsu Cheng Yu, Yu Hsien and Chih Siu to
be beheaded. Hsu Cheng Yu and Chih Siu were then prisoners in
the hands of the foreign military authorities at Peking, and
the sentence was executed upon them there, on the 26th of
February, in the presence of Japanese, French, German and
American troops. A despatch from Peking reporting the
execution stated that, while it was being carried out, "the
ministers held a meeting and determined on the part of the
majority to draw a curtain over further demands for blood.
United States Special Commissioner Rockhill sided strongly
with those favoring humane methods, who are Sir Ernest Satow
and MM. Komura, De Cologan and De Giers, respectively British,
Japanese, Spanish and Russian ministers. Others believe that
China has not been sufficiently punished, and that men should
be executed in every city, town and village where foreigners
were injured."

{143}

While the subject of punishments was pending, and with a view,


it was said, of quickening the action of the Chinese
government, Count von Waldersee, the German Field-Marshal
commanding the allied forces in China, ordered preparations to
be made for an extensive military expedition into the
interior. The government of the United States gave prompt
directions that its forces at Peking should not take part in
this movement, and the remonstrances of other Powers more
pacifically inclined than the Germans caused the project to be
given up.

Meantime, three Imperial edicts of importance, if faithfully


carried out, had been issued. One, on the 5th of February,
commanded new undertakings of reform, accounting for the
abandonment of the reform movement of 1898 by declaring that
it was seditionary and would have resulted in anarchy, and
that it was entered upon when the Emperor was in bad health;
for all which reasons he had requested the Empress Dowager to
resume the reins of government. Now, it was declared, since
peace negotiations were in progress, the government should be
formed on a basis for future prosperity. Established good
methods of foreign countries should be introduced to supply
China's deficiencies. "China's greatest difficulty," said the
edict, "is her old customs, which have resulted in the
insincere dispatch of business and the promoting of private
gain. Up to the present time those who have followed the
Western methods have had only superficial knowledge, knowing
only a little of foreign languages and foreign inventions,
without knowing the real basis of the strength of foreign
nations. Such methods are insufficient for real reform."

In order to obtain a true basis, the Emperor commanded a


consultation between the ministers of the privy council, the
six boards, nine officers, the Chinese ministers to foreign
countries and all the viceroys and governors. Those were
instructed to recommend reforms in the seven branches of
government, namely, the central government, ceremonies,
taxation, schools, civil-service examinations, military
affairs and public economies. They were also to recommend what
part of the old system can be used and what part needs changing.
Two months were given them in which to prepare their report.

On the following day, two edicts, in fulfilment of demands


made in the Joint Note of the Powers, were promulgated. The
first provided, in accordance with article 3 of the Joint
Note, for the suspension of official examinations for five
years in places where foreigners are killed. The second edict
forbade anti-foreign societies, recited the punishment of
guilty parties and declared that local officials will be held
responsible for the maintenance of order. If trouble occurs
the officials would be removed without delay and never again
allowed to hold office.

CHINA: A. D. 1901 (March).


The murdered Christian missionaries and native converts.
Varying statements and estimates of their number.

To the time of this writing (March, 1901), no complete


enumeration of the foreign Christian missionaries and members
of missionary families who were killed during the Boxer
outbreak of the past year has been made. Varying estimates
have appeared, from time to time, and it is possible that one
of the latest among these, communicated from Shanghai on the
1st of March, may approach to accuracy. It was published in
the "North China Daily News," and said to be founded on the
missionary records, according to which, said the "News," "a
total of 134 adults and 52 children were killed or died of
injuries in the Boxer rising of 1899 and 1900."

On the 13th of March, the "Lokal Anzeiger," of Berlin,


published a statistical report from its Peking correspondent
of "foreign Christians killed during the troubles, exclusive
of the Peking siege," which enumerated 118 Englishmen, 79
Americans, Swedes and Norwegians, 26 Frenchmen, 11 Belgians,
10 Italians and Swiss, and 1 German. The total of these
figures is largely in excess of those given by the "North
China Daily News," but they cover, not missionaries alone, but
all foreign Christians. It is impossible, however, not to
doubt the accuracy of both these accounts. Of native
Christians, the German writer estimated that 30,000 had
perished. In September, 1900, the United States Consul-General
at Shanghai, Mr. Goodnow, "after making inquiries from every
possible source," placed the number of British and American
missionaries who had probably been killed at 93, taking no
account of a larger number in Chih-li and Shan-si whose fate
was entirely unknown. Of those whose deaths he believed to be
absolutely proved at that time, 34 were British, including 9
men, 15 women and 10 children, and 22 were American, 8 of
these being men, 8 women and 6 children.

In December, 1900, a private letter from the "Association for


the Propagation of the Faith, St. Mary's Seminary," Baltimore,
Maryland, stated that up to the end of September 48 Catholic
missionaries were known to have been murdered. A pastoral
letter issued in December by Cardinal Vaughan, in London,
without stating the numbers killed, declared that all work of
the Catholic church, throughout the most of China, where 942
European and 445 native priests had been engaged, was
practically swept away.

A private letter, written early in January, 1901, by the


Reverend Dr. Judson Smith, one of the corresponding
secretaries of the American Board of Commissioners for Foreign
Missions, contains the following statement: "The American
Board has lost in the recent disturbances in China 13
missionaries, 6 men and 7 women, and 5 children belonging to
the families who perished. The number of native converts
connected with the mission churches of the American Board who
have suffered death during these troubles cannot be stated
with accuracy. It undoubtedly exceeds 1,000; it may reach a
much larger figure; but some facts that have come to light of
late imply that more of those who were supposed to be lost
have been in hiding than was known. If we should reckon along
with native converts members of their families who have
suffered death, the number would probably be doubled."

There seems to be absolutely no basis of real information for


any estimate that has been made of the extent of massacre
among the native Christian converts. Thousands perished,
without doubt, but how many thousands is yet to be learned. As
intimated by Dr. Smith, larger numbers than have been supposed
may have escaped, and it will probably be long before the true
facts are gathered from all parts of the country.

{144}

In any view, the massacre of missionaries and their families


was hideous enough; but fictions of horror were shamefully
added, it seems, in some of the stories which came from the

You might also like