Introduction To Machine Learning With Applications in Information Security 1st Edition Mark Stamp All Chapter Instant Download
Introduction To Machine Learning With Applications in Information Security 1st Edition Mark Stamp All Chapter Instant Download
com
https://textbookfull.com/product/introduction-to-
machine-learning-with-applications-in-information-
security-1st-edition-mark-stamp/
https://textbookfull.com/product/introduction-to-machine-learning-
with-r-rigorous-mathematical-analysis-first-edition-burger/
textbookfull.com
https://textbookfull.com/product/an-introduction-to-statistical-
learning-with-applications-in-r-gareth-james/
textbookfull.com
https://textbookfull.com/product/fundamentals-of-optimization-theory-
with-applications-to-machine-learning-gallier-j/
textbookfull.com
https://textbookfull.com/product/models-of-quantum-matter-a-first-
course-on-integrability-and-the-bethe-ansatz-first-edition-edition-
eckle/
textbookfull.com
Routledge Handbook of the Study of the Commons 1st Edition
Blake Hudson (Editor)
https://textbookfull.com/product/routledge-handbook-of-the-study-of-
the-commons-1st-edition-blake-hudson-editor/
textbookfull.com
https://textbookfull.com/product/the-cambridge-handbook-of-social-
problems-volume-2-1st-edition-a-javier-trevino/
textbookfull.com
https://textbookfull.com/product/evolving-narratives-of-hazard-and-
risk-the-gorkha-earthquake-nepal-2015-1st-edition-louise-bracken/
textbookfull.com
https://textbookfull.com/product/from-big-data-to-big-profits-success-
with-data-and-analytics-1st-edition-russell-walker/
textbookfull.com
Aesthetics The Classic Readings 2nd Edition David E.
Cooper
https://textbookfull.com/product/aesthetics-the-classic-readings-2nd-
edition-david-e-cooper/
textbookfull.com
INTRODUCTION TO
MACHINE
LEARNING with
APPLICATIONS
in INFORMATION
SECURITY
Chapman & Hall/CRC
Machine Learning & Pattern Recognition Series
SERIES EDITORS
This series reflects the latest advances and applications in machine learning and pattern rec-
ognition through the publication of a broad range of reference works, textbooks, and hand-
books. The inclusion of concrete examples, applications, and methods is highly encouraged.
The scope of the series includes, but is not limited to, titles in the areas of machine learning,
pattern recognition, computational intelligence, robotics, computational/statistical learning
theory, natural language processing, computer vision, game AI, game theory, neural networks,
computational neuroscience, and other relevant topics, such as machine learning applied to
bioinformatics or cognitive science, which might be proposed by potential contributors.
PUBLISHED TITLES
BAYESIAN PROGRAMMING
Pierre Bessière, Emmanuel Mazer, Juan-Manuel Ahuactzin, and Kamel Mekhnacha
UTILITY-BASED LEARNING FROM DATA
Craig Friedman and Sven Sandow
HANDBOOK OF NATURAL LANGUAGE PROCESSING, SECOND EDITION
Nitin Indurkhya and Fred J. Damerau
COST-SENSITIVE MACHINE LEARNING
Balaji Krishnapuram, Shipeng Yu, and Bharat Rao
COMPUTATIONAL TRUST MODELS AND MACHINE LEARNING
Xin Liu, Anwitaman Datta, and Ee-Peng Lim
MULTILINEAR SUBSPACE LEARNING: DIMENSIONALITY REDUCTION OF
MULTIDIMENSIONAL DATA
Haiping Lu, Konstantinos N. Plataniotis, and Anastasios N. Venetsanopoulos
MACHINE LEARNING: An Algorithmic Perspective, Second Edition
Stephen Marsland
SPARSE MODELING: THEORY, ALGORITHMS, AND APPLICATIONS
Irina Rish and Genady Ya. Grabarnik
A FIRST COURSE IN MACHINE LEARNING, SECOND EDITION
Simon Rogers and Mark Girolami
INTRODUCTION TO MACHINE LEARNING WITH APPLICATIONS IN
INFORMATION SECURITY
Mark Stamp
Chapman & Hall/CRC
Machine Learning & Pattern Recognition Series
INTRODUCTION TO
MACHINE
LEARNING with
APPLICATIONS
in INFORMATION
SECURITY
Mark Stamp
San Jose State University
California
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
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, including 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.
Preface xiii
Acknowledgments xvii
1 Introduction 1
1.1 What Is Machine Learning? . . . . . . . . . . . . . . . . . . . 1
1.2 About This Book . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Necessary Background . . . . . . . . . . . . . . . . . . . . . . 4
1.4 A Few Too Many Notes . . . . . . . . . . . . . . . . . . . . . 4
vii
viii CONTENTS
II Applications 235
Index 338
Preface
For the past several years, I’ve been teaching a class on “Topics in Information
Security.” Each time I taught this course, I’d sneak in a few more machine
learning topics. For the past couple of years, the class has been turned on
its head, with machine learning being the focus, and information security
only making its appearance in the applications. Unable to find a suitable
textbook, I wrote a manuscript, which slowly evolved into this book.
In my machine learning class, we spend about two weeks on each of the
major topics in this book (HMM, PHMM, PCA, SVM, and clustering). For
each of these topics, about one week is devoted to the technical details in
Part I, and another lecture or two is spent on the corresponding applica-
tions in Part II. The material in Part I is not easy—by including relevant
applications, the material is reinforced, and the pace is more reasonable.
I also spend a week covering the data analysis topics in Chapter 8 and
several of the mini topics in Chapter 7 are covered, based on time constraints
and student interest.1
Machine learning is an ideal subject for substantive projects. In topics
classes, I always require projects, which are usually completed by pairs of stu-
dents, although individual projects are allowed. At least one week is allocated
to student presentations of their project results.
A suggested syllabus is given in Table 1. This syllabus should leave time
for tests, project presentations, and selected special topics. Note that the
applications material in Part II is intermixed with the material in Part I.
Also note that the data analysis chapter is covered early, since it’s relevant
to all of the applications in Part II.
1
Who am I kidding? Topics are selected based on my interests, not student interest.
xiii
xiv PREFACE
Mark Stamp
Los Gatos, California
April, 2017
2
In my experience, in-person lectures are infinitely more valuable than any recorded or
online format. Something happens in live classes that will never be fully duplicated in any
dead (or even semi-dead) format.
About the Author
My work experience includes more than seven years at the National Security
Agency (NSA), which was followed by two years at a small Silicon Valley
startup company. Since 2002, I have been a card-carrying member of the
Computer Science faculty at San Jose State University (SJSU).
My love affair with machine learning began during the early 1990s, when
I was working at the NSA. In my current job at SJSU, I’ve supervised vast
numbers of master’s student projects, most of which involve some combination
of information security and machine learning. In recent years, students have
become even more eager to work on machine learning projects, which I would
like to ascribe to the quality of the book that you have before you and my
magnetic personality, but instead, it’s almost certainly a reflection of trends
in the job market.
I do have a life outside of work.3 Recently, kayak fishing and sailing my
Hobie kayak in the Monterey Bay have occupied most of my free time. I also
ride my mountain bike through the local hills and forests whenever possible.
In case you are a masochist, a more complete autobiography can be found at
http://www.sjsu.edu/people/mark.stamp/
If you have any comments or questions about this book (or anything else)
you can contact me via email at [email protected]. And if you happen
to be local, don’t hesitate to stop by my office to chat.
3
Of course, here I am assuming that what I do for a living could reasonably be classified
as work. My wife (among others) has been known to dispute that assumption.
xv
Acknowledgments
The first draft of this book was written while I was on sabbatical during the
spring 2014 semester. I first taught most of this material in the fall semester
of 2014, then again in fall 2015, and yet again in fall 2016. After the third
iteration, I was finally satisfied that the manuscript had the potential to be
book-worthy.
All of the students in these three classes deserve credit for helping to
improve the book to the point where it can now be displayed in public without
excessive fear of ridicule. Here, I’d like to single out the following students
for their contributions to the applications in Part II.
Topic Students
HMM Sujan Venkatachalam, Rohit Vobbilisetty
PHMM Lin Huang, Swapna Vemparala
PCA Ranjith Jidigam, Sayali Deshpande, Annapurna Annadatha
SVM Tanuvir Singh, Annapurna Annadatha
Clustering Chinmayee Annachhatre, Swathi Pai, Usha Narra
xvii
Chapter 1
Introduction
I took a speed reading course and read War and Peace in twenty minutes.
It involves Russia.
— Woody Allen
1
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
2 INTRODUCTION
the primary goal of this book is to provide the reader with a deeper un-
derstanding of what is actually happening inside those mysterious machine
learning black boxes.
Why should anyone care about the inner workings of machine learning al-
gorithms when a simple black box approach can—and often does—suffice? If
you are like your curious author, you hate black boxes, and you want to know
how and why things work as they do. But there are also practical reasons
for exploring the inner sanctum of machine learning. As with any technical
field, the cookbook approach to machine learning is inherently limited. When
applying machine learning to new and novel problems, it is often essential to
have an understanding of what is actually happening “under the covers.” In
addition to being the most interesting cases, such applications are also likely
to be the most lucrative.
By way of analogy, consider a medical doctor (MD) in comparison to a
nurse practitioner (NP).1 It is often claimed that an NP can do about 80%
to 90% of the work that an MD typically does. And the NP requires less
training, so when possible, it is cheaper to have NPs treat people. But, for
challenging or unusual or non-standard cases, the higher level of training of
an MD may be essential. So, the MD deals with the most challenging and
interesting cases, and earns significantly more for doing so. The aim of this
book is to enable the reader to earn the equivalent of an MD in machine
learning.
The bottom line is that the reader who masters the material in this book
will be well positioned to apply machine learning techniques to challenging
and cutting-edge applications. Most such applications would likely be beyond
the reach of anyone with a mere black box level of understanding.
sometimes skip a few details, and on occasion, we might even be a little bit
sloppy with respect to mathematical niceties. The goal here is to present
topics at a fairly intuitive level, with (hopefully) just enough detail to clarify
the underlying concepts, but not so much detail as to become overwhelming
and bog down the presentation.3
In this book, the following machine learning topics are covered in chapter-
length detail.
Topic Where
Hidden Markov Models (HMM) Chapter 2
Profile Hidden Markov Models (PHMM) Chapter 3
Principal Component Analysis (PCA) Chapter 4
Support Vector Machines (SVM) Chapter 5
Clustering (�-Means and EM) Chapter 6
Topic Where
�-Nearest Neighbors (�-NN) Section 7.2
Neural Networks Section 7.3
Boosting and AdaBoost Section 7.4
Random Forest Section 7.5
Linear Discriminant Analysis (LDA) Section 7.6
Vector Quantization (VQ) Section 7.7
Naı̈ve Bayes Section 7.8
Regression Analysis Section 7.9
Conditional Random Fields (CRF) Section 7.10
http://www.cs.sjsu.edu/~stamp/ML/
where you’ll find links to PowerPoint slides, lecture videos, and other relevant
material. An updated errata list is also available. And for the reader’s benefit,
all of the figures in this book are available in electronic form, and in color.
3
Admittedly, this is a delicate balance, and your unbalanced author is sure that he didn’t
always achieve an ideal compromise. But you can rest assured that it was not for lack of
trying.
4 INTRODUCTION
5
Random documents with unrelated
content Scribd suggests to you:
are not generally supposed to have composed the principal or most
numerous part of the invaders, yet it so happened, that the whole of
the conquered country and also the language of its new inhabitants
took their names from them. They took possession of the ancient
country, or province of the Iceni, and there founded the kingdom of
East Anglia, or of East Angles, comprehending the present counties
of Norfolk, Suffolk, Cambridge, and Huntingdon, which made some
figure among its sister kingdoms in the time of the Heptarchy. The
kingdom of Mercia and that of Northumberland also, it seems, were
inhabited by the same people.
Of Lynn, during that dark and disastrous period, no account has
been preserved. It was probably destroyed by those merciless
invaders, during their long and bloody contest with the ill fated
natives, along with many other towns, all over the country, which
certainly met the same fate. [236] At what time it revived, or rose
again into existence, is no where recorded. But from the
convenience and advantage of its situation it may be supposed to
have done so pretty soon after the government of the East-Angles
had assumed a settled form, and acquired a competent or tolerable
share of stability. That it existed under the East-Anglian kings,
seems a very natural and credible supposition; but whether it stood
then on the western side only, or on both sides of the river, cannot
now be ascertained. Under the Saxon princes that succeeded the
dissolution of the Heptarchy, it is well known to have extended to
the eastern shore of the river; and it is then, most probably, that we
are to date the origin of the present town or borough of Lynn. In
the time of Edward, called the confessor, we find it a place of trade
and considerable note; a plain proof that it must have been in being,
and growing into consequence a good while before that period. It
belonged then to Ailmar, bishop of Elmham, and his brother Stigand,
archbishop of Canterbury, when blind superstition and ecclesiastical
servility may naturally be supposed to have been among the
principal or most distinguished characteristics of its inhabitants. It
continued afterward under episcopal domination and ghostly
discipline till the memorable reign of Henry VIII. who thought proper
to take into his own hands that power or supremacy which was
before vested in the bishops. In consequence of which, it has ever
since been called King’s Lynn, instead of Bishop’s Lynn, which was its
former appellation: an appellation, by the bye, which will serve
further to corroborate the idea, that it was formerly the deleterious
abode of priest-ridden credulity and ecclesiastical thraldom. Indeed
it may be said to have been long distinguished for illiberality,
intolerance, and a persecuting spirit: and it must appear somewhat
remarkable, that the very first person taken up and burnt, in
England, under that diabolical law, De hæretico comburendo, was a
Lynn man, as was also the last, or one of the very last that
underwent persecution for nonconformity under the infamous
conventicle Act: The former was one of the preachers belonging to
St. Margaret’s Church, in the reign of Henry IV. and the latter a
licenced dissenting minister in that of William III. Of each of them a
more particular account shall be given in its proper place.
Not only Lynn, but most, if not all, of the adjacent towns and villages
appear to have been in being long before the conquest. They are
noticed in the celebrated old record, called Domesday, as places
then in existence, and seemingly of long standing and remote
origin. They had, in all probability, been erected and inhabited many
ages before that period, though it seems not likely that many of
their present names, or those given them in the Domesday book, are
to be traced to a British origin, as Parkin and others pretend. [238a]
That Lynn had become a place of considerable trade in the Saxon
times, or before the Norman invasion, is evident from
unquestionable existing documents. It had then a toll-booth, and
enjoyed certain duties and customs, payable on the arrival of any
goods or merchandise, of which the bishop was in full possession of
a moiety. This episcopal privilege is supposed to have been as early
as the conversion of the East Angles, and establishment of
Christianity among them. The town continued daily to flourish and
acquire increasing importance; and at an early period after the
conquest, one of the writers of that time calls it, “a noble city,” on
account of its trading and commercial magnificence. [238b] This was
at a period when Hull did not exist, and when Liverpool, if it did
exist, was but a very obscure and insignificant place.
Section III.
CHAP. III.
Of the religious profession of the first Anglian inhabitants of Lynn
—their renouncing heathenism, and assuming the christian name
—account of their conversion, and character of their Christianity.
Section I.
Section. II.
Section III.
“He was not to destroy the heathen temples of the English, but
only to remove the images of their gods, to wash the wails with
holy water, to erect altars, and deposit relics in them, and so
convert them into christian churches; not only to save the
expence of building new ones, but that the people might more
easily be prevailed upon to frequent those places of worship, to
which they had been accustomed. He directs him further, to
accommodate the ceremonies of the christian worship as much
as possible to those of the heathen, that the people might not
be much startled at the change; and in particular he advises
him to allow the christian converts, on certain festivals, to kill
and eat a great number of oxen, to the glory of God, as they
had done formerly to the honour of the devil.” [252]
These admonitions, (says Dr. Henry) which were but too well
observed, introduced the grossest corruption into the christian
worship, and shew how much the apostles of the sixth and seventh
centuries had departed from the simplicity and sincerity of those of
the first.
CHAP. IV.
Miscellaneous observations, on the social distinctions, and the
general state of the community among the Anglo-Saxons.
Section I.
Section II.
Section III.
Section IV.
Expressive and remarkable names of the months—state of the
coinage, or currency—general value of different commodities in
this country before the conquest—slavery—comparison with the
present course of things.
The inhabitants of Lynn and the rest of their countrymen, in the
Anglo-Saxon ages, could give more satisfactory reasons, it seems,
for the names of their months, than we can for those of ours.
December, which with them stood first, was called Midwinter-
monath, the midwinter month. January, was denominated Aefter-
yula, that is, after Christmas, or rather, after the feast called Yula, a
pagan, riotous, lawless festival, observed at that time of the year,
and to which our Christmas succeeded, with no small resemblance.
February, they called Sol-monath, the sun month, from the returning
of the sun at that season. March, they named Rhede, or Reth-
monath, the rough, or rugged month. April’s name was Easter-
monath, from a favourite Saxon goddess, whose festival was kept at
that time, and may be said to be still kept by us, under the idea of
the christian passover, which we seem to have dedicated to that
same pagan goddess, by our continuing to preserve her precious
memory, and celebrating the feast still in her name. May was called
Trimilchi, from the cows being then milked three times in the day.
June’s name was Seremonath, the dry month, July was called Mœd-
monath, the mead month, from the meads being then in their bloom
and beauty, or the people being there employed in hay making.
August had the name of Weod-monath, the weed month, from the
luxuriance, or abundance of weeds at that time. September was
named Hærfest-monath, or the harvest month. October bore the
name of Winter-fyllith, or winterfall, from winter approaching with
the full moon of that month. November, their last month, they called
Blot-monath, blood month, from the blood of the cattle then slain
and stored for winter provision.
The Anglo-Saxons are said to have made use of coins as early as the
reign of Ethelbright, or Ethelbert, who governed Kent from 561 to
616; as the fines ordered in his laws are all estimated by shillings,
which was even then a denomination of money. The money-pound
of the Anglo-Saxons, is thought to have been the same with the
Tower-pound long in use at the mint, and to have weighed less than
the Troy-pound by ¾ of a Troy-ounce. Its value was about 2l. 16s.
3d. of modern money. [268a] The Mark, like the Pound an imaginary
coin, weighed eight ounces, or two thirds of the Pound. The
merchant reckoned 12 ounces to the mark. Its value was 1l. 17s.
9d. The Mancus, a real coin, was valued at the 8th. of a mark, or
4s. and 8d. The Shilling, a real coin, was worth about eleven pence
farthing of our money. The Anglo-Saxon penny, (pening, or sceata,)
was a silver coin, and weighed near three-pence of our money. This
little piece would do more in those times for its owner, than some
shillings would do now. Halflings and Feorthlings, were the half, and
the fourth, or quarter of the Anglo-Saxon penny, and were of silver.
To these may be added a small brass coin called Styca. Beside these
coins, it was usual with the Anglo-Saxons to complete the sum
destined for any particular purpose, by adding what they called live
money, such as oxen, sheep, horses, or slaves; [268b] which last
species of traffick was carried to an almost incredible height of
brutality.
The value or price of cattle, land, and other commodities, in the
times of which we are now speaking, amounted to but a very small
portion of what they now fetch.
“By the laws of Athelstan, (says Dr. Mavor) a sheep was valued
at a shilling, or fifteen-pence of our money: an ox was
computed at six times the value of a sheep, and a cow at four.
A horse was valued at thirty shillings of our money, and a mare
at twenty-four. Between the years 900 and 1000, a hide of land
was purchased for about one hundred and eighteen shillings,
which was little more than a shilling per acre. [269] On the
whole, (he adds) when we combine the alteration in the weight
of the pound, and the modern value of the precious metals from
their greater plenty, we may conceive every sum of money
mentioned by historians, during the Anglo-Saxon, and even the
Norman times, as if it were multiplied more than a hundred-fold
above a sum of the same denomination at present.”
Section V.
Section VI.