1.1 What is machine learning?
● Machine learning = practice of applying the same idea to computers. Instead of
providing a set of instructions to follow step by step, we provide a large number of
examples of the sort of thing we want the computer to learn, and then we try to figure out
a program that recognizes the regularities in the examples and ignores the details.
● What makes a suitable ML problem?
○ We can’t solve it explicitly.
○ Approximate solutions are fine.
○ Limited reliability, predictability, interpretability is fine.
○ Plenty of examples available to learn from:
Bad Good
Computing taxes recommending a movie
Clinical decisions clinical decision support
Parole decision (support) prediction driving time
Unlocking phone recognizing a user
● Where do we use ML?
○ Inside other software
■ Unlock your phone with your face, search with a voice command
○ In analytics, data mining, data science
■ Find typical clusters of users, predict spikes in web traffic
○ In science/statistics
■ If any model can predict A from B, there must be some relation
● Broad definition: Machine learning provides systems the ability to automatically learn
and improve from experience without being explicitly programmed.
○ It’s a system (i.e. a computer running a program).
○ It improves its behavior based on experience, and the resulting behavior has not
been explicitly programmed.
○ This kind of definition suggests a system that learns and acts like a human being.
It continuously updates its “mind” while also constantly making decisions and
taking actions based on the information it has.
● Intelligent agent
○ This kind of system is often called a learning agent.
There are various subfields of machine learning that
deal with such a broad view of machine learning.
○ Reinforcement learning: taking actions in a world
based on delayed feedback.
■ We study true learning agents. We need to define
the agent, the environment, and a reward system.
1
,Machine Learning - Summary
The agent must learn to explore the environment, while also taking actions
to maximize its rewards. Its actions also change the environment, meaning
that what it chooses to do may invalidate what it has learned so far. clearly,
this is a very complicated problem.
○ Online learning: predicting and learning at the same time.
■ We are no longer taking actions, we are only predicting: for each input we
need to predict the right output, but what we choose to predict doesn’t
affect what we will see in the future. We are still learning online: every
input we observe requires a prediction, but it also serves as an example to
learn from in our future predictions. Dealing with all these problems at
once is very complicated. In most cases, we don’t actually need an agent
that learns as it acts. In those cases, we can simplify the problem of
machine learning a lot.
○ Offline learning:
■ Separate learning, predicting, and acting
● Take a fixed dataset of examples (aka instances)
● Train a model to learn from these examples
● Test the model to see if it works, by checking its predictions
● If the model works, put it into production i.e. use its predictions to
take actions
■ You separate the acts of
1. learning a model and
2. putting a learned model to use.
You gather a dataset of examples beforehand, you train a model, test it,
and once you’re sure it works well enough, you use that version of the
model (for instance by sticking it into a computer program). The finished
program will never learn while it’s running. There is no feedback loop
between learning and running. Note that the acting part of the intelligent
agent is eliminated entirely. While this robs the exercise of some of its
more exciting aspects (it’s a far cry from building androids).
■ It allows us to learn programs that we have no idea how to write
ourselves. For instance, we can learn a program that detects birds in
pictures: we have no idea what kind of rules would be required, or how to
design an algorithm to do it. Machine learning allows us to create such a
program from a set of examples.
○ The main problem with machine learning is that we want solutions that are
applicable across domains. You don’t want to dedicate your entire life crafting a
perfect self-learning computer chess program, and then find out that your ideas
have no use for anything else. We want to solve the problem of machine learning
2
,Machine Learning - Summary
in general: instead of studying each problem in isolation, we want solutions that
can be applied to many problems.
To make this possible, machine
learning is usually built on one
of a few abstract tasks like
classification, regression, or
clustering. If you have a
practical problem, like
chess-playing, you find a way to
abstract the problem of playing
chess (or part of it) to the
generic task of, say,
classification, and then you pick
one of many existing classification methods.
● Abstract tasks
○ Abstract tasks come in two basic flavors: supervised, and unsupervised.
○ In supervised tasks, we have explicit examples of both inputs and the
corresponding outputs. What we have to learn is the program that maps any input
to the corresponding output. For instance, we may be provided with emails and
given a label spam (advertising) or ham (genuine) for each. The task then, is to
train a program to assign these labels to new emails.
○ In unsupervised tasks, there is no target value, only the data. All we can do then is
to learn some structure in the data. For instance, we can cluster students to see if
there are natural groups, or see if we can detect which financial transactions are
“unusual”.
● Supervised offline learning = input and output is given
○ Classification: assign a class to each example (small number of categories)
○ Regression: assign a number to each example
● Machine learning vs. Artificial intelligence
○ Machine Learning is a subfield of AI. If we want to make a
general AI that can do everything we can, it needs to be
capable of learning. But there are many other problems and
fields in AI that have nothing to do with learning. Other
subfields, like natural language processing, are greatly helped
by ML techniques, but can also be tackled without.
○ AI but not ML: automated reasoning, planning etc.
● Machine learning vs. data science
○ All ML is Data Science, but not all Data Science is ML. Often,
ML is used as part of a larger data science pipeline.
3
, Machine Learning - Summary
○ Data Science, but not ML: Gathering data, harmonizing data, interpreting data.
● Machine learning vs. data mining
○ Both analyze data, but they do so with different aims: machine learning aims to
produce a model of the data, data mining aims to produce intelligence. Another
distinction is that machine learning focuses on prediction: trying to predict a
target value for new data, whereas data mining tries to navigate and simplify the
data so that it becomes useful for users. If you have a dataset, but you expect
never ever to see any new data from the same source, you can perform data
mining on it, but performing machine learning on it is not much use (although
your data mining will probably use machine
learning techniques).
○ More DM than ML: Finding common
clickstreams in weblogs. Finding fraud in
transaction networks. More ML than DM:
Spam classification, predicting stock prices,
learning to control a robot.
● Machine learning vs. information retrieval
○ Information retrieval (building search
engines) may look at first like a field that is
completely distinct from ML. But on closer
inspection, it turns out that you can model IR
as a kind of classification task: your instances
are documents, and your aim is to classify them into relevant or irrelevant (for a
particular query). This may seem a bit extreme since the class imbalance is so
high, but this has actually helped us in ML to think more clearly about problems
with high class-imbalance (where ranking is a more appropriate way to think
about the task than classification).
● Machine learning vs. statistics
○ Statistics and ML both focus on analyzing data and modeling it in some way. In
fact, many of the models we use in ML were invented by statisticians before the
name Machine Learning existed. The distinction isn’t always clear, but the most
important difference is that Statistics aim to get at the truth, whereas machine
learning tries to come up with something that works, regardless of whether it’s
true. Consider spam classification: we usually model emails as a bag of
independently drawn words. This has nothing to do
with the way emails are actually written. Still, it
works well enough to let people control their inbox.
Contrast this with proving in a courtroom that a
4
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller tararoopram. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.72. You're not tied to anything after your purchase.