100% found this document useful (2 votes)
43 views

Machine Learning and its Applications 1st Edition Peter Wlodarczak 2024 Scribd Download

Learning

Uploaded by

redeemnvumbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
43 views

Machine Learning and its Applications 1st Edition Peter Wlodarczak 2024 Scribd Download

Learning

Uploaded by

redeemnvumbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Machine Learning and its Applications 1st Edition


Peter Wlodarczak

https://textbookfull.com/product/machine-learning-and-its-
applications-1st-edition-peter-wlodarczak/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Mathematics for Machine Learning 1st Edition Marc Peter


Deisenroth

https://textbookfull.com/product/mathematics-for-machine-learning-1st-
edition-marc-peter-deisenroth/

textboxfull.com

Industrial Applications of Machine Learning Pedro


Larrañaga

https://textbookfull.com/product/industrial-applications-of-machine-
learning-pedro-larranaga/

textboxfull.com

AI as a Service: Serverless machine learning with AWS 1st


Edition Peter Elger

https://textbookfull.com/product/ai-as-a-service-serverless-machine-
learning-with-aws-1st-edition-peter-elger/

textboxfull.com

Machine learning refined foundations algorithms and


applications Second Edition Borhani

https://textbookfull.com/product/machine-learning-refined-foundations-
algorithms-and-applications-second-edition-borhani/

textboxfull.com
Machine Learning Refined: Foundations, Algorithms, and
Applications Second Edition Jeremy Watt

https://textbookfull.com/product/machine-learning-refined-foundations-
algorithms-and-applications-second-edition-jeremy-watt/

textboxfull.com

Mathematical Theories of Machine Learning - Theory and


Applications Bin Shi

https://textbookfull.com/product/mathematical-theories-of-machine-
learning-theory-and-applications-bin-shi/

textboxfull.com

Blockchain, big data and machine learning: trends and


applications First Edition Kumar

https://textbookfull.com/product/blockchain-big-data-and-machine-
learning-trends-and-applications-first-edition-kumar/

textboxfull.com

Teaching Learning Based Optimization Algorithm And Its


Engineering Applications 1st Edition R. Venkata Rao

https://textbookfull.com/product/teaching-learning-based-optimization-
algorithm-and-its-engineering-applications-1st-edition-r-venkata-rao/

textboxfull.com

Machine Learning Algorithms for Industrial Applications


Santosh Kumar Das

https://textbookfull.com/product/machine-learning-algorithms-for-
industrial-applications-santosh-kumar-das/

textboxfull.com
Machine Learning and
its Applications
Peter Wlodarczak
University of Southern Queensland
Toowoomba, Queensland, Australia

p,
p,
A SCIENCE PUBLISHERS BOOK
A SCIENCE PUBLISHERS BOOK
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2020 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works


Printed on acid-free paper
Version Date: 20190821
International Standard Book Number-13: 978-1-138-32822-8 (Hardback)
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been
made to publish reliable data and information, but the author and publisher cannot assume responsibility for the
validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the
copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to
publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let
us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted,
or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, includ-
ing photocopying, microfilming, and recording, or in any information storage or retrieval system, without written
permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.com
(http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers,
MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety
of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment
has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation without intent to infringe.

Library of Congress Cataloging-in-Publication Data


Names: Wlodarczak, Peter, author.
Title: Machine learning and its applications / Peter Wlodarczak, University
of Southern Queensland, Toowoomba, Queensland, Australia.
Description: First edition. | Boca Raton, FL : CRC Press/Taylor & Francis
Group, [2020] | Includes bibliographical references and index. |
Summary: “This book describes Machine Learning techniques and algorithms
that have been used in recent real-world application. It provides an
introduction to Machine Learning, describes the most widely used
techniques and methods. It also covers Deep Learning and related areas
such as function approximation or. The book gives real world examples
where Machine Learning techniques are applied and describes the basic
math and the commonly used learning techniques”-- Provided by publisher.
Identifiers: LCCN 2019033419 | ISBN 9781138328228 (hardcover ; acid-free
paper)
Subjects: LCSH: Machine learning.
Classification: LCC Q325.5 .W635 2020 | DDC 006.3/1--dc23
LC record available at https://lccn.loc.gov/2019033419

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
For my parents
Preface

Artificial intelligence or AI, and in particular, machine learning has


received a lot of attention in media due to the rapid advances we
have seen in this area over the past few years. Progress in artificial
intelligence has been slow in the 1990’s and a certain disillusionment
was noticeable in research since artificial intelligence did not seem
to live up to the expectation. Since the beginning of the new century,
machine learning has seen rapid progress due to new approaches, in
particular, deep learning. Deep learning goes further back, however,
due to recent advances in other areas, in particular, the development
of graphics processing units that provide the necessary computing
power, and the Internet, that made an unprecedented amount of data
publicly available, machine learning has gained a lot of momentum and
we have seen an incredible amount of new applications in many areas
of research and in practice. Machine learning is used for spam filtering,
for medical image analysis, for voice commands, for autonomously
driving cars and to analyze sensor data for the Internet of Things
just to name a few. Every high-end smart phone is now AI enabled.
Deep learning is used to predict earthquakes, for automatic language
translation, for automatic coloring of black and white movies and
for forecasting in finance. The Mars rover Curiosity utilizes artificial
intelligence to autonomously select inspection-worthy soil and rock
samples with high accuracy. The list goes on.

Recently, machine learning also attracted a lot of attention due to


visions of jobs being lost to machines, dangers of autonomous systems,
vi < Machine Learning and its Applications

such as robots who could turn evil, loss of control over existential
infrastructure or even a war starting due to artificial intelligence.
However, it should be noted that artificial intelligence, as the name
suggests, is artificial and has nothing to do with human intelligence. A
machine may be capable of recognizing whether an animal in a picture
is a lion or a tiger, but it is not able to understand the concept behind
what it recognized, i.e., it does not understand the concept of a living
being. A deep learner is, in essence, a huge mathematical formula. It
has nothing to do with how the human brain works, where biochemical
processes are executed. An artificial neural network is inspired by
nature. It has a grain of how we think the brain works and a lot of math
thrown at it. Visions of machines replacing doctors in diagnosing a
patient or lawyers in sentencing a perpetrator are probably premature.
It is more likely that we will see artificial intelligence supporting a
doctor or a lawyer in his daily work instead of replacing her or him in
the near future.

However, we will likely see many more applications of artificial


intelligence in areas that we have not thought of yet. Artificial
intelligence and machine learning pose many interesting problems in
practice and in research. The fact that we try to imitate nature gives
us a better understanding of what problems nature had to solve during
evolution. It also helps us to better understand how it solved them.
However, how human learning works is still largely unknown. Before
we have a better understanding of how the brain works, it is unlikely
that we will be able to replace it, no matter how much math we apply.

When I started to work with machine learning there were excellent


books explaining the math used in machine learning algorithms. There
were also excellent books about data mining and knowledge discovery.
Some of them are listed in the reference section. They can be used for
studying and for reference. However, there were no books explaining
the basic concepts behind machine learning and how they are applied
in practice. It is important to understand the math and the algorithms
used in machine learning. However, it is not necessary to know all
the details about the algorithms to be able to effectively use them for
real world problems. Machine learning has evolved over the past years
to the point where a lot of the complexity is hidden in frameworks
such as TensorFlow or Apache Mahout. A data scientist can use these
Preface < vii

frameworks without knowing the implementation details. Many popular


programming languages have libraries with implementations that are
ready to be used in programs. R, Python, Java or Scala have many
different implementations of machine learning methods and the data
scientist can continue using his preferred programming language by
including the libraries that fit the purpose best. There are also tools, such
as RapidMiner, Weka or Knime to name a few, where no programming
skills are required and machine learning workflows can be created
graphically. Obviously, next to the open source implementations, there
are also commercial tools offered by different vendors to choose from.

This book aims to explain the basic concepts behind machine learning
and the machine learning methods. It is the work of several years of
experience in applying these methods in practice in various projects. It
tries to give a concise description of the algorithms and the math behind
them to the level where it helps explain the inner workings. However,
it is not intended to give an exhaustive mathematical description with
all the derivations. Also, machine learning goes back to the 1940’s
and has evolved since then and many different techniques have been
developed, too many to describe in one single book. Also, for virtually
every machine learning method, variations have been proposed that
might be more suitable for certain problems than others. Nevertheless,
some of the basic concepts apply to many of these methods and
understanding them makes it easy to familiarize oneself with new
methods that have not been used before. This book is written in such
a way that each chapter can be read individually with the caveat that
some redundancy exists in the chapters. This book will hopefully make
it easier for the reader to get started with machine learning and support
them in the fascinating journey through the world of data science and
machine learning.
Contents

Preface v
List of Figures xiii
List of Tables xv

SECTION I: INTRODUCTION

1. Introduction 3
1.1 Data mining 5
1.2 Data mining steps 6
1.3 Data collection 7
1.4 Data pre-processing 8
1.5 Data analysis 10
1.5.1 Supervised learning 10
1.5.2 Unsupervised learning 11
1.5.3 Semi-supervised learning 12
1.5.4 Machine learning and statistics 13
1.6 Data post-processing 15
2. Machine Learning Basics 17
2.1 Supervised learning 19
2.1.1 Perceptron 21
2.2 Unsupervised learning 25
2.2.1 k-means clustering 27
x < Machine Learning and its Applications

2.3 Semi-supervised learning 28


2.4 Function approximation 29
2.5 Generative and discriminative models 32
2.6 Evaluation of learner 32
2.6.1 Stochastic gradient descent 34
2.6.2 Cluster evaluation 37

SECTION II: MACHINE LEARNING

3. Data Pre-processing 43
3.1 Feature extraction 44
3.2 Sampling 46
3.3 Data transformation 47
3.4 Outlier removal 47
3.5 Data deduplication 48
3.6 Relevance filtering 48
3.7 Normalization, discretization and aggregation 49
3.8 Entity resolution 50
4. Supervised Learning 53
4.1 Classification 56
4.1.1 Artificial neural networks 57
4.1.2 Bayesian models 67
4.1.3 Decision trees 69
4.1.4 Support vector machines 74
4.1.5 k-nearest neighbor 79
4.2 Regression analysis 82
4.2.1 Linear regression 85
4.2.2 Polynomial regression 91
4.3 Logistic regression 92
5. Evaluation of Learner 97
5.1 Evaluating a learner 97
5.1.1 Accuracy 99
5.1.2 Precision and recall 99
5.1.3 Confusion matrix 101
5.1.4 Receiver operating characteristic 103
Contents < xi

6. Unsupervised Learning 107


6.1 Types of clustering 109
6.1.1 Centroid, medoid and prototype-based 110
clustering
6.1.2 Density-based clustering 110
6.2 k-means clustering 110
6.3 Hierarchical clustering 113
6.4 Visualizing clusters 115
6.5 Evaluation of clusters 116
6.5.1 Silhouette coefficient 117
7. Semi-supervised Learning 119
7.1 Expectation maximization 120
7.2 Pseudo labeling 123

SECTION III: DEEP LEARNING

8. Deep Learning 127


8.1 Deep learning basics 128
8.1.1 Activation functions 129
8.1.2 Feature learning 132
8.2 Convolutional neural networks 133
8.3 Recurrent neural networks 137
8.4 Restricted Boltzmann machines 141
8.5 Deep belief networks 143
8.6 Deep autoencoders 144

SECTION IV: LEARNING TECHNIQUES

9. Learning Techniques 149


9.1 Learning issues 150
9.1.1 Bias-variance tradeoff 150
9.2 Cross-validation 154
9.3 Ensemble learning 155
9.4 Reinforcement learning 156
9.5 Active learning 157
xii < Machine Learning and its Applications

9.6 Machine teaching 158


9.7 Automated machine learning 159

SECTION V: MACHINE LEARNING


APPLICATIONS

10. Machine Learning Applications 163


10.1 Anomaly detection 164
10.1.1 Security 165
10.1.2 Predictive maintenance 166
10.2 Biomedicale applications 167
10.2.1 Medical applications 167
10.3 Natural language processing 168
10.3.1 Text mining 169
10.4 Other applications 171
11. Future Development 175
11.1 Research directions 177
References 181
Index 185
List of Figures

1.1 Data mining steps 6


1.2 Email pre-processing 9
2.1 Machine learning areas 18
2.2 Likert scale 20
2.3 Perceptron 22
2.4 Linearly separable and inseparable data points 24
2.5 Activation functions 25
2.6 Linear and nonlinear fitting 25
2.7 k-means clustering 28
2.8 Function approximation 30
2.9 Gradient descent 35
2.10 Gradient descent issues 36
3.1 Feature vector 45
4.1 Neuron 58
4.2 Artificial neural network 59
4.3 Recurrent neural network 60
4.4 Perceptron 61
4.5 Activation functions 62
4.6 Hyperbolic tangent 65
4.7 Decision tree 70
4.8 Random forest 74
4.9 Support vector machine 75
4.10 Support vector machine hyperplanes 76
4.11 Kernel trick 78
4.12 k-nearest neighbor 81
xiv < Machine Learning and its Applications

4.13 Regression analysis 83


4.14 Regression analysis steps 85
4.15 An overfitted regression curve 86
4.16 Linear regression 87
4.17 Logistic regression curve 93
5.1 Precision recall 100
5.2 Precision and recall 101
5.3 Multiclass confusion matrix 102
5.4 Receiver operating characteristic 104
6.1 Exclusive and non-exclusive clusters 109
6.2 Agglomerative and divisive clustering 114
6.3 Single, complete and average linkage 114
6.4 Dendrogram clustering 116
7.1 Maximum likelihood estimation 121
7.2 Maximum likelihood initial estimation 122
7.3 Maximum likelihood approximation 123
8.1 Rectified linear unit 130
8.2 Softplus function 132
8.3 Convolutional neural network layers 135
8.4 Convolutional neural network 136
8.5 Recurrent network types 138
8.6 Unfold through time 140
8.7 Restricted Boltzmann machine 142
8.8 Deep autoencoder 145
9.1 Linear fitting 152
9.2 The bias-variance tradeoff 153
9.3 Reinforcement learning 157
List of Tables

1.1 Machine learning and statistical terminology 14


5.1 Confusion matrix for the cancer tissue example 102
INTRODUCTION I
Chapter 1

Introduction

CONTENTS
1.1 Data mining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Data mining steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Data collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Data pre-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Data analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.1 Supervised learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.2 Unsupervised learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5.3 Semi-supervised learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.4 Machine learning and statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Data post-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Machine Learning (ML) is a sub-area of artificial intelligence, or AI.


The central scientific goal of artificial intelligence is to understand the
principles that make intelligent behavior possible in natural or artifi-
cial systems [31]. Early artificial intelligence research showed a lot
of interest in making computers reason and deduce facts [25]. In re-
cent research, the focus of artificial intelligence has shifted towards
designing and building agents that act intelligently. An agent can be
a living object, such as a human or an animal, or it can be a robot, a
sensor or a car. In artificial intelligence, we are interested in computa-
tional agents whose decisions can be explained. Artificial intelligence
is founded on mathematics, logic, philosophy, probability theory, lin-
4  Machine Learning and its Applications

guistics, neuroscience, and decision theory. It has many applications


in computer vision, robotics, natural language processing (NLP) and
machine learning.

The goal of machine learning is to enable computers to learn on their


own. Machine learning is about making computers modify or adapt
their actions (whether these actions are making predictions, or con-
trolling a robot) so that these actions become more accurate, where
accuracy is measured by how well the chosen actions reflect the cor-
rect ones [25]. Using machine learning, a computer can learn rules
by itself without the need of a programmer to develop them manu-
ally. This is particularly useful when the rules get too complex for a
developer to implement, or when there are too many rules to be pro-
grammed manually. An example where machine learning is used are
spam filters. Spam filters classify mails into legitimate and unsolicited
mails, i.e., spam. There are constantly new forms of spam appearing
and there are simply too many different types of spam mails for it to be
possible to program the rules to recognize them manually. Spam filters
learn the rules from past spam mails and learn new rules as new types
of spam appear. How computers learn to solve problems without being
explicitly programmed is the central question this book tries to answer.

Machine learning is nothing new. The term “Machine Learning” was


coined by Arthur Samuel in 1959 while working at IBM. He defined
machine learning as a field of study that gives computers the ability
to learn without being explicitly programmed [2]. In his seminal work
“Some Studies in machine learning Using the Game of Checkers” [35],
he probably describes the first program with the capability to learn. His
checkers program learned to improve its playing by itself. A computer
can be programmed so that it will learn to play a better game of check-
ers than can be played by the person who wrote the program [35].
However, machine learning goes further back, to the 1940s, with Mc-
Culloch and Pitts’ theories of biological learning [26] and Rosenblatt’s
perceptron, the first artificial neuron, described in 1958 [34].

Machine learning has gained momentum in the past years due to big
progresses, in particular using deep learners, that have been made in
object and speech recognition and autonomous systems, such as au-
Introduction  5

tonomously driving cars, automatic machine translation, image caption


generation or coloring black and white images.

Machine learning is an interdisciplinary area of research based on


statistics, probability, neuroscience, psychology and physics. Machine
learning is a mathematical formalization of learning. As such, there is
a discrepancy between natural learning in humans and animals, which
is a biochemical process, and learning on computers, which is a math-
ematical abstraction. In humans, learning is carried out in wetware, in
computers it is carried out in hardware.

1.1 Data mining


Data mining (DM) is defined as the process of discovering patterns in
data [40]. There is no clear distinction in literature between data min-
ing and machine learning. In some publications, data mining focuses
on extracting data patterns and finding relationships between data [10],
whereas machine learning focuses on making predictions [36]. Data
mining is the process of discovering useful patterns and trends in large
data sets. Predictive analytics is the process of extracting information
from large data sets in order to make predictions and estimates about
future outcomes [17]. Therefore the distinction is in the aim. Data min-
ing aims to interpret data, to find patterns that can explain some phe-
nomenon. Machine learning on the other hand, aims to make predic-
tions by building models that can foresee some future outcome. How-
ever, clustering is a machine learning technique that aims to understand
the underlying structure of the data and has similar goals to data min-
ing. Here, we treat machine learning as a subarea of data mining where
the rules are learned automatically.

Humans learn from experience, machines learn from data. Data is the
starting point for all machine learning projects. Machine learning tech-
niques learn the rules from historic data in order to create an inner rep-
resentation, an abstraction, that is often difficult to interpret. Program-
ming computers to learn from experience should eventually eliminate
the need for much of this detailed programming effort [35].
6  Machine Learning and its Applications

1.2 Data mining steps


A typical data mining workflow goes through several steps. These steps
include data collection, cleansing, transformation, aggregation, model-
ing, predictive analysis, visualization and dissemination. However, de-
pending on the problem at hand, those steps might vary or additional
steps might be necessary. Data mining requires domain specific knowl-
edge. If a data mining project is supposed to detect fraud and money
laundering in financial transactions or group news articles into cate-
gories such as “Politics”, “Business”, “Science” etc., different tech-
niques apply. Getting familiar with the domain of the application and
setting the goals of the data mining project are necessary preliminary
tasks in order for the data mining project to complete successfully.
Domain knowledge is also necessary to evaluate the performance of a
trained learner. Figure 1.1 summarizes the data mining steps.

Figure 1.1: Data mining steps.

Data mining is a highly iterative process and typically goes through


many iterations until satisfactory results are achieved. Data mining
projects have to be executed with great care. The growth of data in the
past years has fostered the development of new data mining applica-
tions where the internal workings often go undocumented. The black-
box approach is dangerous since the results can be difficult to explain,
or lead to erroneous conclusions. For instance, cancer tissue in medical
images that was undetected or a traffic situation that was misinterpreted
by an autonomously driving car. The ease with which these applica-
tions can manipulate data, combined with the power of the formidable
data mining algorithms embedded in the black-box software, make
their misuse proportionally more hazardous [17]. Ultimately, one can
Introduction  7

find anything in data and if a machine learning project is carried out


without proficiency it can lead to expensive failures.

1.3 Data collection


Data collection is the process of tapping into data sources and extract-
ing the data needed for training and testing a model. Data sources in-
clude databases, data warehouses, transaction data, the Internet, sensor
data from the Internet of Things or streaming data, but many more
sources exist. If the data is stored in its original format, it is called a
data lake. The data can be historic or real-time, streaming data. For
instance, training a model for spam filtering needs historic, labeled le-
gitimate and spam mails for training and testing. Spam mails are art-
fully crafted in order to avoid elimination by spam filters, making spam
filtering a tricky task. Spam filtering is one of the most widely-used ap-
plications of machine learning.

Often there is more than one data source and multiple data sources
need to be combined, a process called data integration. As a general
technology, data mining can be applied to any kind of data as long as
the data are meaningful for a target application [10].

It is often difficult to collect enough training data. Data is sometimes


not publicly available or cannot be accessed for privacy or security
reasons. To mitigate the problem of sparse data sets, synthetic data can
be created, or training techniques such as cross-validation can be ap-
plied. Also, to train a learner, labeled data is needed. Raw data, such
as emails, are not labeled, and producing labeled training sets can be a
laborious task. Semi-supervised techniques such as active learning can
be used in these situations. Active learning is a form of online learn-
ing in which the agent acts to acquire useful examples from which to
learn [31]. In offline learning, all training data is available beforehand,
whereas in online learning the training data arrive while the learner is
trained. The learning algorithm can actively ask the agent to label data
while it arrives. Data availability, whether labeled or not, is crucial for
the success of a machine learning project and should be clarified before
a machine learning project is initiated.
8  Machine Learning and its Applications

1.4 Data pre-processing


A problem that plagues practical machine learning is poor quality of
the data [40]. Real world data is often noisy and inconsistent and can-
not be used as is for practical machine learning applications. Also, real
world data is seldom in a format that can be directly used as input for a
machine learning scheme. That is why data pre-processing is needed.
Data pre-processing is usually where most of the time is spent. It is not
unusual that it takes up to 70% of the effort in a data mining project.

Whereas machine learning techniques are domain independent, data


pre-processing is highly domain specific. For instance, depending on
whether text data is analyzed or images, different pre-processing steps
apply. The pre-processing tasks also depend on the learning algorithm
applied. Some algorithms can handle noise better than others. For in-
stance, linear regression is very sensitive to outliers, which makes out-
lier removal a mandatory pre-processing step.

There are many different pre-processing techniques. Typical data pre-


processing tasks next to outlier removal include relevance filtering,
data deduplication, data transformation, entity resolution and data en-
richment. For instance, going back to the spam filter example, spam
mails typically contain words or phrases such as “buy online”, “online
pharmacy” or hyperlinks more often than legitimate mails. The fre-
quency of certain words or phrases gives an indication of whether the
mail is spam or legitimate. Irrelevant words, characters or symbols are
first removed from the mail, a process called stop word removal. There
is no authoritative list of stop words and they depend on what is being
mined for. Stop words are the most common words in a language, e.g.,
“the”, “who”, “that”. After stop word removal, the frequencies of the
remaining words are counted, to create a word list with their frequen-
cies. The resulting list is called a bag-of-words. The bag-of-words is
then used as input for a machine learning scheme. Figure 1.2 shows
an email before and after pre-processing.

Since machine learning algorithms usually do not take text as input,


creating a bag-of-words with their frequencies is a very common pre-
processing step in many text analysis tasks. It is simple but effective
Introduction  9

Subject: CONGRATULATIONS, YOU JUST WON ~ CONGRATULATIONS, ¥91d' Jld'5T UIQN


THE NATIONAllOTIERY THE NATIONAllOTIERY

From: Fulfillment officer <[email protected]> FreA'I:: F~:~lfiiiR'IeRt effieer det:tept @gRiail.eeA'I:I'


To: [email protected] le: leEiarsiah@gA'Iaii.EBA'I:

CONGRATULATIONS, you just won 3,5 million CONGRATULATIONS~ won 3,5 million
Dollars. Click on the link below to claim your 9ellaf!r.. Click eA-ttte link &elew4& claim your
3,5 million Dollar reward: 3,5 million 9eJ.Ia.f reward:

http://natlottery.claimreward.ru http://natlottery.claimreward.ru

Congratulations from the National lottery Congratulations ~ National lottery


again agaH>

To unsubstribe, ditk followinc link: ~ ditk followinc link:


http://natlottery.dalmreward.ru http://natlottery.dalmreward.ru

Figure 1.2: Email pre-processing.

for tasks such as opinion mining, text classification or information re-


trieval.

Extracting the relevant information from a data set is called feature ex-
traction. It selects the relevant observation points from raw data. Some-
times the feature set is reduced, a process called feature selection. Fea-
ture selection helps to avoid overfitting since it reduces the complexity,
but it should still describe the data with sufficient accuracy. The result-
ing set of features is represented as a feature vector. A feature vector is
what many machine learning algorithms use as input. Features can be
numerical, e.g., the age of a person, or categorical, e.g., the job title of
a person. The input for a machine learning algorithm can be a tensor
with any number of dimensions. If the tensor has one dimension it is a
vector, if it has two dimensions it is a matrix.

Data transformation is another common data pre-processing step. It


converts data into a format that can be used as input for machine learn-
ing algorithms. For instance, converting feet into meters, strings into
numeric values or continuous into discrete values are common trans-
formation tasks.

In 1997, IBM’s Deep Blue defeated chess champion Garry Kasparov.


This was hailed as one of the milestones of machine learning. From
a pre-processing point of view, chess is a simple task since chess has
clearly defined rules and a move such as “Bishop c3 - d4” is unam-
10  Machine Learning and its Applications

biguous. In other words, chess data has no noise and a limited set of
rules.

1.5 Data analysis


Data analysis is the process of knowledge discovery. During the data
analysis phase, the predictive model is created. There are many data
analysis methods that do not use machine learning techniques. How-
ever, this book focuses on data analysis using machine learning, other
methods are beyond the scope of this book.

Machine learning is divided into supervised, semi-supervised and un-


supervised learning. Some widely-used learning methods include en-
semble learning, reinforcement learning and active learning. Ensem-
ble learning combines several supervised methods to form a stronger
learner. Reinforcement learning are reward-based algorithms which
learn how to attain a complex objective, the goal. Active learning is
a special form of semi-supervised learning.

1.5.1 Supervised learning


Supervised learning techniques are applied when labeled data is
present. The labeled data is used for training and testing. Labeling is
often a manual process and can be time consuming and expensive. Ev-
ery training data record is associated with the correct label. For spam
filtering, labeled data will mean a data set of spam and of legitimate
mails. Here, the labels are “spam” and “legitimate”. During training,
the machine learning algorithm learns the relationship between the
email and the associated label, “spam” or “legitimate”. The learned
relationship is then used for classifying new emails that the learner has
not seen before into their corresponding category.

Supervised methods can be used for classification and regression. Clas-


sification groups data into categories. Spam filtering is a classification
problem since mails are classified into spam and legitimate mails. The
classes are the labels. Since there are two categories, it it a binary clas-
Introduction  11

sification problem. If there are more than two classes, it is called a


multi-class or multi-label classification problem.

Regression analysis is used for estimating the relationship among vari-


ables. It tries to determine the strength of the relationship between a se-
ries of changing variables, the independent variables, usually denoted
by X, and the dependent variable, usually denoted by Y. If there is one
dependent variable, it is called simple linear regression, if there is more
than one dependent variable, it is called multiple linear regression. In
classification, you are looking for a label, in regression for a number.
Predicting if it is going to rain tomorrow is a classification problem
where the labels are “rainy” or “sunny”, predicting how many millime-
ters it is going to rain is a regression problem. The target or dependent
variable y is a continuous variable. Contrarily, discrete variables take
on a finite number of values. Typical supervised methods are Bayesian
models, artificial neural networks, support vector machines, k-nearest
neighbor, regression models and decision tree induction.

1.5.2 Unsupervised learning


Unsupervised learning techniques are used when no labeled data is
present. In other words, there is no y. One of the most popular unsu-
pervised approaches is clustering. The goal of clustering is to under-
stand the data by finding the underlying structure of data. Clustering
groups data based on some similarity measure. For instance, a com-
pany groups it’s online users into customer groups with similar pur-
chasing behavior and demographics in order to better target them with
a marketing campaign. In this example the similarities are the purchas-
ing habits and the age group. Since there is no labeled data, evaluating
a cluster is not an obvious task to do. There is no ground truth that the
result of a clustering task can be compared with.

Clustering can also be used to represent data in a more compressed for-


mat (dimensionality reduction), for data summarization, while keeping
it’s structure and usefulness. Clustering can also be used as a prelim-
inary step for supervised machine learning algorithms, for instance,
12  Machine Learning and its Applications

to reduce dimensionality to improve performance of the supervised


learner.

Typical clustering algorithms include k-means clustering, hierarchical


clustering or principal component analysis (PCA). In k-means cluster-
ing, the algorithm groups data points into k groups where k is the center
of a group and is called centroid. The centroid is also called geometric
center or barycenter and represents the mean position of all the data
points of a cluster group. In k-means clustering, the data points are
grouped around the centroids. The points closest to the centroid k are
added to the cluster. For instance, a warehouse inventory is grouped by
sales activity or sensor data in an Internet of Things (IoT) application
is grouped into normal and deviant sensor data for anomaly detection.

In k-means clustering, the number of k has to be defined beforehand.


Selecting the number of clusters is not always an obvious task to do.
For instance, grouping images of animals into their biological fami-
lies such as felines, canines, etc., requires prior knowledge about how
many families there are going to be in the images to be clustered. k-
means is easy and converges quickly, which often makes it a good
starting point for a machine learning project.

Hierarchical clustering or hierarchical cluster analysis (HCA), groups


data by creating a tree or dendrogram. There are two approaches, a
bottom up or agglomerative approach, where each data point starts in
it’s own cluster, and the top down or divisive approach, where all ob-
servations are put into one cluster and splits are performed in order to
create a hierarchy that is usually presented as a dendrogram.

Human and animal learning is largely unsupervised. Humans learn


from observing the world, not by being told the label of every object,
making unsupervised learning more biologically plausible.

1.5.3 Semi-supervised learning


Semi-supervised learning is typically used when a small amount of la-
belled data and a large amount of unlabelled data is present. Labeling
Another Random Scribd Document
with Unrelated Content
we’ve got the right one, anyhow. This bird don’t look to me like a
feller who would do a girl a meanness.”
“Hmp! You always was soft in the head, Burt,” his companion
grunted.
But he left his prisoner in peace after that. Burt had said one true
word. Clint Reed would not want a half-dead hobo dragged to the
Diamond Bar K. He would prefer one that he could punish himself.
Tug plodded through the fine white dust that lay inches deep on the
road. A cloud of it moved with them, for the horses kicked it up at
every step until they ascended from the valley into the hills. The man
who walked did not have the reserve of strength that had been his
before he had gone to the hospital. There had been a time when he
could go all day and ask for more, but he could not do it now. He
stumbled as he dragged his feet along the trail.
They reached the summit of the pass and looked down on the
Diamond Bar K. Its fenced domain was a patchwork of green and
gold with a background of pineclad ridges. The green patches were
fields of alfalfa, the gold squares were grain ripe for the mower.
Downhill the going was easier. But by the time the horsemen and
their prisoner drew up to the ranch house, Tug was pretty well
exhausted.
While Dusty went in to get Reed, the tramp sat on the floor of the
porch and leaned against a pillar, his eyes closed. He had a
ridiculous feeling that if he let go of himself he would faint.
CHAPTER VI
“NOTHING BUT A GAY-CAT ANYHOW”

With an unusual depression Betty had watched the tramp move


down the dusty road to the railroad track after he had declined her
offer of employment. An energetic young person, she was
accustomed to having her own way. One of her earliest delightful
discoveries had been that she could nearly always get what she
wanted by being eager for it and assuming that, of course, the others
involved would recognize her plan as best, or at least would give up
theirs cheerfully when she urged hers.
But this ragged scamp, out of whose heart youth and hope had been
trampled, was leaving her dashed and rebuffed. She liked to make
conquests of people in bending them to the schemes she made for
the regulation of her small universe, though she would have denied
even to herself that she liked to manage her friends. In the case of
this drear-eyed boy, the hurt was not only to her vanity. He might be
five or six years older than she, but the mothering instinct—the
desire to save him from himself and his fate—fluttered yearningly
toward him.
She did not blame him. There was at least a remnant of self-respect
in his decision. Nobody wants to be done good to. Perhaps she had
seemed smug to him, though she had not meant to be.
He was on her mind all the way back to the ranch, so much so that
she blurted out the whole story to her father as soon as she saw him.
Clint Reed moved to prompt action. He did not see eye to eye with
his daughter. What concerned him was that these bums should
waylay and insult Betty. It was a nice state of affairs when a girl was
not safe alone on the roads. He gathered his men and gave them
orders to find the hoboes and bring them to the ranch.
The girl’s protest was lost on Reed. It hardly reached his mind at all.
Besides, this had become public business. It was not her personal
affair. If hoboes needed to be taught a sense of decency, the men of
the community would attend to that.
Betty went into the house dissatisfied with herself. She had not
meant to make more trouble, but to enlist her father’s sympathy in
the cause of the young fellow who had saved her from the other
tramp. As for the one who had attacked her, she did not care
whether he was punished or not. She had much rather no hue and
cry over the country was made about it. Though she did not say so,
she hoped the vagrants would get away uncaught.
She busied herself with household duties. Under her direction and
with her help, Bridget the cook was putting up half a dozen boxes of
peaches. The two women worked into the middle of the hot
afternoon before they had finished.
“An’ that’s that,” Bridget said with a sigh of relief as she sealed the
last jar. “Fegs, I don’t mind a hotter day this summer. It’s a b’iler.”
She was an old family servant and was in part responsible for the
bringing up of Betty. More than one rancher in the neighborhood had
attempted the adventure of wooing Bridget Maloney, but none of
them had been able to lure her from the Diamond Bar K to become
the mistress of a home of her own.
“You’d better lie down and sleep an hour, dear,” the girl advised.
“An’ phwat would I be doin’ that for wid all these kettles an’ pots to
be cleaned up? Scat! Get ye out o’ my kitchen now, mavourneen, an’
I’ll redd up in a jiff.”
Betty found a magazine and walked out to the shade of a pine grove
where a hammock hung. She settled herself comfortably and began
to read. It was delightfully cool among the pines after the hot kitchen.
She grew drowsy. Her eyes closed.
The sound of far-away voices was in her ears when she wakened.
As her thoughts cleared, so did the voices. She heard Dusty’s,
strident, triumphant.
“It’s up to the old man now.”
The girl turned in the hammock and saw the squat cowpuncher go
jingling into the house. Burt lounged on a horse, his right leg thrown
round the horn of the saddle. Some one else, partly hidden from her
by the ponies, was sitting on the porch.
She got up quickly and walked toward the house. The man on the
porch, she saw presently, had a rope around his waist the other end
of which was fastened to the saddle of Dusty’s mount. An eyeflash
later she recognized him.
“You!” she cried.
The tramp called Tug rose. He did not lift his hat, for he no longer
had one. But his bow and sardonic smile gave an effect of ironic
politeness.
“The bad penny back again,” he said.
“What have they been doing to you?” she asked breathlessly.
He had been a disreputable enough specimen when she had last
seen him. The swollen and discolored face, the gaping shoes, the
ragged coat; all of these he had carried then. But there were
scratches like skin burns down one side of the jaw and on his hands
that had come since. His coat was in shreds. From head to foot dust
covered every available inch.
“Your men have been having a little sport. Why not? The boss had
his first and they had to follow his example. They’re good obedient
boys,” he scoffed bitterly.
“What do you mean? What did they do?” she demanded sharply.
He shrugged his shoulders and she turned imperiously to the man
on horseback. “Burt, you tell me.”
The lank cowboy showed embarrassment. “Why, Dusty he—he
kinda dragged him when the fellow lagged. Jus’ for a ways.”
“On the ground? That what you mean?” The dark eyes flashed
anger.
“Well, you might say so. He sorta stumbled, an’ he’d been right
sassy to Dusty, so—” Burt’s explanation died away. He felt he was
not getting very far with it.
“So you acted like brutes to him—to a man who had just fought for
me when—when—” A sob of chagrin and vexation choked up in her
throat. She stamped her foot in exasperation.
“Don’t get excited about me,” the victim gibed. “I’m nothing but a
gay-cat anyhow. What’s it matter?”
Dusty strutted out of the house, his spurs making music.
The girl turned on him with pantherish swiftness.
“Who told you to torture this man, Dusty? What right have you got to
make yourself law on the Diamond Bar? You’re only a drunken
lunkhead, aren’t you? Or did Father ask you to be judge and jury on
the ranch?”
It was ludicrous to see the complacency vanish from the fatuous
face. The jaw fell and the mouth opened.
“Why, Miss Betty, I figured as how he’d done you a meanness, an’ I
thought—”
She cut his explanation short with stinging ruthlessness. “What for?
You weren’t hired to think, but to obey orders. You’d better get back
into the wheatfield before Father comes. Pronto.”
The cowboy shut his mouth with a view to opening it again in self-
defense, but Betty would have none of his excuses. She shooed him
from the scene indignantly. While she was busy with Dusty, the lank
rider quietly vanished.
The prisoner watched her, the rope still about his waist. His mind
paid tribute to the energy with which she got results.
“Greatly obliged,” he said with sarcasm. “I suppose your father won’t
have me hanged now.”
“Take off that rope,” she said.
“That’s an order, is it?”
“I don’t blame you for hating us all,” she flamed. “I would in your
place. The whole place is bewitched to-day, I believe. We’re all
acting like bullies instead of the quiet, decent people we are. Take
Dusty now. He’s a good little fellow, but he thought you’d attacked
me. He wouldn’t stand that. Men in the ranch country won’t, you
know. They look after us women.”
“That’s a peculiarity of the ranch country, I suppose.”
She ignored the derisive gleam in his eyes. “No ... no! Good men
always do. I wish I could tell you—could show you—my thanks
because you stood up for me. I’ll never forget. It was fine, the way
you fought for me.”
“Nothing to that. I’d been saving a punch or two for him. Don’t forget
that I’m a good-for-nothing bum, on the authority of your own father.
No need of getting sentimental. Don’t make the mistake of putting
me in a class with him and other such truly good men as your friend
Dusty and the lamblike foreman who beat up Cig because he
wouldn’t apologize for being alive.”
Voice and manner both fleered at her, but she was determined to
accept no rebuff.
“Did Dusty hurt you? Can I do anything for you? Tell me. I’d be so
glad to. Let me get you a drink.”
Like a flash, she was off at her own suggestion to the kitchen. His
impulse was to go at once, but he could not escape his past and be
deliberately discourteous to a woman whose only desire was to help
him. He waited, sullenly, for her return. Why could she not let him
alone? All he asked of the Diamond Bar K was for it to let him get
away and forget it as soon as possible.
When the girl came back, it was with a pitcher and a glass. The
outside of the jug was beaded with moisture. From within came the
pleasant tinkle of ice.
Betty filled the tumbler with lemonade.
The vagabond had no desire to accept the hospitality of the ranch,
but he found it impossible to affront her churlishly again.
“Thank you,” he said, and drank.
The drink was refreshing. Two fresh-beaten eggs had been stirred
into it for nutrition.
“Another?” she begged, and poured without waiting for an answer.
The ghost of a smile crept into his eyes. It was the first hint of
wholesome humor she had yet seen in him. He offered her, with a
little bow, a quotation.
“‘I can no other answer make, but thanks,
And thanks, and ever thanks.’”
The dimples broke into her cheeks as her smile flashed out in the
pleasure of having broken the crust of his reserve.
“That’s Shakespeare, isn’t it? I’m dreadfully illiterate, but it sounds
like him.”
“It does a little, doesn’t it?” He raised the glass before drinking.
“Happy days, Miss Reed.”
“That goes double,” she said quickly.
The sardonic mask, that had for a moment been lifted, dropped
again over his face. “Many more like this one,” he fleered.
“You may look back on it and find it a good day yet,” she said
bravely.
He handed back the empty tumbler. “Afraid I’m not an optimist. Now,
if you don’t mind, I’ll be going. The ranch might change its mind
about that hanging bee.”
“But I do mind,” she protested. “I don’t want you to go yet. Please
stay and meet my father. He’s not really hard and cruel as you think.”
Again she saw on his lips the dry, bitter smile.
“Think I’ll take your word for it. I’ve met him once.”
“No, you haven’t met him—not to know him,” she cried softly, giving
rein to swift impulse. “You’ve not met my Daddy—the best man in
Paradise Valley. You can ask any one about him. He’s the squarest
that ever was. The man you met was exasperated and—and not
himself. Dad’s not like that—really.”
“Indeed!” His voice was a compound of incredulity and indifference.
It put her out of court.
But her good impulses were not easily daunted. She had already
learned that this young fellow wore armor of chain-mail to protect his
sensitive pride. In her horoscope it had been written that she must
give herself, and still give and give. The color beat through her dusky
cheeks beneath the ardent eyes. She stabbed straight at his
jaundiced soul.
“If it were my father only that you don’t like—but it isn’t—you don’t
find joy in anything. Your mind’s poisoned. I was reading the other
day how Mr. Roosevelt used to quote from Borrow’s ‘Lavengro’: ‘Life
is sweet, brother—there’s day and night, brother; both sweet things;
sun, moon, and stars, all sweet things—and likewise there’s a wind
on the heath.’ It’s because he felt this in everything he did that they
called him ‘Greatheart.’”
It came to him that the name might not inaptly be applied to her. He
thought of Browning’s “My Last Duchess”:
“... She had
A heart—how shall I say?—too soon made glad,
Too easily impressed: she liked whate’er
She looked on, and her looks went everywhere.”
He hardened his heart to her generous appeal to him. “It’s a very
comfortable point of view to have,” he said with no spring of life in his
voice.
“And a true one,” she added swiftly.
“If you say so, of course.” His skeptical smile made no concessions.
He turned to leave, but stopped to look at a cloud of white dust
moving down the road toward them.
CHAPTER VII
TUG SAYS, “NO, THANK YOU”

The advancing dust cloud rose from a little group of horses and men.
Some of the latter were riding. Others were afoot.
“Lon’s caught them,” said Betty. “I’m sorry.”
“Not so sorry as they’ll be,” returned the ragged youth grimly.
The foreman swung heavily from his horse. Though he was all
muscle and bone, he did not carry his two hundred pounds
gracefully.
“We got the birds all right, Miss Betty, even if they were hittin’ the trail
right lively,” he called to the girl, an ominous grin on his leathery
face. “I guess they’d figured out this wasn’t no healthy climate for
them.” He added, with a swift reversion to business, “Where’s yore
paw?”
“Not back yet. What’ll he do with them, Lon?” the girl asked, her
voice low and troubled.
Distressed in soul, she was looking for comfort. The big foreman
gave her none.
“He’ll do a plenty. You don’t need to worry about that. We aim to
keep this country safe for our womenfolks.”
“Oh, I wish he wouldn’t. I wish he’d let them go,” she said, almost in
a wail.
“He won’t. Clint ain’t that soft.” Forbes stared at the disreputable
vagrant standing beside Betty. “What’s he doing here?”
“Dusty dragged him back. That’s all the sense he has.”
Lon spoke just as though the vagrant were not present. “Lucky for
him he’s got an alibi this time.”
“Is it necessary to insult him after he protected me?” the girl
demanded, eyes flashing. “I’m ashamed of you, Lon.”
He was taken aback. “I reckon it takes more’n that to insult a hobo.”
“Is a man a hobo because he’s looking for work?”
The foreman’s hard gaze took in the man, his white face and soft
hands. “What would he do if he found it?” he asked bluntly.
“You’ve no right to say that,” she flung back. “I think it’s hateful the
way you’re all acting. I tell you he fought for me—after what Father
did to him.”
“Fought for you?” This was news to Lon. His assumption had been
that the young fellow had merely entered a formal protest in order to
clear himself in case retribution followed. “You mean with his fists?”
“Yes—against the thin-faced one. He thrashed him and put me on
my horse and started me home. Then Dusty ropes him and drags
him here on the ground and you come and insult him. He must think
we’re a grateful lot.”
As they looked at the slim, vital girl confronting him with such
passionate and feminine ferocity, the eyes of the foreman softened.
All her life she had been a part of his. He had held her on his knee, a
crowing baby, while her dimpled fingers clung to his rough coat or
explored his unshaven face. He had fished her out of an irrigation
ditch when she was three. He had driven her to school when for the
first time she started on that great adventure. It had been under his
direction that she had learned to ride, to fish, to shoot. He loved her
as though she had been flesh of his flesh and blood of his blood. It
was a delight to him to be bullied by her and to serve her whims.
“I renig,” he said. “Clint never told me the boy done that. I had it
doped out he was just savin’ his own hide. But I’ll take it all back if
it’s like you say. Shake, son.”
The tramp did not refuse to grip the big brown hand thrust at him.
Nor did he accept the proffered alliance. By a fraction of a second he
forestalled the foreman by stooping to knot a broken lace in one of
the gaping shoes.
Cig, who had been edging closer, gave Tug a rancorous look. “I ain’t
forgettin’ this,” he promised. “I’ll get youse good some day for rappin’
on me.”
“He didn’t tell on you. Some of my men brought him here in the
gather like we did you,” Forbes explained.
“Wot’ell youse givin’ me? He rapped. That’s wot he done, the big
stiff. An’ I’ll soitainly get him right for it.”
“That kind of talk ain’t helpin’ you any,” the foreman said. “If you got
any sense, you’ll shut yore trap an’ take what’s comin’.”
“I’ll take it. Don’t youse worry about that. You’d better kill me while
youse are on the job, for I’ll get you, too, sure as I’m a mont’ old.”
Reed drove up in the old car he used for a runabout. He killed the
engine, stepped down, and came up to the group by the porch.
“See you rounded ’em up, Lon.”
“Yep. Found ’em in the cottonwoods acrost the track at Wild Horse.”
The ranchman’s dominant eyes found Tug. “Howcome you here?” he
asked.
The gay-cat looked at him in sullen, resentful silence. The man’s
manner stirred up in the tramp a flare of opposition.
“Dusty brought him here. I want to tell you about that, Dad,” the girl
said.
“Later.” He turned to Tug. “I want a talk with you—got a proposition
to make you. See you later.”
“Not if I see you first,” the ragged nomad replied insolently. “I never
did like bullies.”
The ranchman flushed angrily, but he put a curb on his temper. He
could not afford to indulge it since he was so much in this youth’s
debt. Abruptly he turned away.
“Bring the other two to the barn,” he ordered Forbes. “We’ll have a
settlement there.”
York shuffled forward, in a torment of fear. “See here, mister. I ain’t
got a thing to do with this. Honest to Gawd, I ain’t. Ask Tug. Ask the
young lady. I got respeck for women, I have. You wouldn’t do dirt to
an old ’bo wot never done you no harm, would you, boss?”
His voice was a whine. The big gross man was on the verge of
blubbering. He seemed ready to fall on his knees.
“It’s true, Dad. He didn’t touch me,” Betty said in a low voice to her
father.
“Stood by, didn’t he? Never lifted a hand for you.”
“Yes, but—”
“You go into the house. Leave him to me,” ordered Reed. “Keep this
young man here till I come back.”
Betty knew when words were useless with her father. She turned
away and walked to the porch.
The cowpunchers with their prisoners moved toward the barn. York,
ululating woe, had to be dragged.
Left alone with the tramp called Tug, Betty turned to him a face of
dread. “Let’s go into the house,” she said drearily.
“You’d better go in. I’m taking the road now,” he said in answer.
“But Father wants to see you. If you’ll wait just a little—”
“I have no business with him. I don’t care to see him, now or any
time.” His voice was cold and hard. “Thank you for the lemonade,
Miss Reed. I’ll say good-bye.”
He did not offer his hand, but as he turned away he bowed.
There was nothing more for Betty to say except “Good-bye.”
In a small voice of distress she murmured it.
Her eyes followed him as far as the road. A sound from the barn
drove her into the house, to her room, where she could cover her
ears with the palms of her small brown hands.
She did not want to hear any echo of what was taking place there.
CHAPTER VIII
A RIFT IN THE LUTE

In the cool of the evening Justin Merrick drove down from the
Sweetwater Dam to the Diamond Bar K ranch. It was characteristic
of him that his runabout was up to date and in perfect condition. He
had an expensive taste in the accessories of life, and he either got
the best or did without.
Hands and face were tanned from exposure to the burning sun of the
Rockies, but he was smooth-shaven and immaculate in the
engineer’s suit which fitted his strong, heavy-set figure so snugly.
He drove with precision, as he did everything else in his well-ordered
life. There was in his strength no quality of impatience or turbulence.
He knew what he wanted and how to get it. That was why he had
traveled so far on the road to success and would go a great way
farther.
To-night he anticipated two pleasant hours with Betty Reed. He
would tell her about the work and how it was getting along, his
difficulties with the sand formation at the head gates and how he was
surmounting them. Even before she spoke, he would know from her
eager eyes that she was giving him the admiration due a successful
man from his sweetheart.
Afterward he would pass to more direct and personal love-making,
which she would evade if possible or accept shyly and reluctantly.
She was wearing his ring, but he doubted whether he had really
stormed the inner fortress of her heart. This uncertainty, and the
assurance that went with it of a precious gift not for the first chance
comer, appealed to his fastidious instinct, all the more that he was
sure she would some day come to him with shining eyes and
outstretched hands.
To-night Merrick found Betty distrait and troubled. Her attention to
the recital of his problems was perfunctory. He was conscious of a
slight annoyance. In spite of his force, Justin was a vain man, always
ready to talk of himself and his achievements in a modest way to an
interested and interesting young woman.
It appeared that her father had had a difficulty with some tramps,
which had eventuated in insolence that had brought upon the
vagrants summary physical punishment. From her account of it,
Justin judged that Reed had not handled the matter very wisely.
There was a way to do such things with a minimum of friction.
But he saw no need of worrying about it. The tramps had been given
what they deserved and the affair was closed. It was like a woman to
hold it heavily on her conscience because one of the ne’er-do-wells
chanced to be young and good-looking.
“If you’d seen him,” Betty protested. “A gentleman by the look of him,
or had been once, fine-grained, high-spirited, and yet so down-and-
out.”
“If he’s down-and-out, it’s his own fault. A man’s never that so long
as he holds to self-respect.”
This was incontrovertibly true, but Betty chose to be irritated. Justin
was so obviously successful. He might have had a little sympathy for
the underdog, she thought. Everybody did not have a square, salient
jaw like his. Weakness was not necessarily a crime.
“He looks as though life had mauled him,” she said. “It’s taken
something vital out of him. He doesn’t care what happens any more.”
“If he can only mooch his three meals a day and enough cash to
keep him supplied with bootleg poison,” the engineer added.
They were walking up to the Three Pines, a rocky bluff from which
they could in the daytime see far down the valley. She stopped
abruptly. If she did not stamp her foot, at least the girl’s manner gave
eloquently the effect of this indulgence.
“He’s not like that at all—not at all. Don’t you ever sympathize with
any one that’s in hard luck?” she cried out, her cheeks glowing with a
suffusion of underlying crimson.
“Not when he lies down under it.”
She flashed at him a look resentful of his complacency. It held, too,
for the first time a critical doubt. There was plenty to like about Justin
Merrick, and perhaps there was more to admire. He got things done
because he was so virile, so dominant. To look at the lines and
movements of his sturdy body, at the close-lipped mouth and
resolute eyes, was to know him a leader of men. But now a
treasonable thought had wirelessed itself into her brain. Had he a
mind that never ranged out of well-defined pastures, that was quite
content with the social and economic arrangement of the world? Did
there move in it only a tight little set of orthodox ideas?
“How do you know he lies down under it?” she asked with spirit.
“How do we know what he has to contend with? Or how he struggles
against it?”
If his open smile was not an apology, it refused, anyhow, to be at
variance with her. “Maybe so. As you say, I didn’t see him and you
did. We’ll let it go at that and hope he’s all you think he is.”
Betty, a little ashamed of her vagrant thoughts, tried to find a
common ground upon which they could stand. “Don’t you think that
men are often the victims of circumstance—that they get caught in
currents that kinda sweep them away?”
“‘I am the captain of my soul,’” he quoted sententiously.
“Yes, you are,” she admitted, after one swift glance that took in the
dogged, flinty quality of him. “But most of us aren’t. Take Dad. He’s
strong, and he’s four-square. But he wouldn’t have gone as far as he
did with these tramps if he hadn’t got carried away. Well, don’t you
think maybe this boy is a victim of ‘the bludgeonings of chance’? He
looked like it to me.”
“We make ourselves,” he insisted. “If the things we buck up against
break us, it’s because we’re weak.”
“Yes, but—” Betty’s protest died away. She was not convinced, and
she made another start. “It seems to me that when I read the new
novelists—Wells, Galsworthy, or Bennett, say—one of the things I
get out of them is that we are modified by our environment, not only
changed by it, but sometimes made the prey of it and destroyed by
it.”
“Depends on how solid on our feet we are,” answered the engineer.
“That’s the plea of the agitator, I know. He’s always wanting to do
impossible things by law or by a social upheaval. There’s nothing to
it. A man succeeds if he’s strong. He fails if he’s weak.”
This creed of the individualist was sometimes Betty’s own, but to-
night she was not ready to accept it. “That would be all very well if
we all started equal. But we don’t. What about a man who develops
tuberculosis, say, just when he is getting going? He’s weak, but it’s
no fault of his.”
“It may or may not be. Anyhow, it’s his misfortune. You can’t make
the world over because he’s come a cropper. Take this young tramp
of yours. I’d like to try him out and show you whether there’s
anything to him. I’d put him on the work and let him find his level.
Chances are he’d drift back to the road inside of a week. When a
man’s down-and-out, it isn’t because he doesn’t get a chance, but
because of some weakness in himself.”
Betty knew that in the case of many this was true. For a year or more
she had been an employer of labor herself. One of the things that
had impressed her among the young fellows who worked for her was
that they did find their level. The unskilled, shiftless, and less reliable
were dropped when work became slack. The intelligent and
energetic won promotion for themselves.
But she did not believe that it was by any means a universal truth.
Men were not machines, after all. They were human beings.
However, she dropped the subject.
“He’s gone, so you won’t have a chance to prove your case,” she
said. “Tell me about the work. How is it going?”
The Sweetwater Dam project had been initiated to water what was
known as the Flat Tops, a mesa that stretched from the edge of the
valley to the foothills. It had been and still was being bitterly opposed
by some of the cattlemen of Paradise Valley because its purpose
was to reclaim for farming a large territory over which cattle had
hitherto ranged at will. Their contention held nothing of novelty. It had
been argued all over the West ever since the first nesters came in to
dispute with the cattle barons the possession of the grazing lands. A
hundred districts in a dozen States had heard the claim that this was
a cattle country, unfit for farming and intensive settlement. Many of
them had seen it disproved.
The opposition of powerful ranching interests had not deterred Justin
Merrick. Threats did not disturb him. He set his square jaw and
pushed forward to the accomplishment of his purpose. As he rode or
drove through the valley, he knew that he was watched with hostile
eyes by reckless cowpunchers who knew that his success would put
a period to the occupation they followed. Two of them had tried to
pick a quarrel with him at Wild Horse on one occasion, and had
weakened before his cool and impassive fearlessness.
But he did not deceive himself. At any hour the anger of these men
might flare out against him in explosive action. For the first time in
his life he was carrying a revolver.
Clint Reed was a stockholder and a backer of the irrigation project.
He owned several thousand acres on the Flat Tops, and it was
largely on account of his energy that capital had undertaken the
reclamation of the dry mesa.
The head and front of the opposition was Jake Prowers, who had
brought down from early days an unsavory reputation that rumor
said he more than deserved. Strange stories were whispered about
this mild-mannered little man with the falsetto voice and the skim-
milk eyes. One of them was that he had murdered from ambush the
successful wooer of the girl he wanted, that the whole countryside
accepted the circumstantial evidence as true, and in spite of this he
had married the young widow within a year and buried her inside of
two. Nesters in the hills near his ranch had disappeared and never
been seen again. Word passed as on the breath of the winds that
Prowers had dry-gulched them. Old-timers still lived who had seen
him fight a duel with two desperadoes on the main street of Wild
Horse. He had been carried to the nearest house on a shutter with
three bullets in him, but the two bad men had been buried next day.
The two most important ranchmen in the valley were Clint Reed and
Jake Prowers. They never had been friendly. Usually they were
opposed to each other on any public question that arose. Each was
the leader of his faction. On politics they differed. Clint was a
Republican, Jake a Democrat. There had been times when they had
come close to open hostilities. The rivalry between them had
deepened to hatred on the part of Prowers. When Reed announced
through the local paper the inception of the Sweetwater Dam project,
his enemy had sworn that it should never go through while he was
alive.
Hitherto Prowers had made no move, but everybody in the district
knew that he was biding his time. Competent engineers of the
Government had passed adversely on this irrigation project. They
had decided water could not be brought down from the hills to the
Flat Tops. Jake had seen the surveys and believed them to be
correct. He was willing that Reed and the capitalists he had
interested should waste their money on a fool’s dream. If Justin
Merrick was right—if he could bring water through Elk Creek Cañon
to the Flat Tops—it would be time enough for Prowers to strike.
Knowing the man as he did, Clint Reed had no doubt that, if it
became necessary in order to defeat the project, his enemy would
move ruthlessly and without scruple. It was by his advice that Justin
Merrick kept the dam guarded at night and carried a revolver with
him when he drove over or tramped across the hills.
CHAPTER IX
UNDER FIRE

All day the faint far whir of the reaper could have been heard from
the house of the Diamond Bar K ranch. The last of the fields had
been cut. Much of the grain had been gathered and was ready for
the thresher.
The crop was good. Prices would be fair. Clint Reed rode over the
fields with the sense of satisfaction it always gave him to see
gathered the fruits of the earth. His pleasure in harvesting or in
rounding-up beef steers was not only that of the seller looking to his
profit. Back of this was the spiritual gratification of having been a
factor in supplying the world’s needs. To look at rippling wheat
ripening under the sun, to feed the thresher while the fan scattered a
cloud of chaff and the grain dropped into the sacks waiting for it,
ministered to his mental well-being by justifying his existence. He
had converted hundreds of acres of desert into fertile farm land. All
his life he had been a producer of essentials for mankind. He found
in this, as many farmers do, a source of content. He was paying his
way in the world.
To-day Reed found the need of vindication. He was fonder of Betty
than he was of anything or anybody else in the world, and he knew
that he was at the bar of her judgment. She did not approve of what
he had done. This would not have troubled him greatly if he had
been sure that he approved of it himself. But like many willful men he
sometimes had his bad quarter of an hour afterward.
It was easy enough to make excuses. The Diamond Bar K had been
troubled a good deal by vagrants on the transcontinental route. They
had robbed the smokehouse only a few weeks before. A gang of
them had raided the watermelon patch, cut open dozens of green
melons, and departed with such ripe ones as they could find.
Naturally he had been provoked against the whole breed of them.
But he had been too hasty in dealing with the young scamp he had
thrashed. Clint writhed under an intolerable sense of debt. The boy
had fought him as long as he could stand and take it. He had gone
away still defiant, and had rescued Betty from a dangerous situation.
Dragged back at a rope’s end to the ranch by the luckless Dusty, he
had scornfully departed before Reed had a chance to straighten out
with him this added indignity. The owner of the Diamond Bar K felt
frustrated, as though the vagabond had had the best of him.
He was not even sure that the severe punishment he had meted out
to the other tramps had been wise. The man Cig had endured the
ordeal unbroken in spirit. His last words before he crept away had
been a threat of reprisal. The fellow was dangerous. Clint read it in
his eyes. He had given orders to Betty not to leave the ranch for the
next day or two without an escort. Yet he still felt uneasy, as though
the end of the matter had not come.
It was now thirty hours since he had last seen the hoboes. No doubt
they were hundreds of miles away by this time and with every click of
the car wheels getting farther from the ranch.
He rode back to the stable, unsaddled, and walked to the house.
Betty was in the living-room at the piano. She finished the piece,
swung round on the stool, and smiled at him.
“Everything fine and dandy, Dad?”
His face cleared. It was her way of telling him that she was ready to
forgive and be forgiven.
“Yes.” Then, abruptly, “Reckon I get off wrong foot first sometimes,
honey.”
He was in a big armchair. She went over to him, sat down on his
knees, and kissed him. “’S all right, Dad,” she nodded with an effect
of boyish brusqueness. Betty, too, had a mental postscript and
expressed it. “It’s that boy. Nothing to do about it, of course. He
wouldn’t let me do a thing for him, but—Oh, well, I just can’t get him
off my mind. Kinda silly of me.”
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like