Hands on machine learning(Book) Flashcards
machine learning vs artificial intelligence
Put in context, artificial intelligence refers to the general ability of computers to emulate human thought and perform tasks in real-world environments, while machine learning refers to the technologies and algorithms that enable systems to identify patterns, make decisions, and improve themselves through experience …
Apache
As a Web server, Apache is responsible for accepting directory (HTTP) requests from Internet users and sending them their desired information in the form of files and Web pages. Much of the Web’s software and code is designed to work along with Apache’s features
Google colab
Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education.
What Is Machine Learning?
Machine learning is the science (and art) of programming computers so they can
learn from data
Traning set, training instance, model?
The examples that the system uses to learn are called the training
set. Each training example is called a training instance (or sample). The part of a
machine learning system that learns and makes predictions is called a model. Neural
networks and random forests are examples of models.
Data mining?
Data mining is the process of finding anomalies, patterns and correlations within large data sets to predict outcomes. Using a broad range of techniques, you can use this information to increase revenues, cut costs, improve customer relationships, reduce risks and more.
What is machine learning great for?
To summarize, machine learning is great for:
* Problems for which existing solutions require a lot of fine-tuning or long lists of
rules (a machine learning model can often simplify code and perform better than
the traditional approach)
* Complex problems for which using a traditional approach yields no good solution
(the best machine learning techniques can perhaps find a solution)
* Fluctuating environments (a machine learning system can easily be retrained on
new data, always keeping it up to date)
* Getting insights about complex problems and large amounts of data
Examples of Machine learning
Analyzing images of products on a production line to automatically classify them
Detecting tumors in brain scans
Automatically classifying news articles
Automatically flagging offensive comments on discussion forums
Summarizing long documents automatically
Creating a chatbot or a personal assistent
Forecasting your company’s revenue next year, based on many performance metrics
Making your app react to voice commands
Detecting credit card fraud
Segmenting clients based on their purchases so that you can design a different marketing strategy for each segment
Representing a complex, high-dimensional dataset in a clear and insightful diagram
Recommending a product that a client may be interested in, based on past purchases
Building an intelligent bot for a game
Types of Machine Learning Systems
There are so many different types of machine learning systems that it is useful to
classify them in broad categories, based on the following criteria:
* How they are supervised during training (supervised, unsupervised, semisupervised,
self-supervised, and others)
* Whether or not they can learn incrementally on the fly (online versus batch
learning)
* Whether they work by simply comparing new data points to known data points,
or instead by detecting patterns in the training data and building a predictive
model, much like scientists do (instance-based versus model-based learning)
There are many categories, but we’ll discuss the main ones:
supervised learning, unsupervised learning, self-supervised learning, semi-supervised
learning, and reinforcement learning.
Pogoogli
Unsupervised learning ex.
Clustering, dim. reductuon.
task is anomaly detection—for example, detecting
unusual credit card transactions to prevent fraud, catching manufacturing defects,
or automatically removing outliers from a dataset before feeding it to another learning
algorithm. The system is shown mostly normal instances during training, so it
learns to recognize them; then, when it sees a new instance, it can tell whether it looks
like a normal one or whether it is likely an anomaly (see Figure 1-10). A very similar
task is novelty detection: it aims to detect new instances that look different from all
instances in the training set.
association rule learning, in which the
goal is to dig into large amounts of data and discover interesting relations between
attributes. For example, suppose you own a supermarket. Running an association rule
on your sales logs may reveal that people who purchase barbecue sauce and potato
chips also tend to buy steak. Thus, you may want to place these items close to one
another.
Semi-supervised learning
Since labeling data is usually time-consuming and costly, you will often have plenty
of unlabeled instances, and few labeled instances.
Google Photos, are good examples of this. Once
you upload all your family photos to the service, it automatically recognizes that the
same person A shows up in photos 1, 5, and 11, while another person B shows up in
photos 2, 5, and 7. This is the unsupervised part of the algorithm (clustering). Now
all the system needs is for you to tell it who these people are. Just add one label per
person3 and it is able to name everyone in every photo, which is useful for searching
photos.
Self-supervised learning
Another approach to machine learning involves actually generating a fully labeled
dataset from a fully unlabeled one. Again, once the whole dataset is labeled, any
supervised learning algorithm can be used. This approach is called self-supervised
learning.
Transfer learning
Transferring knowledge from one task to another is called transfer
learning, and it’s one of the most important techniques in machine
learning today, especially when using deep neural networks (i.e.,
neural networks composed of many layers of neurons). We will
discuss this in detail in Part II.
Reinforcement learning + examples
Reinforcement learning is a very different beast. The learning system, called an agent
in this context, can observe the environment, select and perform actions, and get
rewards in return (or penalties in the form of negative rewards, as shown in Figure
1-13).
It must then learn by itself what is the best strategy, called a policy, to get
the most reward over time. A policy defines what action the agent should choose
when it is in a given situation
For example, many robots implement reinforcement learning algorithms to learn
how to walk. DeepMind’s AlphaGo program is also a good example of reinforcement
learning: it made the headlines in May 2017 when it beat Ke Jie, the number one
ranked player in the world at the time, at the game of Go.