0% found this document useful (0 votes)
70 views

Machine Learning A Basic Approach

Machine learning can be used to solve problems that are difficult to program explicitly. There are three main types of machine learning: supervised learning which uses labeled training data to learn classifications or regressions, unsupervised learning which finds patterns in unlabeled data through clustering, dimensionality reduction, and anomaly detection, and reinforcement learning where an agent learns behaviors through trial and error to maximize rewards.

Uploaded by

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

Machine Learning A Basic Approach

Machine learning can be used to solve problems that are difficult to program explicitly. There are three main types of machine learning: supervised learning which uses labeled training data to learn classifications or regressions, unsupervised learning which finds patterns in unlabeled data through clustering, dimensionality reduction, and anomaly detection, and reinforcement learning where an agent learns behaviors through trial and error to maximize rewards.

Uploaded by

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

Machine learning

a Basic Approach

Introduction

* Machine Learning is an art of programming computers so they can learn


from data.

* "Machine Learning is the field of study that gives computers the ability
to learn without being explicitly programmed."
-Arthur Samuel, 1959

* Machine Learning uses a massive amount of data to provide its


prediction. The more will be data, the more accurate will be the
prediction.

* Spam filter was the first Machine Learning application that became
mainstream.

Why Use Machine Learning?

* Problems for which existing solutions require a lot of hard work or long
lists of rules: one Machine learning algorithm can often simplify code
and perform better.

* Complex problems for which there is no right solution at all using a


traditional approach: the best Machine Learning techniques can find a
solution.

* Fluctuating environments: a Machine Learning system can adapt to new


data.

* Getting insights about complex problems and large amounts of data.


Quick overview of machine Learning approach

First, we need to study the problem for which you are applying machine
learning.

* After analyzing the problem, choose the appropriate machine learning


technique to build a model.

* Train the model with the required data. Data should be well pre-
processed.

* Evaluate the result produced by the model, and if the accuracy of the
result is around 85-95 %, then the model is performing well. The model
can be used as a solution to the problem.

* Or if the result's accuracy is less than 70%, then you need to study the
problem again and try to find the best-suited model according to your
data set.

Types of Machine Learning Systems


There are so many different types of Machine Learning systems, but at the
beginner level, we consider only three types:

1) Supervised Learning

2) Unsupervised Learning, and

3) Reinforcement Learning

Supervised Learning :

* In supervised learning problems, we start with a data set containing


training examples with associated correct labels.

* Mainly Supervised Learning has to perform two tasks:

1) Classification: Generally in classification, algorithms predict the result


in true or false. For example, Spam Filter is trainedwith many example
emails along with their class (spam or not spam), and it must learn how
to classify new emails.

labeled training set for supervised learning (e.g., spam classification)

2) Regression: Another typical task is to predict a target numeric value,


such as the price of a car, given a set of features(mileage, age, brand,
etc) called predictors. This sort of task is called regression. To train the
system, you need to give it many examples of cars, including both their
predictors and their label
(i.e., their prices).

Regression

Note that some regression algorithms can be used for classification as well,
and vice versa. For example, Logistic Regression is commonly used for
classification, as it can output a value that corresponds to the probability
of belonging to a given class (e.g., 20% chance of being spam).

Here are some of the most important supervised learning algorithms:

* k-Nearest Neighbors
* Linear Regression
* Logistic Regression
* Support Vector Machines (SVMs)
* Decision Trees and Random Forests
* Neural networks

Unsupervised Learning:

* Unsupervised learning refers to the training of a Machine Learning


model using information that is not classified or labeled. What this
ideally means is that the algorithm has to act on the information without
any prior guidance.

An

unlabeled training set for unsupervised learning

Some of the most important unsupervised learning algorithms:

* Clustering
k-Means
Hierarchical Cluster Analysis (HCA)
Expectation Maximization

* Visualization and dimensionality reduction


Principal Component Analysis (PCA)
Kernel PCA
Locally-Linear Embedding (LLE)
t-distributed Stochastic Neighbor Embedding (t-SNE)

* Association rule learning


Apriori
Eclat

* For example, say you have a lot of data about your blog’s visitors. You
may want to run a clustering algorithm to try to detect groups of similar
visitors . At no point do you tell the algorithm which group a visitor
belongs to: it finds those connections without your help. For example, it
might notice that 40% of your visitors are males who love comic books
and generally read your blog in the evening, while 20% are young sci-fi
lovers who visit during the weekends, and so on. If you use a
hierarchical clustering algorithm, it may also subdivide each group into
smaller groups. This may help you target your posts for each group.

Clustering

* Visualization algorithms are also good examples of unsupervised


learning algorithms: you feed them a lot of complex and unlabeled data,
and they output a 2D or 3D representation of your data that can easily be
plotted . These algorithms try to preserve as much structure as they can
(e.g., trying to keep separate clusters in the input space from overlapping
in the visualization), so you can understand how the data is organized
and perhaps identify unsuspected patterns.
Example of a t-SNE visualization highlighting semantic clusters

* A related task is dimensionality reduction, in which the goal is to


simplify the data without losing too much information. One way to do
this is to merge several correlated features into one. For example, a
car’s mileage may be very correlated with its age, so the dimensionality
reduction algorithm will merge them into one feature that represents the
car’s wear and tear. This is called feature extraction.

* Yet another important unsupervised 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
trained with normal instances, and when it sees a new instance it can tell
whether it looks like a normal one or whether it is likely an anomaly.
Reinforcement Learning:

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 theform of
negative rewards, as in figure). 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.

Reinforcement Learning
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 March 2016
when it beat the world champion Lee Sedol at the game of Go. It learned
its winning policy by analyzing millions of games, and then playing many
games against itself. Note that learning was turned off during the games
against the champion; AlphaGo was just applying the policy it had learned.

You might also like