![](https://csdnimg.cn/release/download_crawler_static/9612534/bg14.jpg)
Prologue to 1st Edition
One of the most interesting features of machine learning is that it lies on the boundary of
several different academic disciplines, principally computer science, statistics, mathematics,
and engineering. This has been a problem as well as an asset, since these groups have
traditionally not talked to each other very much. To make it even worse, the areas where
machine learning methods can be applied vary even more widely, from finance to biology
and medicine to physics and chemistry and beyond. Over the past ten years this inherent
multi-disciplinarity has been embraced and understood, with many benefits for researchers
in the field. This makes writing a textbook on machine learning rather tricky, since it is
potentially of interest to people from a variety of different academic backgrounds.
In universities, machine learning is usually studied as part of artificial intelligence, which
puts it firmly into computer science and—given the focus on algorithms—it certainly fits
there. However, understanding why these algorithms work requires a certain amount of
statistical and mathematical sophistication that is often missing from computer science
undergraduates. When I started to look for a textbook that was suitable for classes of
undergraduate computer science and engineering students, I discovered that the level of
mathematical knowledge required was (unfortunately) rather in excess of that of the ma-
jority of the students. It seemed that there was a rather crucial gap, and it resulted in
me writing the first draft of the student notes that have become this book. The emphasis
is on the algorithms that make up the machine learning methods, and on understanding
how and why these algorithms work. It is intended to be a practical book, with lots of
programming examples and is supported by a website that makes available all of the code
that was used to make the figures and examples in the book. The website for the book is:
http://stephenmonika.net/MLbook.html.
For this kind of practical approach, examples in a real programming language are pre-
ferred over some kind of pseudocode, since it enables the reader to run the programs and
experiment with data without having to work out irrelevant implementation details that are
specific to their chosen language. Any computer language can be used for writing machine
learning code, and there are very good resources available in many different languages, but
the code examples in this book are written in Python. I have chosen Python for several
reasons, primarily that it is freely available, multi-platform, relatively nice to use and is
becoming a default for scientific computing. If you already know how to write code in any
other programming language, then you should not have many problems learning Python.
If you don’t know how to code at all, then it is an ideal first language as well. Chapter A
provides a basic primer on using Python for numerical computing.
Machine learning is a rich area. There are lots of very good books on machine learning
for those with the mathematical sophistication to follow them, and it is hoped that this book
could provide an entry point to students looking to study the subject further as well as those
studying it as part of a degree. In addition to books, there are many resources for machine
learning available via the Internet, with more being created all the time. The Machine
Learning Open Source Software website at http://mloss.org/software/ provides links
to a host of software in different languages.
There is a very useful resource for machine learning in the UCI Machine Learning Repos-
xix